Issue with DRIVER Plugin on OJS 3.4.0.X: No Records via OAI Interface

Dear OJS Developers,

I would like to raise an issue that was mentioned in February 2024 on this forum regarding the DRIVER plugin included with OJS version 3.4.0.4. Specifically, the plugin does not generate any records through the OAI interface. Here is the link to that discussion:

It appears that the author of the topic reverted their journal to an older version, OJS 3.2.1.5, the recommendations provided in the aforementioned discussion did not have a positive effect.

This issue also affects my journal, which is running on OJS version 3.4.0.5 (PHP version 8.3.14, Apache version Apache/2.4.62 (Ubuntu), Database driver: MySQL, Database server version: 8.0.40-0ubuntu0.22.04.1). Here is the link:
https://cims.fti.dp.ua/j/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

To ensure that this is not a local issue specific to my journal, I conducted research on various journals operating on OJS version 3.4.0.X.

The conclusion is as follows: the DRIVER plugin does not function properly on any OJS 3.4.0.X installation. Below are the links:

3.4.0.5
https://journal.brajamustipublication.com/index.php/jim/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

3.4.0.3
https://journals.stecab.com/jahss/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

3.4.0.7
https://asidejournals.com/index.php/internal-medicine/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

3.4.0.6
https://societyfisipubb.id/index.php/society/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

3.4.0.5
https://www.merz-zeitschrift.de/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

3.4.0.3
https://bjmis.du.ac.bd/index.php/about/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

3.4.0.6
https://jricst.com/index.php/JRICST/oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

I hope that the developers of the DRIVER plugin will address this issue soon.

Thank you,
Yurii

I can confirm - records are not assigned to the driver set. And there is no indication the PHP error log that something was gone wrong.

@asmecher

The culprit is in the code of DRIVERDAO.php, lines 56-59, ojs/plugins/generic/driver/DRIVERDAO.php at 9371ae1633f9c92978b7ffe5a43ea371ce406fb3 · pkp/ojs · GitHub

This can’t work.

        for ($i = 0; $i < $offset; $i++) {
            if ($result->next()) {
                $total++;
            } // FIXME: This is inefficient

In the initial call, $offset (the offset of the list of records to be displayed) is 0.
So this means that the loop above is not carried out and the position of the ArrayIterator is not set.
var dumps after this loop yield:
$limit = 100
$offset = 0
$total = 0
$result->current() = NULL

Hence, the following loop will not be executed, because the result of $count < $limit && $result->current() is false:

        for ($count = 0; $count < $limit && $result->current(); $count++ && $total++) {
            $row = (array) $result->current();
            $record = $this->_returnRecordFromRow($row);
            if (in_array('driver', $record->sets)) {
                $records[] = $record;
            }
            $result->next();
        }

$result is indeed an ArrayIterator object, but it seems to include the array as a nested object: var_dump($result) =

object(ArrayIterator)#299 (1) {
  ["storage":"ArrayIterator":private]=>
  object(Illuminate\Support\Collection)#289 (2) {
    ["items":protected]=>
    array(6907) {
      [0]=>
      object(stdClass)#285 (8) {
        ["last_modified"]=>
        string(19) "2021-12-29 21:51:11"
        ["submission_id"]=>
        int(8)
        ["issue_id"]=>
        NULL
       ...

GitHub issue DRIVER plugin not producing records in OAI · Issue #10830 · pkp/pkp-lib · GitHub opened by @kaitlin. Thank you.

1 Like

Thank you. Now it works! @kaitlin @mpbraendle

Thank you @kaitlin @jonasraoni - works!

1 Like