ActionLogPlugin.php causes Akeeba Cron Backup to...

Search
Other Bug Reports questions
Forum

ActionLogPlugin.php causes Akeeba Cron Backup to fail?

Kip's Avatar Kip
Hi Peter,

I ran into a problem running Akeeba's backup from a cronjob. I'm not sure why Regular Labs is involved, but the cron reports this each time:
ParseError {#602
  #message: "syntax error, unexpected '='"
  #code: 0
  #file: "./www/{mywebsite}.com/public_html/libraries/regularlabs/src/ActionLogPlugin.php"
  #line: 283
  trace: {
    ./www/{mywebsite}.com/public_html/libraries/regularlabs/src/ActionLogPlugin.php:283 {
      Composer\Autoload\includeFile($file)
      › 
      › $type  ??= self::$item_types[$extension] ?? 'item';
      › $title = self::$item_titles[$extension] ?? JText::_($extension) . ' ' . JText::_('RL_ITEM');
    }

I asked Nick at Akeeba about it, and this is his response:
if the following line is correct, that's the source of the error:
$type ??= self::$item_types[$extension] ?? 'item';
There isn't a ??= operator, this is why you're getting a fatal error. You should get in touch with the developers and report the problem. I'd suggest to try to update the extension, since this seems a simple typo, so maybe they already fixed it.

I'm using version 9.5.7 of the Action Log Plugin and running Joomla 4.2.7.

I'd fix it temporarily but I'm still not sure of the proper syntax, and you should know anyway. Hope this makes sense.

Thanks!
Kip
Peter van Westen's Avatar Peter van Westen ADMIN
What php version are you running on?
Did you downgrade to php 5.6?
Please post a rating at the Joomla! Extensions Directory
Kip's Avatar Kip
The site is running PHP 8.0.27, but based on your response I had another conversation with the host. Apparently my path in the cronjob was directed to the PHP CLI executable for PHP 7.3. After I changed that to PHP 8, it worked perfectly.

Sorry I bothered you with this; I had no idea that disparity existed, nor that it could cause that kind of an error.

Thanks for the response!
Peter van Westen's Avatar Peter van Westen ADMIN
Not sure what host you are using, but you should not be using PHP 7.3 or 8.0!
If you want to use PHP 7, use PHP 7.4
And for PHP 8, use PHP 8.1
Please post a rating at the Joomla! Extensions Directory
Kip's Avatar Kip
All right, Peter! Thanks, I'll make the plunge to 8.1.
Kip's Avatar Kip
...and after having done that, I received a large number of PHP errors on the Joomla 4 administrative Home Dashboard of a brand new Joomla 4 site. I switched back to PHP 8.0. As of this date, joomla.org recommends Joomla 8.0: downloads.joomla.org/us/technical-requirements-us .
You can only post on this forum if you log in