Support

Admin Tools

#40587 Problem in backend after regenerating htaccess

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.1.0
PHP version
8.3.6
Admin Tools version
7.5.1

Latest post by nicholas on Wednesday, 17 April 2024 05:19 CDT

[email protected]

Hi,

after update to Joomla 5.1.0 Admin Tools told me "Your server config file may need to be rebuilt." When klicked regenerate the and had reloaded the site the menu unter "Home Dashboard" do work anymore and some other icons too.

Restoring the last .htaccess has fixed the problem. Comparing the old an the new .htaccess shows some differences at line 345 f. und  368 f.

For example line 345 f.

old
# Serve correct content types, and prevent double compression.
RewriteRule "\.css\.br$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1]
RewriteRule "\.js\.br$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
new
# Serve correct content types, and prevent double compression.
RewriteRule "\.css\.br$" "-" [E=no-gzip:1]
RewriteRule "\.css\.br$" "-" [T=text/css,E=no-brotli:1,L]
RewriteRule "\.js\.br$" "-" [E=no-gzip:1]
RewriteRule "\.js\.br$" "-" [T=text/javascript,E=no-brotli:1,L]

I have checked this also on Jommla 4.4.4 with php 8.2.16 an 8.3.6 and got alwas the sam problem.

Perhaps this behavior depends on my providers configuration but maybe there is another reason that depends on the new Joomla.

Regards, Achim

[email protected]

The old code was generated by Admin Tools 7.4.9

nicholas
Akeeba Staff
Manager

The new code was copied from Joomla's recommendations after checking it with live and local servers. Hm, I think I have an idea what is going on. I'll get back to you a bit later today.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager

I can confirm that the problem is that the L operator is missing from these lines. The correct form for these lines in the .htaccess should've been:

RewriteRule "\.css\.br$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1,L]
RewriteRule "\.js\.br$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1,L]

and

RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1,E=no-brotli:1,L]
RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1,L]

I guess I will have to do a new release because this is a big problem when regenerating the .htaccess file.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

[email protected]

Hi, Nicholas,

after adding the L operator it works fine for me.

Perhaps only a few admins use "Automatically compress static resources", so that the problem does not occur.

Thank you very much, Achim

nicholas
Akeeba Staff
Manager

Yes, this is the case. It also only affects the backend, not the frontend, since Joomla only provides pre-compressed files for the backend media files. This is why automated testing didn't flag it as a problem (it tests the frontend of the site).

I have already published a new version which adds the L flag.

Thank you for the heads up!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!