Folks,
I've been trying to update admin tools and am getting the following error message:
Class 'FOF40\Container\Container' not found
How do I resolve?
Thanks,
Joe
Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Latest post by on Wednesday, 14 April 2021 20:17 CDT
Folks,
I've been trying to update admin tools and am getting the following error message:
Class 'FOF40\Container\Container' not found
How do I resolve?
Thanks,
Joe
Hello,
We have received a number of reports regarding the updates to Akeeba Backup 8.0.0/8.0.1 and Admin Tools 6.0.0/6.0.1.
We have released versions 8.0.2 and 6.0.2 which address the root causes of all of the issues which have been reported to us. If you still have access to your site's backend please install these new versions. If not, please keep reading.
The root causes of all of the problems identified were the following:
If you have been locked out of your site after installing any of the previous versions of our software please follow the solutions below.
Many servers use PHP's opcode cache to speed up the site. PHP is an interpreted language. The source code of every .php file needs to be read, parsed, converted into an intermediate binary representation called "opcode" and then executed. The read, parse and convert stages take a lot of time. The PHP opcode cache stores the opcode representation of files in memory to speed up your site.
However, when you are updating software on your site you are modifying the same .php files it uses to process every page request. If the opcache is not invalidated (cleared) your server “sees” an old version of the file. This can result in error because your server “sees” a mixed bag of versions of different .php files, versions which may not be designed to be work together and which do not reflect the actual files stored on your server's disk.
We were trying to address this issue by asking PHP to reset the opcode cache (opcache) by using the opcache_reset() function it provides for this purpose. However, the official PHP documentation about how opcache_reset works is wrong! The documentation says that it invalidates the opcode cache, implying that this happens immediately. In fact, it happens asynchronously, after PHP has finished executing the current request. This meant that the opcache was effectively not reset while Joomla was running the post-installation script included in our software. Depending on which pages on your site you had visited before and when, which plugins you run on your site and the configuration of opcache (especially whether and how often it looks for file changes) this would mean that might very well end up with opcache “seeing” old versions of the file during the election of the post-installation scripts or right after the installation had concluded. As a result, you might have experienced errors during or after the installation.
We are now using a different approach with opcache_invalidate() on each .php file included in our software package which addresses this issue.
If you are stuck after installing a previous version of our software you might need to ask your host to reset the opcache or tell you how to do it yourself.
The problems typically manifest themselves as an error similar to the following:
Here is how to solve this:
administrator/components/com_akeeba/BackupEngine/serverkey.php
administrator/components/com_akeeba/backup
administrator/components/com_akeeba
components/com_akeeba
plugins/actionlog/akeebabackup
plugins/console/akeebabackup
plugins/installer/akeebabackup
plugins/quickicon/akeebabackup
plugins/system/backuponupdate
plugins/system/akeebaactionlog
plugins/system/akeebaupdatecheck
plugins/system/aklazy
plugins/system/srp
administrator/components/com_akeeba/BackupEngine/serverkey.php
with the one you made a copy of in the first step.administrator/components/com_akeeba/backup
with the one you moved in the second step.If you have Admin Tools continue reading below. Otherwise skip over the Admin Tools section and go to the FOF 3 & 4 sections.
administrator/components/com_admintools
components/com_admintools
plugins/actionlog/admintools
plugins/installer/admintools
plugins/system/admintools
plugins/system/atoolsjupdatecheck
plugins/system/atoolsupdatecheck
plugins/system/oneclickaction
Our software released between mid-2015 and February 2021 inclusive was using version 3 of our FOF backend framework. Software released on and after March 2nd, 2021 is using version 4 of the framework.
Since FOF might be used by multiple extensions, either our own or third party, we check if any extension has been marked as dependent on FOF 3. If none is marked as such we uninstall FOF 3.
This might be a problem in the following cases:
In these cases the dependency is not marked in any way and there is no way to know that a FOF 3 dependent extension is installed on your site. As a result FOF 3 might be removed when it's actually needed. You will very likely see an error message saying that a class is missing whose name starts with FOF30\
.
In order to gain access back to your site do the following.
fof
extracted from the archive. Rename it to fof30
.fof30
folder into your site's libraries
folder so now you have a libraries/fof30
folder.libraries/fof30
folder again and you'd need to repeat these instructions.After doing that you may have to clear your server's PHP opcode cache (opcache) per the PHP opcache section in this reply.
Our software released between mid-2015 and February 2021 inclusive was using version 3 of our FOF backend framework. Software released on and after March 2nd, 2021 is using version 4 of the framework.
There is a long-standing Joomla issue which may prevent the new version of an extension, such as FOF, to be installed fully or at all. It happens rarely but with thousands of sites using our software it's an issue we see every time we publish a new release.
This will usually manifest itself with an error similar to:
Class 'FOF40\Container\Container' not found
There is a way to work around this.
fof
extracted from the archive. Rename it to fof40
.fof40
folder into your site's libraries
folder so now you have a libraries/fof40
folder. If there was already a folder by that name, overwrite it.After doing that you may have to clear your server's PHP opcode cache (opcache) per the PHP opcache section in this reply.
Our software released between 2017 and February 2021 inclusive was using version 1 of our FEF frontend framework. Software released on and after March 2nd, 2021 is using version 2 of the framework.
There's an issue with Joomla which happens rarely and which results in Joomla not replacing all of the files when performing an update.
You can verify this is the case by opening the file media/fef/fef.php and checking if the line
public static function loadCSSFramework(bool $withReset = true, bool $dark = false)
is present in the file. If not, you've been hit by this Joomla issue and need to work around it manually.
media/fef
folder, overwriting existing files and folders by the same name.After doing that you may have to clear your server's PHP opcode cache (opcache) per the PHP opcode section in this reply.
This only applies if you have problems in the frontend of your site, you are using one of our extensions with a frontend part (e.g. Akeeba Ticket System, LoginGuard etc) and you have done template overrides to style it.
Please note that the new versions of our software may have changed the view template files you used to create your template overrides or changed their names. Please review your template overrides. This is especially important when you are upgrading to a new minor or major release of our software, i.e. the first or digit before the second or first dot in the version number respectively has changed compared to the previous version of our software you had installed on your site.
Davide Tampellini
Developer and Support Staff
🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!
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!