Tombstones and plugins

Hi,

I’m trying to write a plugin for OJS 3 that adds some metadata fields and I looked inside the OpenAIRE and Driver plugins (OJS 2.4.8.1).
I know I should consider the tombstone tables.
There are only a few lines in the plugins code regarding the tombstones, so I thought I could manage it…

I tried out the Driver Plugin (using it in OJS 2.4.8.1).
When I’m deleting some articles, with the Driver Plugin enabled, I get some entries in the table data_object_tombstone_settings, saying that there are now some tombstone_id’s (referencing the tombstones in data_object_tombstones) with a setting_name = driver and the setting_value = 1.

But shouldn’t I see “This record has been deleted” when I’m requesting the driver set via OAI? I can see the deleted records when I’m requesting the normal setSpecs (the sets of the journal sections).

I looked inside the code and the SQl statement when searching for

oai?verb=ListRecords&metadataPrefix=oai_dc&set=driver

is the same as for

oai?verb=ListRecords&metadataPrefix=oai_dc

which shows all published articles.

Is this the normal behaviour?

The function &getDRIVERRecordsOrIdentifiers() in DRIVERDAO.inc.php is calling _getRecordsRecordSet($setIds, $from, $until, null) with the last parameter $set set to null, so the function getRecordJoinClause() constructs a SQL statement without looking for a set_spec. And the select-statement doesn’t consider the table data_object_tombstone_settings.

It would be nice if I could get an explanation, because I don’t understand it.

Regards,
habib

Hi @habib

Yes, when you delete/unpublish an article you should see it via the OAI as well.
If that was an Open Access article and Driver plugin is enabled, you will see that row in the DB table data_object_tombstone_settings and you should also see that record as deleted via OAI when you filter only by the set=driver. – I’ve just double checked it and I can see it. Thus, are you sure you do not see it? – It could change the place in the result list, so maybe to search after “article/” for it?

Are your articles all Open Access? If so, they will all belong to the set “driver” i.e. those two searches (with and without set=driver) will be the same.

Best,
Bozana

Hi @bozana,

all articles are Open Access. I have an 2.4.8-Installation which via OAI never shows the “This record has been deleted”-articles, regardless if it’s a normal set or a driver-set.
It’s the 3.1 installation where I can see the “This record has been deleted”-articles. There isn’t a Driver Plugin yet.
So I am right that these articles should be seen in a driver-set? Then something must be wrong in my 2.4.8 installation.

Thanks,
habib

Hi @habib

Hmmm… Yes, you should actually see those records in 2.4.8 as well :open_mouth:

There should be Driver plugin in OJS 3.0.2 (s. ojs/plugins/generic/driver at ojs-3_0_2-0 · pkp/ojs · GitHub)… – I’ll take a look if it works for me…

Best,
Bozana

Hi @bozana,

Yes, I found an error in my 2.4.8. The code was altered. I will investigate further on in OJS 3, but probably in a few days…

Best,
habib