Support

Akeeba Backup for Joomla!

#39894 Symfony\Component\ErrorHandler\Error\ClassNotFoundError

Posted in ‘Akeeba Backup 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.0.0
PHP version
8.2.12
Akeeba Backup version
9.8.3

Latest post by tampe125 on Wednesday, 29 November 2023 02:49 CST

Internetty66

Hey there,

we are facing backup errors since we have upgraded several of our Joomla sites from Release 4.4.0 to 5.0.0.

This is the case for all of those backups scheduled with a cron job running every night and being uploaded to our external storage space Google Drive.

I have enabled the email notification in case of errors and in the email the error is always starting with same 'Symfony\Component\ErrorHandler\Error\ClassNotFoundError' .....while the details are obviously different for every site - so I am referencing only one example here from one of our Joomla 5.0.0. sites:

 

Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#776
  #message: """
    Attempted to load class "JFactory" from the global namespace.\n
    Did you forget a "use" statement?
    """
  #code: 0
  #file: "/var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/plugins/system/payplans/payplans.php"
  #line: 14
  trace: {
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/plugins/system/payplans/payplans.php:14 {
      require_once
      › 
      › $app = JFactory::getApplication();
      › // Do not proceed if this is on CLI environment
    }
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/src/Extension/ExtensionManagerTrait.php:217 { …}
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/src/Extension/ExtensionManagerTrait.php:160 { …}
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/src/Extension/ExtensionManagerTrait.php:99{ …}
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/src/Plugin/PluginHelper.php:232 { …}
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/src/Plugin/PluginHelper.php:192 { …}
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/libraries/src/Application/ConsoleApplication.php:255 { …}
    /var/www/vhosts/kulturforum-freiburg.info/entwicklung.kulturforum-freiburg.info/cli/joomla.php:77 { …}
  }
}

 

The interesting thing is that I can launch the backup in backend on Akeeba directly without any issues and it completed without alerts.

So I am attaching the logfiles for backend and the one for command line from last night.

As stated all command line backups have been running and completing without any issues and errors before Joomla 5.0.0 upgrades. We did not change anything on the cron jobs.

All backups for our remaining Joomla 4.4.0 and 3.x.x. sites are still running fine.

 

Regards

Markus

 

tampe125
Akeeba Staff

Hello,

the problem is caused by Joomla itself. In Joomla 5, several classes have been removed, however they developed a compatibility plugin that should take care to intercept the calls to these removed classes and re-routed to the correct ones, so extensions working with Joomla 4 will continue working in Joomla 5.

Sadly, this compatibility plugin is not loaded when you run command from the CLI, hence the error. Joomla is supposed to fix this issue in the next version, but there isn't a schedule for it, I can only see that they just created a "release candidate" version, so it should be pretty soon.

The only solution is to trigger your backups using the frontend feature, since in that case the plugin is loaded and everything works as it should.

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!

Internetty66

Hi there,

thanks so much for the information and technical details.

Very much appreciated.

Hopefully the Joomla team will release this revised version of the plugin soon.

So in the meantime I am going to manage the backup process manually.

Are you going to keep me informed about the availability of this plugin within the ticket or do you have a reference page/URL I could

monitor for this ?

Thanks and best regards

Markus

tampe125
Akeeba Staff

Yesterday they released version 5.0.1, can you please double check if the fix was included in that version?

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!

Internetty66

hi Davide,

I did upgrade one of our sites to Joomla 5.0.1 yesterday late evening and just got the cron job email notification for the Akeeba job and now all is fine.

This is great news ….and I am going to perform the upgrade on all other sites now.

Cheers Markus

tampe125
Akeeba Staff

Thank you for the update!

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!

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!