J4.x

Assorted Issues

From Joomla! Documentation

Redirect issue after upgrade to 4.0.6[edit]

That is a bug! Line 243 of plugins/system/redirect/redirect.php:

	$db->updateObject('#__redirect_links', $redirect, 'id');

should be

	$this->db->updateObject('#__redirect_links', $redirect, 'id');

A page displays with no styling[edit]

Possible cause: A gzip section in .htaccess is compressing already compressed css and js files.

See this section of the .htaccess file:

## These directives are only enabled if the Apache mod_headers module is enabled.
## This section will check if a .gz file exists and if so will stream it
##     directly or fallback to gzip any asset on the fly
## If your site starts to look strange after enabling this, and you see
##     ERR_CONTENT_DECODING_FAILED in your browser console network tab,
##     then your server is already gzipping css and js files and you don't need this
##     block enabled in your .htaccess
<IfModule mod_headers.c>
...
</IfModule>

If present, comment out or remove.

The list of Site Modules is empty[edit]

Possible cause: The MySQL sort buffer size may be too small.

Using phpMyAdmin, go to Home / Variables / sort buffer size.

It should be at least 256K and preferably 512K. On some shared hosting services it may be set to 128K. Ask the hosting service to increase it.

Update fails after updating to 4.0.4[edit]

Cause: an essential change to the update procedure affecting a small number of users.

Look in .htaccess for this line:

RewriteRule ^administrator/components/com_joomlaupdate/restore\.php$ - [L]

Change it to:

RewriteRule ^administrator\/components\/com_joomlaupdate\/extract\.php$ - [L]

For further information see:

https://www.joomla.org/announcements/release-news/5850-changes-to-update-process-that-you-need-to-be-aware-of.html

Articles visible in database and frontend but not visible in backend[edit]

This occurs when articles are imported directly into the database, which worked fine in Joomla 3 but not in Joomla 4. One user's solution is as follows:

I imported articles directly in the database into the #__content table like I often did in Joomla 3.
However in Joomla 4 they were not visible.

In Content > Categories, the category item counters counted the imported articles.
But they were not visible in Content > Articles.

I solved it by creating the necessary references in the #__workflow_associations table for each imported article:
item_id = article ID, stage_id = 1 and extension = com_content.article.

With this from another user:

This query should do it for you. Replace #_ with your own database prefix

INSERT INTO #__workflow_associations
(item_id, stage_id, extension)
SELECT id as item_id,  '1', 'com_content.article' FROM #__content;