OJS 3.1 Crossref failed with Uncaught Error: Call to a member function getGenreId() on null

Hi I have tried to use the Crossref XML plugin, and when I select an article and press Download XML button i got a error page in the brower. I have reviewed my PHP logs and this is the message:

[03-Sep-2018 22:08:48 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getGenreId() on null in /var/www/html/ojs3/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php:187
Stack trace:
#0 /var/www/html/ojs3/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php(49): ArticleCrossrefXmlFilter->createJournalArticleNode(Object(DOMDocument), Object(PublishedArticle))
#1 /var/www/html/ojs3/plugins/importexport/crossref/filter/IssueCrossrefXmlFilter.inc.php(67): ArticleCrossrefXmlFilter->createJournalNode(Object(DOMDocument), Object(PublishedArticle))
#2 /var/www/html/ojs3/lib/pkp/classes/filter/Filter.inc.php(449): IssueCrossrefXmlFilter->process(Array)
#3 /var/www/html/ojs3/classes/plugins/PubObjectsExportPlugin.inc.php(347): Filter->execute(Array, true)
#4 /var/www/html/ojs3/classes/plugins/PubObjectsExportPlugin.inc.php(180): PubObjectsExportPlugin->exportXML(Array, 'article=>crossr...', Object(Journal), false)
#5 /var/www/html/ojs3/plugins/importexport/crossref/CrossRefExportPlugin.inc.php(162): PubObjectsExp in /var/www/html/ojs3/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php on line 187

Someone may help me to resolve this trouble?

i have the same problem now.

any solution for this?

Hi all,

What is the exact version of OJS you’re using when you experience this problem?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

I have the same issue in my OJS 3.1.0.1.

Regards
Ghazal

I looked up the newer version and there is already a check for null which will fix this. Thanks.