Harvesting OJS3 with OAI-NLM


There seems to be a problem when we try to harvest our OJS intstance with this kind of query:


Page is blank and we can see in Apache logs these error message:

PHP Parse error:  syntax error, unexpected ')' in /var/www/html/mydomain/plugins/oaiMetadataFormats/nlm/OAIMetadataFormat_NLM.inc.php(206) : runtime-created function on line 1
 PHP Warning:  usort() expects parameter 2 to be a valid callback, no array or string given in /var/www/html/mydomain/plugins/oaiMetadataFormats/nlm/OAIMetadataFormat_NLM.inc.php on line 206
PHP Fatal error:  Call to undefined method ArticleGalley::getFilePath() in /var/www/html/mydomain/lib/pkp/classes/search/SearchFileParser.inc.php on line 101

This type of query is OK:


And return OAI-PMH DC. In fact, all other metadata formats works but not the NLM one.

Any idea ?




Hi @pnault,

That plugin hasn’t been rewritten for OJS 3.x, and is currently broken. I’ve filed an issue for this at Rewrite OAI NLM plugin for OJS 3.x · Issue #2358 · pkp/pkp-lib · GitHub, and until that
gets attention, have removed it from the build.

It never generated particularly good NLM XML in OJS 2.x, because OJS doesn’t have access to sufficient semantically rich information about the documents it handles. If you’re interested in producing JATS XML, you might look at Open Typesetting Stack.

Alec Smecher
Public Knowledge Project Team