PHP Fatal Error when OAI ListRecords query in OJS 3.3.0-6


I am trying OAI protocol queries using:

When I try ListRecords link, the browser shows an HTTP 500 page. Checking the PHP log file, PHP Fatal Warning and Error are shown as:

[18-Jun-2021 22:50:17 America/Guayaquil] PHP Warning: require_once(/var/www/ojs3.3.0.6/plugins/metadata/mods34/filter/ failed to open stream: No existe el fichero o el directorio in /var/www/ojs3.3.0.6/lib/pkp/includes/ on line 25
[18-Jun-2021 22:50:17 America/Guayaquil] PHP Fatal error: require_once(): Failed opening required ‘/var/www/ojs3.3.0.6/plugins/metadata/mods34/filter/’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/ojs3.3.0.6/lib/pkp/includes/ on line 25

The log says that file does not exist, and checking the file system of server, effectivelly the no file nor “…/mods34/…” directory exist. Instead of this, there is a file named in the directory “…/dcll/…”

Anyidea to solve this problem is wellcome. Thanks!

Hi @jlrapter,

Thanks for providing the error log info. Was this a recent upgrade? And did this only start happening when it was upgraded to 3.3? This may be happening because the plugins are not up-to-date.

Could you check which versions of the OAI related plugin’s you’re using and if they should be upgraded? There are likely compatibility breaks for the plugins between different OJS versions.


PKP Team

Hello @ewhanson , thanks for your attention:

I checked the versions of three plugins related to OAI protocol. These are:

OAI JATS Plugin Version
OpenAire Plugin 2.0 Version
DRIVER Version

Plugins are updated but currently, and based on your query, I checked that the first version of OJS I installed was 3.2. The backup of this version contains the directory and files for “mods34” and the version 3.3 does not contain it. So, I copy such a folder from backup to new version installed, and it works resolving the initial problem.

However, another error HTTP 500 is got when a ListRecords JATS is quieried.

Hi @jlrapter,

If this is related to JATS specifically, do you have the JATS Template Plugin installed? This is required to prepare the JATS for use with the OAI JATS plugin.

If that doesn’t fix it, could you see what the server logs are showing when you are getting the 500 error when ListRecords JATS is queried?


PKP Team

Hi @ewhanson ,

Yes, I have installed both JATS Template Plugin and OAI JATS plugin.

Logs for this issue are a bit complex for my understanding:

[29-Jun-2021 16:10:50 America/Guayaquil] PHP Warning: file_get_contents(journals/1/articles/19/6033701910833.html): failed to open stream: No existe el fichero o el directorio in /var/www/ojs3.3.0.6/plugins/generic/jatsTemplate/ on line 248
[29-Jun-2021 16:10:50 America/Guayaquil] PHP Warning: DOMDocument::createTextNode() expects parameter 1 to be string, array given in /var/www/ojs3.3.0.6/plugins/oaiMetadataFormats/oaiJats/ on line 249
[29-Jun-2021 16:10:50 America/Guayaquil] PHP Fatal error: Uncaught TypeError: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, null given in /var/www/ojs3.3.0.6/plugins/oaiMetadataFormats/oaiJats/
Stack trace:
#0 /var/www/ojs3.3.0.6/plugins/oaiMetadataFormats/oaiJats/ DOMNode->appendChild(NULL)
#1 /var/www/ojs3.3.0.6/plugins/oaiMetadataFormats/oaiJats/ OAIMetadataFormat_JATS->_mungeMetadata(Object(DOMDocument), Object(Journal), Object(Submission), Object(Section), Object(Issue))
#2 /var/www/ojs3.3.0.6/lib/pkp/classes/oai/ OAIMetadataFormat_JATS->toXml(Object(OAIRecord))
#3 /var/www/ojs3.3.0.6/lib/pkp/classes/oai/ OAI->formatMetadata(‘jats’, Object(OAIRecord))
#4 /var/www/ojs3.3.0.6/lib/pkp/classes/oai/ OAI->ListRecords()
#5 /var/www/ojs3.3.0.6/pages/oai/ OAI->execute()
#6 /var/www/ojs3.3.0.6/lib/pkp/classes/core/ OAIHandler->index(Array, Obje in /var/www/ojs3.3.0.6/plugins/oaiMetadataFormats/oaiJats/ on line 250

Any idea about it?


Hi @jlrapter,

From what I can see, $article->getTitle($article->getLocale()) on line 249 is getting an array for some reason when it should be fetching the title as a string. It looks like this causes the creation of $articleTitleText to fail, which in turn, causes appendChild to fail as the $articleTitleText text node was null.

I don’t know what might be causing this, but checking what’s happening on your OJS instance when a localized title is fetched for an article may help pin down the issue. If this is only happening for specific articles, it may also be worthwhile seeing if there’s anything strange going on with the titles for those particular articles.


PKP Team