OJS 3.0.2 - OAI-PMH interface - empty titles (multi language journal)

I just noticed a change in behaviour regarding the exposure of metadata in OAI-PMH interface regarding empty fields.

In 2.4.* versions, when a field is empty, the tag on OAI-PMH is not presented, now, on OJS 3.0.2, there are empty fields presented, example:

This issue is a problem for some harvesters that take the first instance of the tag, in this case, the title.

Is this a new behaviour or just a bug to be fixed?

Regards,

José Carvalho

Hi @josekarvalho,

Do you have an example record URL I could look at?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Here is one:
http://diacritica.ilch.uminho.pt/index.php/dia/oai?verb=ListRecords&metadataPrefix=oai_dc

In this case, one title is missing due to a lack of translation:
https://acvjournal.com/index.php/acv/oai?verb=ListRecords&metadataPrefix=oai_dc

Regards,

José Carvalho

Hi @josekarvalho,

At a glance, all your titles appear to have a leading space in them. Do you know where this might be coming from?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

It seems that the initial space is by default. I checked the metadada fields on the submission page and there is no space on both languages, but they appear on the two instances of the title:

<dc:title xml:lang="en-US"> </dc:title>
<dc:title xml:lang="pt-PT"> Página do Presidente</dc:title> 

Checking more situations, this only appears on dc:titles, and in all instances of the titles:

<dc:title xml:lang="en-US"> Contained rupture of a femoral anastomotic pseudoaneurysm</dc:title>
<dc:title xml:lang="pt-PT"> Falso aneurisma anastomótico femoral em rotura contida</dc:title>

I suppose this is created by default on the OAI-PMH?

Regards,

José Carvalho

Hi @josekarvalho,

Hmm, interesting. I checked a local install and can’t replicate that behavior. Can you check your database (e.g. submission_settings with setting_name='title') to see whether the space is present there? Are there any modifications to your system?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

No modifications on the system, and on the database, there are no spaces…

So I suppose it is added later, when exposing the OAI-PMH interface…

Regards,

José Carvalho

Hi @josekarvalho,

The OAI interface does check for empty strings before including them in the output, so it should be behaving as you want it to (e.g. excluding empty metadata statements) but isn’t because somehow that blank space is getting added to your titles and thus they aren’t considered strictly empty. I haven’t been able to replicate that on my own system, unfortunately, and don’t see at a glance where that space is getting added.

I would suggest intervening at various points in the processing of OAI requests to see if you can identify where the space is getting added e.g. by adding error_log statements to dump the title wherever it’s processed.

Regards,
Alec Smecher
Public Knowledge Project Team