DATACITE plugin OJS 2.4.8.1 blank pages

Hi, since the upgrade to latest OJS 2.4 version I am no longer able to mint DOI’s using the DATACITE plugin with the exception of issues.
The export page offers you the possibility to

Export all unregistered issues, articles and galleys
Export issues
Export articles
Export galleys
Export supplementary files

From these five options only the export issues options works. All other links result in a blank page.

This is what my server’s log is telling me after I get a blank page:

[Sat Dec 17 18:19:52.927693 2016] [:error] [pid 2252] [client 82.95.72.36:56553] ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /Library/Server/Web/Data/Sites/Default/plugins/importexport/datacite/classes/PubObjectCache.inc.php\n At line: 79\n Stacktrace: \n Server info:\n OS: Darwin\n PHP Version: 5.5.27\n Apache Version: Apache\n DB Driver: mysql\n DB server version: 5.6.10, referer: http://www.removed-website-name.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin
[Sat Dec 17 18:19:52.927834 2016] [:error] [pid 2252] [client 82.95.72.36:56553] NOTICE: Undefined offset: 3 (/Library/Server/Web/Data/Sites/Default/plugins/importexport/datacite/classes/PubObjectCache.inc.php:81), referer: http://www.removed-website-name.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin
[Sat Dec 17 18:19:52.927861 2016] [:error] [pid 2252] [client 82.95.72.36:56553] PHP Fatal error: Call to a member function getPublished() on a non-object in /Library/Server/Web/Data/Sites/Default/plugins/importexport/crossref/classes/DOIExportPlugin.inc.php on line 549, referer: http://www.removed-website-name.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin

I like to hear how to repair this.

It sounds like you have a published article which is not bound to an issue. This creates an unexpected data error can causes the “PHP Fatal error” here:

If you are handy with PHP, you could add a error_log() line just before this to identify which article is causing the problem by logging $article->getId().

If you are comfortable with mysql, you could look at the articles and published_articles tables to find a published_article with a missing issue_id or a an article with a PUBLISHED status, but no published_article entry.

Thanks for the answer. I looked in the mysql database. Some elements were indeed missing like publication dates. But adding these didn’t resolve the issue.
I added the error_log like you said. I hope this was what I had to paste into the file before the line 546:
error_log($article->getId(),0);

Anyway: this is what the error log of my server had to say in return
(please note the log is referring to a ‘crossref’ folder instead of a ‘datacite’ folder. Not sure if this is right or not).

[Tue Jan 03 17:08:13.708503 2017] [:error] [pid 6593] [client 82.95.72.36:60410] 152, referer: http://www.websitename.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin

[Tue Jan 03 17:08:13.712553 2017] [:error] [pid 6593] [client 82.95.72.36:60410] ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /Library/Server/Web/Data/Sites/Default/plugins/importexport/datacite/classes/PubObjectCache.inc.php\n At line: 79\n Stacktrace: \n Server info:\n OS: Darwin\n PHP Version: 5.5.27\n Apache Version: Apache\n DB Driver: mysql\n DB server version: 5.6.10, referer: http://www.websitename.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin

[Tue Jan 03 17:08:13.712596 2017] [:error] [pid 6593] [client 82.95.72.36:60410] NOTICE: Undefined offset: 11 (/Library/Server/Web/Data/Sites/Default/plugins/importexport/datacite/classes/PubObjectCache.inc.php:81), referer: http://www.websitename.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin

[Tue Jan 03 17:08:13.712627 2017] [:error] [pid 6593] [client 82.95.72.36:60410] PHP Fatal error: Call to a member function getPublished() on a non-object in /Library/Server/Web/Data/Sites/Default/plugins/importexport/crossref/classes/DOIExportPlugin.inc.php on line 550, referer: http://www.websitename.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin

Hi @Franklinx

And could you maybe find any of the issues @ctgraham mentioned:

If you are comfortable with mysql, you could look at the articles and published_articles tables to find a published_article with a missing issue_id or a an article with a PUBLISHED status, but no published_article entry.
?

Best!
Bozana

Hello Bozana,
Yes, I did look at the articles and published_articles tables. All published_articles do have an issue_id. The articles table is more complex. There are about 1000 articles and they all have a published (or ‘3’) status.

It would help to know which column I have to check or to compare.
If I need to copy some code in a php file, then it would also help to get a clear instruction: copy ‘this’ and past it on line ‘that’. I am not THAT much of an expert :wink:

Once more: exporting the DOI’s for issues works fine. All other exporting options result in a white page. This is the error triggered by “Export all unregistered issues, articles and galleys”:

[Thu Jan 05 00:17:56.581288 2017] [:error] [pid 95389] [client 82.95.72.36:65249] ojs2 has produced an error\n Message: WARNING: assert(): Assertion failed\n In file: /Library/Server/Web/Data/Sites/Default/plugins/importexport/datacite/classes/PubObjectCache.inc.php\n At line: 79\n Stacktrace: \n Server info:\n OS: Darwin\n PHP Version: 5.5.27\n Apache Version: Apache\n DB Driver: mysql\n DB server version: 5.6.10, referer: http://www.websitename.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin
[Thu Jan 05 00:17:56.581412 2017] [:error] [pid 95389] [client 82.95.72.36:65249] NOTICE: Undefined offset: 9 (/Library/Server/Web/Data/Sites/Default/plugins/importexport/datacite/classes/PubObjectCache.inc.php:81), referer: http://www.websitename.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin
[Thu Jan 05 00:17:56.581427 2017] [:error] [pid 95389] [client 82.95.72.36:65249] PHP Fatal error: Call to a member function getPublished() on a non-object in /Library/Server/Web/Data/Sites/Default/plugins/importexport/crossref/classes/DOIExportPlugin.inc.php on line 1300, referer: http://www.websitename.com/index.php/pb/manager/importexport/plugin/DataciteExportPlugin

I suspect there is an article where there is no published_article entry. If you are familiar with SQL, you could use a query to find it:
SELECT article.article_id FROM article WHERE article.status = 3 AND article.article_id NOT IN (SELECT published_article.article_id FROM published_article);

Hi ctgraham, thanks for replying.
I did run the query and found indeed one article with this issue. The problem however persists after removing this orphaned article from the database.
Are there some other queries I could run?

Did you remove the article directly from the database? That is risky. Better would be to navigate to the article within OJS and look for a problem in the metadata… for example, a missing issue assignment.

That aside, I would return to the suggestion of adding something like error_log("Article #".$article->getId()." is missing an Issue"); just before the line referenced by the “PHP Fatal error” message, which it appears is here in your latest log:

Generate the error again and then look in the log to find the article id. Pull up the article in OJS, and look at the publication information. This should show you the problem.

Thanks. It worked. But…

I had to unpublish 25 articles. Played around a bit. Created a new entry for one of the articles through QuickSubmit, added it to the original issue. This resulted in the white page again.

Then I created a new issue, deleted the old one. Imported the 1 article I created earlier. That worked. The problems seems to be with the issue.

Is there any way I can repair the other issues? Or do I need to recreate them as well?

Go to User Home → Editor → Back Issues → (select issue) → Issue Data for both the working and non-working issues. Compare these screens to see if you can spot a difference (the Published Date is missing, perhaps)? If you can find a change worth making on the non-working issue, you won’t need to re-publish each article.

If you can’t find an obvious problem and fix, an alternate approach is to go to each article and reschedule it for the working issue. You then will at least not need to re-upload anything.