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 to 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/

Stack trace:

#0 /var/www/html/ojs/plugins/importexport/crossref/filter/ array_keys(NULL)

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

#2 /var/www/html/ojs/plugins/importexport/crossref/filter/ ArticleCrossrefXmlFilter->createJournalNode(Object(DOMDocument), Object(Submission))

#3 /var/www/html/ojs/lib/pkp/classes/filter/ IssueCrossrefXmlFilter->process(Array)

#4 /var/www/html/ojs/classes/plugins/ Filter->execute(Array, true)

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

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

#7 /var/www/html/ojs/classes/plugins/ PubObjectsExportPlugin->display(Array, Object(Request))

#8 /var/www/html/ojs/lib/pkp/pages/management/ DOIPubIdExportPlugin->display(Array, Object(Request))

#9 /var/www/html/ojs/lib/pkp/classes/core/ PKPToolsHandler->importexport(Array, Object(Request))

#10 /var/www/html/ojs/lib/pkp/classes/core/ PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)

#11 /var/www/html/ojs/lib/pkp/classes/core/ PKPPageRouter->route(Object(Request))

#12 /var/www/html/ojs/lib/pkp/classes/core/ 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/ on line 182

What application are you using?
On a test install, we downgraded to PHP 7.4 with OJS, 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).

Alec Smecher
Public Knowledge Project Team

1 Like

Thanks. We will apply the patch.

1 Like