Support

Admin Tools

#37818 apparently blocks access to administrator/components/com_joomlaupdate/extract.php during update to Joomla 4.2.3

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.2
PHP version
7.4.30
Admin Tools version
7.1.11

Latest post by nicholas on Tuesday, 04 October 2022 00:35 CDT

davidascher

Please see https://forum.joomla.org/viewtopic.php?t=993760. I am attempting to update from Joomla v4.2.2 to v4.2.3 and seeing the same error. I noticed after I first saw the error that there are updates for both Akeeba Backup Pro and Admin Tools Pro, so I attempted to apply those updates. The update to Admin Tools went fine but the Akeeba Backup Pro update did not go well. I got a message that I should have copied down but instead tried again, hoping that things would be better the second time around. The update did work after that initial error (which I am very sorry not to have recorded). 

However, the Joomla update is still failing with the same error message reported by somebody else in the joomla forum referenced above (see attached screen shot). 

I'm not using mod_security2 (have no idea what it is). I haven't done anything to protect any files or directories that were not protected prior to the prior site update (upgrade from J4.2 to J4.2.2).

 

 

 

nicholas
Akeeba Staff
Manager

Please keep in mind that most people answering posts in the Joomla forum have no idea how Joomla works and are not qualified to troubleshoot sites. The badges you see are not based on knowledge, they are based on the number of forum posts. Unfortunately, people with no skills have ample time to peruse the forum, earning them an expert badge they do not deserve. But I digress.

Since I am the author of both Admin Tools and Joomla Update (except for the pre-update checks part) I had updated Admin Tools to NOT block the extract.php file before this file was added to Joomla itself — in fact, as soon as I contributed this file to Joomla.

Despite me having taken all necessary steps to NOT block Joomla Update through Admin Tools' .htaccess Maker it is of course possible for you to have (accidentally) messed up the configuration of Admin Tools' .htaccess Maker. It happens.

If you are not using .htaccess Maker then your problem is unrelated to our software; stop reading here.

Go to Components, Admin Tools for Joomla, .htaccess Maker.

Find the Allow direct access to these files option.

Make sure the following line is present (if not, add it):

administrator/components/com_joomlaupdate/extract.php

Click on the Save & Create .htaccess button in the toolbar.

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!

davidascher

Nicholas - I am aware of all the things you wrote about in your reply, including that you'd developed the Joomla Update for J3 to J4 upgrades. That is why I thought you would be especially interested in the fact that some folks - I find it hard to believe that I and the poster of the topic at https://forum.joomla.org/viewtopic.php?t=993760 are the only two people who have encountered this issue while updated from J4.2.2 to J4.2.3. 

I should mention that of the five different sites I have checked (and which I inherited from somebody else) this one site that is giving me trouble is the only one that is using the Admin Tools generated .htaccess. I did not encounter any issue like this with the original update from J3.10.11 to J4.2.2 and I am absolutely sure that I did not modify the .htaccess file manually on this site.

I have examined the .htaccess file and I do not see 

 

I DO see this:Allow direct access to these files

but I do see this:


# Explicitly allow access to the site's index.php main entry point file
RewriteRule ^index.php(/.*){0,1}$ - [L]
# Explicitly allow access to the site's robots.txt file
RewriteRule ^robots.txt$ - [L]

I expect that I can add the line

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

to fix my issue.

However, I am puzzled if not perplexed  - and I expect you are also - as to how I was able to perform the J3.10.11 to J4.2.2 upgrade without a problem if the .htaccess file did not have a rule allowing access to that extract.php file. I have a copy of the pre-update files and would be happy to send you the .htaccess file from that along with the current (somewhat different) .htaccess file from the J4.2.2 version of the site to further your investigation. Let me know if you are interested in seeing those or anything else that I might be able to do to help figure out what might have happened. Since the J4.2.3 update is relatively new, I suspect that you and/or the Joomla forum will receive more questions along these lines.

nicholas
Akeeba Staff
Manager

> are the only two people who have encountered this issue while updated from J4.2.2 to J4.2.3. 

Yes, they are. The original poster was a client still using a very old version of Admin Tools. He did not even read the release notes for Joomla 4.0.3 which explicitly said that if you are using a security component you need to update it before upgrading Joomla. The person who replied to him had read the announcement but did not bother to explain it, making it sound like I was unaware of the code I had written. That's why I told you not to put too much value in what you read on the forum.

> I expect that I can add the line

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

> to fix my issue.

Don't mess around with the .htaccess file directly! That's how you end up with these issues to begin with. Any manual changes to the .htaccess will be overwritten next time you regenerate the .htaccess through Admin Tools' .htaccess Maker. 

I already told you what to do. Yes, it will add a line similar to that but a. it will add it where it will actually take effect and b. next time someone generates the .htaccess the line will still be there instead of disappearing and having the same problem all over again.

If following my instructions does NOT solve the problem then you have proven that the problem does not lie with Admin Tools. It would be your host failing to execute the extract.php file supplied with Joomla which actually means one thing: the PHP version you are currently using is missing some of the Joomla prerequisites, most likely support for gzip.

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!

davidascher

I apparently did not read your original reply to the ticket as carefully as I should have. I am an old-timey kind of guy who has been futzing around with .htaccess for a long time so I was thinking that was what I was supposed to do... After examining the generated .htaccess more closely, however, I can see that I would be way out of my depth in attempting to do that. Admin Tools clearly encapsulates orders of magnitude more expertise and person hours of experience than I have or would want to have. I have followed your instructions and everything is good now.

Thank you

nicholas
Akeeba Staff
Manager

It's not too hard to figure out where to put that line, especially if there already are other exceptions like that. You would see a comment about exceptions to blocking and lines similar to the one you wanted to add and eventually would have figured out where to put it. It would have worked too... until you regenerate the .htaccess file. That's why I never recommended doing that. I want to fix the issue with as much permanence as we can muster. There's no point having you back with the same issue every few months; you'd get very frustrated.

All's well that ends well! Have a great day :)

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!