Support

Admin Tools

#38696 Information - 7.3.0

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
4.2.8
PHP version
8.1
Admin Tools version
7.3.0

Latest post by anotart on Tuesday, 14 March 2023 10:18 CDT

anotart

Sending you this for information -- I was launching a new site today and used admin tools 7.3.0 for first time.  I had all kinds of problems with the.htaccess file.  I did the quick setup.  I've been through hours of troubleshooting, so can't remember everything.  Symptoms (with SEF enabled) were variations of frontend pages not found (just homepage), backend displaying in all text, sometimes clicking on menu items in frontend took me right into the backend. I tried PHP 8.0 and 8.1.  I also tried uninstalling and reinstalling admin tools 7.3.

I had launched a site last week without a problem, and it occurred to me it was using Admin Tools 7.2.3.  I uninstalled 7.3 and installed 7.2.3.  It worked perfectly.  One thing I noticed in the quick setup wizard was that in the last field in the top section (I can't see it, don't want to take a chance of breaking what's working now), the name of the site was automatically inserted.  It also said to add domains (I think), one per field, but there was no '+' like it talked about.  In 7.2.3, this was blank.

I'm set for now -- just want to give you this information in case you hear anything else like this.

 

nicholas
Akeeba Staff
Manager

The only changes in 7.3.0 regarding the .htaccess Maker are the following:

  1. # [HIGH] Empty “Force HTTPS for these URLs” will cause any HTTP access to redirect to the HTTPS site's root
  2. # [HIGH] Quick Setup Wizard will apply the wrong site root path to the .htaccess Maker
  3. # [LOW] .htaccess Maker accidentally prevented the use of Authorization HTTP headers with Joomla

Let's take them one at a time.

# [HIGH] Empty “Force HTTPS for these URLs” will cause any HTTP access to redirect to the HTTPS site's root

This doesn't really concern you. If you have an empty item in that list it would make all attempts to access the HTTP version of the site to redirect to the site's root instead of the corresponding HTTPS page. What I mean is that http://www.example.com/foobar would redirect to https://www.example.com (wrong) instead of https://www.example.com/foobar (correct).

# [HIGH] Quick Setup Wizard will apply the wrong site root path to the .htaccess Maker

If your site was installed in the root folder of the domain (e.g. https://www.example.com) the site root path was correctly detected as an empty string or a forward slash (both are functionally equivalent for the purpose of the .htaccess Maker). However, if your site was in a subdirectory, e.g. https://www.example.com/site then the site root path was detected as /administrator/site instead of /site.

Since you say that 7.2.3 worked for you it doesn't sound like this is the case for you. Your site is in the domain root. It would have helped knowing if this is the case and what the Quick Setup Wizard detected, though.

# [LOW] .htaccess Maker accidentally prevented the use of Authorization HTTP headers with Joomla

This was a simple transposition of a single line which should have preceded the redirection rules. It had been an error since Admin Tools 1.0.0 in 2010 but went undetected for so long because nobody had a use case for HTTP Basic Authentication being handled by PHP code on their site. Joomla 4 and its API application brought a use case which brought this mistake to light.

This is a transparent change. It does not change the way your server is handling requests. It simply passes along more information about the request to PHP by setting an environment variable.

Bottom line

The only change in the .htaccess Maker which could have an impact on how your server is handling requests is the second one, the detection of the site root.

If that happens to you again I need to know what are the HTTP domain, HTTPS domain, and site root path shown in the .htaccess Maker configuration page at the very bottom of the page. I have run this on several sites, live and local, without a problem. If there's something amiss I need to know, get access to the site in question, and see why it happens.

That said, the most likely cause of the symptoms you described is that your configuration.php has a non-empty $live_site. If that uses an http:// URL and you access your site from an https:// URL when running the Quick Setup Wizard you'll make it so that you get always redirected to the https:// version of your site's URLs but your site will be trying to load static resources from the insecure http:// URLs. This will prevent static files (like CSS and JavaScript) from loading hence "the backend displays as text". The same happens if your live_site has www in it and you enable the www to non-www redirection (or, conversely, if the live_site does not have www and you enable the non-www to www redirection). The browser will see that your site is trying to load static resource from a "different site" (as far as the browser is concerned, example.com and www.example.com are two different sites, one cannot trust the other).

Finally, if you are using Joomla's HTTP headers plugin it will add headers which can screw up loading of static resources.

That's off the top of my head. Without actually being able to access the affected site I can't tell you exactly what is going on, just that I cannot reproduce it on any of my development or live site (including the one we're having this discussion on). 

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!

anotart

Hi Nicholas,

Thank you for the fast and very complete response. Much of this is a bit over my head - why I use your service :)

You are correct that the site is in the root.

I did look at the configuration file during my troubleshooting and $live_site was empty, which in my experience, it usually should be.  I tried adding the site there to see if it helped, but it didn't -- and I removed it again. I don't remember now, but I'm pretty sure I would have added the https:// without www, since that is what I usually set up.

If this happens in the future, I will send the additional info you asked for -- I don't have any new launches planned in the near future.

Last question -- since these happened with a new site and the Quick setup wizard, is it true that I shouldn't have problems updating to the new version of admin tools for sites it's currently installed on?

Thank you for your help!

Anne

nicholas
Akeeba Staff
Manager

Last question -- since these happened with a new site and the Quick setup wizard, is it true that I shouldn't have problems updating to the new version of admin tools for sites it's currently installed on?

Absolutely correct.

This bug only affects the automatic detection of the Site Root when setting up Admin Tools for the first time using the Quick Setup wizard.

The good news is that after some tinkering I found a server under my control where I can reproduce the issue. I am going to fix that today and make a new release.

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!

anotart

Thanks so much, Nicholas -- and happy that you were able to find something!

Thanks for all your work -- I appreciate so much that I can use your tools on both Joomla and WordPress (the few of them I have). Makes things so much easier -- and I know I can trust your work!

Anne

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!