CrossRef XML Export Plugin errors after upgrade to PHP 8.0.30

Describe the issue or problem
We just upgraded both OJS and PHP, and after the upgrade, the CrossRef XML Export Plugin is not fully functional. The plugin is working for some journals, and even within a single journal, it works with certain articles but not others.

We upgraded from OJS 3.3.0.14 to 3.3.0.16 and at the same time from PHP 7.3 to 8.0.30.

Steps I took leading up to the issue

  1. Go to CrossRef XML Export Plugin, Articles tab
  2. Select an article to deposit, click Deposit
  3. A blank “This page isn’t working”, HTTP Error 500 page comes up
  4. The error log shows the following:

[01-Feb-2024 09:58:31 Europe/Stockholm] PHP Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /var/www/html/ojs/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php:182

Stack trace:

#0 /var/www/html/ojs/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php(182): array_keys(NULL)

#1 /var/www/html/ojs/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php(49): ArticleCrossrefXmlFilter->createJournalArticleNode(Object(DOMDocument), Object(Submission))

#2 /var/www/html/ojs/plugins/importexport/crossref/filter/IssueCrossrefXmlFilter.inc.php(67): ArticleCrossrefXmlFilter->createJournalNode(Object(DOMDocument), Object(Submission))

#3 /var/www/html/ojs/lib/pkp/classes/filter/Filter.inc.php(449): IssueCrossrefXmlFilter->process(Array)

#4 /var/www/html/ojs/classes/plugins/PubObjectsExportPlugin.inc.php(391): Filter->execute(Array, true)

#5 /var/www/html/ojs/plugins/importexport/crossref/CrossRefExportPlugin.inc.php(214): PubObjectsExportPlugin->exportXML(Array, ‘article=>crossr…’, Object(Journal), true)

#6 /var/www/html/ojs/classes/plugins/PubObjectsExportPlugin.inc.php(171): CrossRefExportPlugin->executeExportAction(Object(Request), Array, ‘article=>crossr…’, ‘exportSubmissio…’, ‘articles’, true)

#7 /var/www/html/ojs/classes/plugins/DOIPubIdExportPlugin.inc.php(29): PubObjectsExportPlugin->display(Array, Object(Request))

#8 /var/www/html/ojs/lib/pkp/pages/management/PKPToolsHandler.inc.php(94): DOIPubIdExportPlugin->display(Array, Object(Request))

#9 /var/www/html/ojs/lib/pkp/classes/core/PKPRouter.inc.php(397): PKPToolsHandler->importexport(Array, Object(Request))

#10 /var/www/html/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)

#11 /var/www/html/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route(Object(Request))

#12 /var/www/html/ojs/lib/pkp/classes/core/PKPApplication.inc.php(360): Dispatcher->dispatch(Object(Request))

#13 /var/www/html/ojs/index.php(68): PKPApplication->execute()

#14 {main}

thrown in /var/www/html/ojs/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php on line 182

What application are you using?
On a test install, we downgraded to PHP 7.4 with OJS 3.3.0.16, and the plugin worked as expected. We need it to work with PHP 8.0, however.

We have the same problem with PHP 8

Hi @jhennig and @Ramfra,

This is CrossRef export fails with PHP8.2 when submission has no abstract · Issue #9775 · pkp/pkp-lib · GitHub, which has already been fixed in OJS 3.3.0-18 (and 3.4.0-5).

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes

Thanks. We will apply the patch. https://github.com/pkp/ojs/commit/462943b7fb227975b857d1e84b246e751dd49148.diff

1 Like