Describe the issue or problem
We use the Matomo plugin for several journals on our multi-journal installation. After upgrading PHP from 7.4.33 to 8.0.30, we can no longer access the settings for the plugin.
Steps I took leading up to the issue
Go to Matomo plugin under Installed plugins.
Click on Settings.
The system throws this error: Failed Ajax request or invalid JSON returned.
The plugin appears to be working for journals that previously had it enabled (before we upgraded PHP), but since we cannot access the settings, we can’t properly enable it for new journals.
In our test installation, we tried downgrading to PHP 7.4.33 and the plugin’s settings were then accessible again.
What application are you using?
OJS 3.3.0-19
PHP 8.0.30
Additional information
This is an excerpt from the PHP logs that our IT dept. thought might be relevant:
[03-Dec-2024 14:02:35 Europe/Stockholm] PHP Warning: Declaration of PiwikSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/html/ojs/plugins/generic/piwik/PiwikSettingsForm.inc.php on line 65
[03-Dec-2024 14:02:35 Europe/Stockholm] PHP Warning: Declaration of PiwikSettingsForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/html/ojs/plugins/generic/piwik/PiwikSettingsForm.inc.php on line 74
We have a new release available now for the Matomo plugin in the plugin gallery that should resolve this for you - can you try updating the plugin (in Settings > Website > Plugins > Plugin Gallery) and see if things work for you now in PHP 8?
Thank you so much for the quick work on this! We updated the plugin via the plugin gallery but are still getting the same error when we try to access the settings.
The PHP logs show the following:
[12-Dec-2024 15:37:22 Europe/Stockholm] PHP Fatal error: Declaration of PiwikSettingsForm::fetch($request) must be compatible with Form::fetch($request, $template = null, $display = false) in /var/www/html/ojs/plugins/generic/piwik/PiwikSettingsForm.inc.php on line 65
Hi @Ramfra, apologies for the delay. Can you confirm you have the correct version of the plugin installed? One way to check is your database versions table, e.g. with the following query:
SELECT * FROM versions WHERE product = 'piwik';
We’re looking for version 1.0.4-1 to be installed for this fix.