- Posts: 9
- Thank you received: 1
mojo_redirect
2 years 6 months ago #360434
by bvitl
mojo_redirect was created by bvitl
-- HikaShop version -- : 5.0.4
-- Joomla version -- : 4.4.4
-- PHP version -- : 8.1
When click on "System" in Admin panel in eror log php we have:
[19-Apr-2024 14:45:42] WARNING: [pool www] child 417442 said into stderr: "NOTICE: PHP message: PHP Warning: Trying to access array offset on value of type null in /var/www/site/administrator/components/com_installer/src/Model/DatabaseModel.php on line 180"
I found a problem with pkg mojo_redirect.
If you create a folder sql/updates in the /plugins/system/mijo_redirect folder
then a WARNING is not logged.
-- Joomla version -- : 4.4.4
-- PHP version -- : 8.1
When click on "System" in Admin panel in eror log php we have:
[19-Apr-2024 14:45:42] WARNING: [pool www] child 417442 said into stderr: "NOTICE: PHP message: PHP Warning: Trying to access array offset on value of type null in /var/www/site/administrator/components/com_installer/src/Model/DatabaseModel.php on line 180"
I found a problem with pkg mojo_redirect.
If you create a folder sql/updates in the /plugins/system/mijo_redirect folder
then a WARNING is not logged.
Please Log in or Create an account to join the conversation.
2 years 6 months ago - 2 years 6 months ago #360437
by nicolas
Replied by nicolas on topic mojo_redirect
Hi,
Thank you for you feedback. The problem is actually in the administrator/components/com_installer/src/Model/DatabaseModel.php file.
The code
assumes that any extension installed has either a sql/updates folder or a schemas node in the XML file of the extension.
This mijo_redirect plugin adds nothing to the database, so it doesn't requires a sql/updates folder nor a schemas node in the XML file.
The Joomla documentation on how to create a plugin for Joomla 4 also doesn't mention anything about this:
docs.joomla.org/J4.x:Creating_a_Plugin_for_Joomla
So it's actually the file administrator/components/com_installer/src/Model/DatabaseModel.php which needs to be modified.
The line
just before the line of the notice should be changed to something like this :
I would recommend reporting the issue on Joomla's github:
github.com/joomla/joomla-cms/issues
Thank you for you feedback. The problem is actually in the administrator/components/com_installer/src/Model/DatabaseModel.php file.
The code
Code:
$folderTmp = (string) $installationXML->update->schemas->schemapath[0];
This mijo_redirect plugin adds nothing to the database, so it doesn't requires a sql/updates folder nor a schemas node in the XML file.
The Joomla documentation on how to create a plugin for Joomla 4 also doesn't mention anything about this:
docs.joomla.org/J4.x:Creating_a_Plugin_for_Joomla
So it's actually the file administrator/components/com_installer/src/Model/DatabaseModel.php which needs to be modified.
The line
Code:
if ($installationXML !== null) {
Code:
if ($installationXML !== null && isset($installationXML->update->schemas->schemapath)) {
I would recommend reporting the issue on Joomla's github:
github.com/joomla/joomla-cms/issues
Last edit: 2 years 6 months ago by nicolas.
The following user(s) said Thank You: bvitl
Please Log in or Create an account to join the conversation.
2 years 6 months ago #360447
by bvitl
Replied by bvitl on topic mojo_redirect
I now uninstalled the plugin and remove folders sql/updates and then reinstalled it.
WARNING is not logged also.
WARNING is not logged also.
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds