Support

Admin Tools

#37695 Error updating Joomla from 4.2.1 to 4.2.2

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.1
PHP version
8.0
Admin Tools version
7.1.10

Latest post by nicholas on Friday, 09 September 2022 02:08 CDT

Knightrider2112

I am trying to do the latest Joomla update from 4.2.1 to 4.2.2 and I am receiving the following error message below, which is causing the update to fail. Please advise. 

 

Warning
: foreach() argument must be of type array|object, string given in
/home/mubutv0412/public_html/plugins/system/admintools/src/Feature/CustomCriticalFilesMonitoring.php
on line
39

 

 

 

nicholas
Akeeba Staff
Manager

Go to Components, Admin Tools, Control Panel. Click on Web Application Firewall, Configure WAF, Hardening Options tab.

Find the “Monitor Critical Files” options and set it to No. Click on Save on the toolbar.

The page reloads.

Once again, find the “Monitor Critical Files” options and set it to Yes. Click on Save on the toolbar.

This resets this feature.

Now go to System, Setup, Global Configuration. Click on the Server tab.

Find the Error Reporting option. Set it to “None” (this is the only recommended setting for live sites). Click on Save & Close 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!

Knightrider2112

We performed the recommended steps in your previous message but that did not work. It still failed to update the site from 4.2.1 to 4.2.2. We received a yellow exclamation message which stated, "Could not instantiate mail function" we also received a green checkmark message which stated, "The Web Application Firewall's configuration was saved." We tried cleaning the cache got out of the backend and went back in and nothing it still failed.

Following your instructions we returned back to the same spot and turned on the "Monitor Critical Files" back on to "yes". We then tried doing the update and it failed giving us the following message,

"Server error

Joomla Update encountered a server error when applying the update to your site.

Your site may not have been upgraded completely to the new Joomla version."

 

Any other suggestions?

 

nicholas
Akeeba Staff
Manager

First go to Components, Admin Tools, Web Application Firewall, Configure WAF and set Defend against plugin deactivation to No.

Disable the System - Admin Tools plugin.

Remove or rename the .htaccess file of your site.

Now Admin Tools is no longer running on your site. Its web application firewall is completely disabled as we disabled the system plugin. The .htaccess Maker changes no longer apply as we renamed the .htaccess file.

Try the upgrade again.

Most likely your problem had to do with your .htaccess Maker configuration.

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!

Knightrider2112

That seems to have worked. The update went through. Is that something that we will have to do each time there is a new update on Joomla? Thanks for your help!

nicholas
Akeeba Staff
Manager

Good, now we are certain that the issue is due to your .htaccess Maker settings. We can address it so it does not happen again.

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

Find the “Allow direct access to these files” option.

Click on the plus (+) sign next to the last row in that option's values.

In the new row's text box type administrator/components/com_joomlaupdate/extract.php

Click on “Save and Create .htaccess” in the toolbar.

Finally, remember to re–enable the System - Admin Tools plugin and then go back to Configure WAF and set the “Defend against plugin deactivation” option to Yes.

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!