DataCiteExport plugin: error when using PHP 8.1.14

Describe the issue or problem
We updated php to 8.1.14, using OJS 3.3.0.8.
When exporting articles using the DataCiteExport plugin, we get a blank screen and the following error message in the log:

PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /var/www/html/plugins/importexport/datacite/filter/DataciteXmlFilter.inc.php:173\nStack trace:\n#0 /var/www/html/plugins/importexport/datacite/filter/DataciteXmlFilter.inc.php(173): array_merge()\n#1 /var/www/html/lib/pkp/classes/filter/Filter.inc.php(449): DataciteXmlFilter->process()\n#2 /var/www/html/classes/plugins/PubObjectsExportPlugin.inc.php(391): Filter->execute()\n#3 /var/www/html/plugins/importexport/datacite/DataciteExportPlugin.inc.php(110): PubObjectsExportPlugin->exportXML()\n#4 /var/www/html/classes/plugins/PubObjectsExportPlugin.inc.php(171): DataciteExportPlugin->executeExportAction()\n#5 /var/www/html/classes/plugins/DOIPubIdExportPlugin.inc.php(29): PubObjectsExportPlugin->display()\n#6 /var/www/html/lib/pkp/pages/management/PKPToolsHandler.inc.php(94): DOIPubIdExportPlugin->display()\n#7 /var/www/html/lib/pkp/classes/core/PKPRouter.inc.php(395): PKPToolsHandler->importexport()\n#8 /var/www/html/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()\n#9 /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()\n#10 /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()\n#11 /var/www/html/index.php(67): PKPApplication->execute()\n#12 {main}\n thrown in /var/www/html/plugins/importexport/datacite/filter/DataciteXmlFilter.inc.php on line 173, referer: https://test.com/ojstest/management/importexport/plugin/DataciteExportPlugin

Steps I took leading up to the issue

  1. Go to ‘Tools’/‘DataCite Export/Registration Plugin’
  2. Click on the ‘Articles’ tab
  3. Select articles to export
  4. Click ‘Export’ button
  5. Blank Screen

What application are you using?
OJS 3.3.0.8

Can this be confirmed? Is this maybe already solved in a later OJS version?

Yours,

Felix

Hum… just tested and I get the same exact error in OJS 3.3.0.13 with PHP 8.0.26

[26-Jan-2023 17:51:08 UTC] PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /apps/ojs/dev/ojs-3.3.0-13/plugins/importexport/datacite/filter/DataciteXmlFilter.inc.php:173
Stack trace:
#0 /apps/ojs/dev/ojs-3.3.0-13/plugins/importexport/datacite/filter/DataciteXmlFilter.inc.php(173): array_merge()
#1 /apps/ojs/dev/ojs-3.3.0-13/lib/pkp/classes/filter/Filter.inc.php(449): DataciteXmlFilter->process()
#2 /apps/ojs/dev/ojs-3.3.0-13/classes/plugins/PubObjectsExportPlugin.inc.php(391): Filter->execute()
#3 /apps/ojs/dev/ojs-3.3.0-13/plugins/importexport/datacite/DataciteExportPlugin.inc.php(110): PubObjectsExportPlugin->exportXML()
#4 /apps/ojs/dev/ojs-3.3.0-13/classes/plugins/PubObjectsExportPlugin.inc.php(171): DataciteExportPlugin->executeExportAction()
#5 /apps/ojs/dev/ojs-3.3.0-13/classes/plugins/DOIPubIdExportPlugin.inc.php(29): PubObjectsExportPlugin->display()
#6 /apps/ojs/dev/ojs-3.3.0-13/lib/pkp/pages/management/PKPToolsHandler.inc.php(94): DOIPubIdExportPlugin->display()
#7 /apps/ojs/dev/ojs-3.3.0-13/lib/pkp/classes/core/PKPRouter.inc.php(395): PKPToolsHandler->importexport()
#8 /apps/ojs/dev/ojs-3.3.0-13/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest()
#9 /apps/ojs/dev/ojs-3.3.0-13/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route()
#10 /apps/ojs/dev/ojs-3.3.0-13/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch()
#11 /apps/ojs/dev/ojs-3.3.0-13/index.php(68): PKPApplication->execute()
#12 {main}
  thrown in /apps/ojs/dev/ojs-3.3.0-13/plugins/importexport/datacite/filter/DataciteXmlFilter.inc.php on line 173

Marie-Hélène

Hi all,

Thanks for reporting and confirming! I’ve filed and fixed the issue here:

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

This topic was automatically closed after 10 days. New replies are no longer allowed.