RL ActionLogPlugin throws error in J4 command line

Search
Other Bug Reports questions
Forum

RL ActionLogPlugin throws error in J4 command line

Joris Lange's Avatar Joris Lange
Hi Peter,

I wanted to take a look at the new Joomla CLI interface, and for that aim I created a develop site from a copy of one of our existing sites. This site also features some RL extensions.

When typing the command "php joomla.php list" at the command line prompt I got an error message that pointed at one of the RL extension, see stack tracing below. The prevents any other actions or information. I checked that all extensions are up-to-date and they are indeed.

For my goals at this moment, on a develop site, I solved it by renaming the file that is pointed at. Now I see the list of available commands and I can use the commands as expected. But I would rather not do this on a live site.

So I thought I should let you know,

Kind regards, Frits


----

[root@srv1 cli]# php joomla.php list
ParseError {#928
#message: "syntax error, unexpected '='"
#code: 0
#file: "/path-to-my-site-root/libraries/regularlabs/src/ActionLogPlugin.php"
#line: 283
trace: {
/path-to-my-site-root/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');
}
/path-to-my-site-root/libraries/vendor/composer/ClassLoader.php:428 { …}
/path-to-my-site-root/libraries/src/Autoload/ClassLoader.php:59 { …}
Joomla\CMS\Autoload\ClassLoader->loadClass() {}
spl_autoload_call() {}
/path-to-my-site-root/plugins/actionlog/regularlabsmanager/regularlabsmanager.php:36 { …}
/path-to-my-site-root/libraries/src/Extension/ExtensionManagerTrait.php:214 { …}
/path-to-my-site-root/libraries/src/Extension/ExtensionManagerTrait.php:157 { …}
/path-to-my-site-root/libraries/src/Extension/ExtensionManagerTrait.php:96 { …}
/path-to-my-site-root/libraries/src/Plugin/PluginHelper.php:221 { …}
/path-to-my-site-root/libraries/src/Plugin/PluginHelper.php:181 { …}
/path-to-my-site-root/plugins/system/actionlogs/actionlogs.php:58 { …}
/path-to-my-site-root/libraries/src/Extension/ExtensionManagerTrait.php:234 { …}
/path-to-my-site-root/libraries/src/Extension/ExtensionManagerTrait.php:157 { …}
/path-to-my-site-root/libraries/src/Extension/ExtensionManagerTrait.php:96 { …}
/path-to-my-site-root/libraries/src/Plugin/PluginHelper.php:221 { …}
/path-to-my-site-root/libraries/src/Plugin/PluginHelper.php:181 { …}
/path-to-my-site-root/libraries/src/Application/ConsoleApplication.php:252 { …}
/path-to-my-site-root/cli/joomla.php:76 { …}
}
}

----
Peter van Westen's Avatar Peter van Westen ADMIN
What version of PHP are you running on?
Please post a rating at the Joomla! Extensions Directory
Joris Lange's Avatar Joris Lange
Hi Peter,

Php 8.0.26
Peter van Westen's Avatar Peter van Westen ADMIN
PHP 8.0 has issues and is no longer supported by PHP itself. Try with PHP 8.1.
Please post a rating at the Joomla! Extensions Directory
Joris Lange's Avatar Joris Lange
Hi Peter,

Someone reminded me that the php version as set in the hosting panel is not necessarily the same version that is called with the "php" command in the command line. Indeed it turned out that a much older version was called.

When explicitly calling a recent php version from command line, the error does not appear. And I noticed that it does not appear with 8.0 either.

Kind regards and thanks for your help,

Frits
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, great you found the source of the issue.
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in