[Solved] OAI show no records on OJS 3.2 in all journals

We are running OJS 3.2.1.0 (upgraded from 3.1.1.1 about a month ago), with PHP 7.2 and MySQL 5.
We recently found that the OAI ListRecords and ListIdentifiers verbs show no records at all (Error Code noRecordsMatch - No matching records in this repository). However, other OAI verbs such as Identify and ListSets work correctly.
As far as I can see, this is happening in all our journals under the same OJS installation (about 30 journals). I don’t see any particular error in the server logs, just a few minor PHP warnings that don’t seem to be related to this issue:

[Wed May 22 12:27:37.398724 2019] [:error] [pid 31788] [client 46.229.168.140:53126] FastCGI: server "/usr/lib/cgi-bin/php7-fcgi-revistas-ssl" stderr: PHP message: PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /var/www/ojs/plugins/generic/driver/DRIVERDAO.inc.php on line 19 [Wed May 22 12:27:37.398742 2019] [:error] [pid 31788] [client 46.229.168.140:53126] FastCGI: server "/usr/lib/cgi-bin/php7-fcgi-revistas-ssl" stderr: PHP message: PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/ojs/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0 [Wed May 22 12:27:37.699166 2019] [:error] [pid 31875] [client 163.10.34.225:57926] FastCGI: server "/usr/lib/cgi-bin/php7-fcgi-revistas-ssl" stderr: PHP message: PHP Warning: Declaration of AddThisPlugin::register($category, $path) should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in /var/www/ojs/plugins/generic/addThis/AddThisPlugin.inc.php on line 0 [Wed May 22 12:27:37.699206 2019] [:error] [pid 31875] [client 163.10.34.225:57926] FastCGI: server "/usr/lib/cgi-bin/php7-fcgi-revistas-ssl" stderr: PHP message: PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/ojs/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 0 [Wed May 22 12:27:37.699213 2019] [:error] [pid 31875] [client 163.10.34.225:57926] FastCGI: server "/usr/lib/cgi-bin/php7-fcgi-revistas-ssl" stderr: PHP message: PHP Warning: Declaration of JournalOAI::sets($offset, $limit, &$total) should be compatible with OAI::sets($offset, &$total) in /var/www/ojs/classes/oai/ojs/JournalOAI.inc.php on line 22

OAI settings in config.inc.php have nothing special:

oai = On
repository_id = revistas.unlp.edu.ar
oai_max_records = 100

We tried activating/deactivating the DRIVER plugin, and nothing changed.
We double-checked that publishingMode is 0 in journal_settings for all journals.

I am not sure if this stopped working after the last upgrade, of this problem has been around for a few months. However, OAI interface used to work correctly.

Where else can I look for errors? I am out of ideas.
Thanks in advance for any hint!

Hi @gonetil

Can you confirm some of your version numbers? Did you perhaps mean 3.1.2?

your journal here is running 3.1.1.2 according to the Identify verb. I was able to retrieve a record set:

https://perio.unlp.edu.ar/ojs/index.php/actas/oai?verb=ListRecords&metadataPrefix=oai_dc

Cheers,
Jason

Thanks for replying @jnugent
You are right, our version is actually 3.1.2.0 (April 10, 2019 - 10:42 AM).
However, you accessed a different OJS installation, the one from UNLP’s Journalism College. Some colleges in UNLP have their own OJS installation (there are 4 indeed). And there is an OJS installation for all de parties (colleges, departments, institutes, etc.) that don’t belong to those colleges. This OJS, located at https://revistas.unlp.edu.ar/index, is the one with OAI problems.
Some journals you might want to try:

Thanks again for your help.

Ah! In 3.1.2 there’s a new option that must be enabled. In your journal, go to Settings -> Distribution and check the box that says “enable OAI access to content”

Cheers,
Jason

3 Likes

Thanks man, that was it! I can’t believe I spent 3 days looking for an error that wasn’t one.
I don’t remember if the upgrade tool warned me about this, but I think there should be a big alert after the upgrade was completed. Or at least, set this by default in true if OAI is enabled in config.inc.php .

Thanks again, we are back in the OAI world (?)
Gonzalo

2 Likes

Hi all,

Sorry, this was a bug in OJS 3.1.2-0 where the new setting was introduced, but not enabled by default (to mimic past behavior). Starting with OJS 3.1.2-1 (to be released soon) the proper upgrade behavior will be introduced, but of course if you’ve already gone to 3.1.2-0 you’ll have to check it yourself. (We can’t assume at that point that it wasn’t unchecked on purpose.)

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like