we have recently upgraded our OJS platform to the 3.3.0-13 version and everything is working well, except for the Datacite plugin, where the articles’ importexport for DOI registration ends up in a 500 server error.
I checked the whole PHP configuration, and local settings are the same as the previous version. Also the php-curl extension is installed.
I checked the PHP log and I found the following PHP error:
PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in [MY_APP]/plugins/importexport/datacite/filter/DataciteXmlFilter.inc.php:173
Searching with google, I found that “array_merge(): Argument #1 must be of type array, null given…” it is a common error for many CMS (wordpress, joomla, drupal) with the new version of PHP 8.
It seems your journal has submissions returning NULL from the subject metadata related to translation.
I’d suggest enabling the debug option in config.inc.php to dump SQL queries to the browser as they’re executed. It might give further info related to this issue. You will be able to see the query that is returning as null.
we had the opportunity to check with debug, and the error is the following:
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in [ojs_app]/cache/t_compile/2122dd4b4d038d06701b7a5cbc73d21546ea835d_0.app.formtextInput.tpl.php on line 141
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in [ojs_app]/cache/t_compile/2122dd4b4d038d06701b7a5cbc73d21546ea835d_0.app.formtextInput.tpl.php on line 126
Maybe the plugin has to be updated for OJS 3.3.0-13?
P.S. it seems also that another user has a similar problem
This is a typical problem with PHP code written for PHP 7 and lower. When running the application on PHP 8, optional parameters now have to be in a certain order. The solution is to make the code PHP 8 compatible. Or to run your OJS installation on a php version < 8.