OAI interface: Only deleted records

After updating from OJS 2.4.8.1 to OJS 3.1.1.0 AND moving to a new server all records in the OAI interface are shown as “deleted” https://hochschule-und-weiterbildung.net/index.php/zhwb/oai

Of course there are published articles in the journal (https://hochschule-und-weiterbildung.net/zhwb/issue/view/2) and OAI settings are “On” in config.inc.php

We had to import and delete the records on the new server multiple times due to some problems. May be that caused the problem? Is there a way to “rebuild” the OAI interface?

Hi @bibliothekswelt

Hmmm… When the published articles are unpublished there will be an entry in the DB table data_object_tombstone… in order to provide the persistent OAI deletion policy – if a published article was already indexed/harvested by an OAI service provider, OJS lets the OAI service provider know that that article was unpublished and thus the OAI record as harvested/indexed earlier does not exist any more.
Thus, if you have had published articles that were then unpublished or removed, there will be some entries in your DB tables data_object_tombstone… that will be used by the OJS OAI interface. But I wonder why the new articles are not listed there, vie the OAI interface :open_mouth: It is not necessary to do anything in order for published articles to be provided via the OAI interface – they just have to be correctly in the DB, but because they are normally visible in the UI, via the archive page, everything seems to be OK. Hmmm…

Maybe something goes wrong with the SQL from this function: https://github.com/pkp/ojs/blob/ojs-stable-3_1_1/classes/oai/ojs/OAIDAO.inc.php#L211

Could you maybe see if you get any results with this SQL:

SELECT	GREATEST(a.last_modified, i.last_modified) AS last_modified,
a.submission_id AS submission_id,
j.journal_id AS journal_id,
s.section_id AS section_id,
i.issue_id,
NULL AS tombstone_id,
NULL AS set_spec,
NULL AS oai_identifier
FROM
published_submissions pa
JOIN submissions a ON (a.submission_id = pa.submission_id)
JOIN issues i ON (i.issue_id = pa.issue_id)
JOIN sections s ON (s.section_id = a.section_id)
JOIN journals j ON (j.journal_id = a.context_id)
JOIN journal_settings jsl ON (jsl.journal_id = j.journal_id AND jsl.setting_name='publishingMode')
WHERE	i.published = 1 AND j.enabled = 1 AND jsl.setting_value <> 2 AND a.status <> 4 AND j.journal_id = X

Where X at the end is your journal ID.
Maybe something with that UNION statement goes wrong… ? Hmmm…

Best,
Bozana

Hej Bozana,

I tried the SQL-request on our OJS-Instance. The result: Empty set (0.01 sec)

Kind regards, Andreas

PS: bibliothekswelt is my colleague

Hi @graupp

Hmmm… strange…
Could you maybe investigate the values in the DB from that SQL statement, e.g.:

  • What is the value of the journal setting_name = ‘publishingMode’ in the DB table journal_settings?
  • What is the status value of those articles that are not listed, e.g. article with the id = 216?
    To double check: you have changed the X at the end with the real journal ID, right?

Hmmm… :thinking:
Bozana

Good Morning @bozana

in the table “journal_settings” isn’t an entry “publishingMode” in the column “setting_name” :scream:
In what table I find the articles-status?
I looked at the right journal ID :wink:

Cheers!
Andreas

side note: probably the publishingMode setting is only created when you change that setting in OJS for the first time? (which is of course not a good thing)

Have you tried going to the setting page and saving the form, do you see OAI results after that? I mean in Settings => Distribution => Access?

1 Like

In my DB there is setting_name=publishingMode with value=0
should i change to 1

No @acahya, that is fine – it means you are publishing open access. Those settings you can check/correct under Settings > Distribution > Access.
Best,
Bozana

Hi @bozana,

just want to let you know, that this issue has been solved by updating to OJS 3.1.1.4. Now everything’s fine in our OAI interface and the records show up correctly.

Best,
Sebastian

I had similar issues in OJS 3.1.2.0 that in OAI-PMH interface under view ListRecords only showed this message: “This record has been deleted”, which were solved using the route mentioned by @bozana. Very thanks.

Greetings to all.

We have tried to do the OAI collection from the OAI-PMH Data Provider Validation and Registration collector and the output brings us the following:

FAIL: The response to the ListIdentifiers verb with metadataPrefix oai_dc

it did not contain identifiers. Without at least one identifier, we cannot continue

with validation tests.

FAIL: ABORT: There are no identifiers in response to ListIdentifiers. Without a

identifier we cannot proceed with the validation tests.

The journal is published, and the OAI collection is selected in the distribution, however, the problem remains. We appreciate any solutions you can recommend. We are using ojs 3.1.2.4

Hi @Elizabeth_Guerrero

Could you post or send me the URL of your journal (if OA)? – so that I can take a look at the OAI records…

Best,
Bozana