Display of keywords in OJS 3.0.2.0

hello,
I Noticed that this journal
http://journal.fi/fypr/article/view/59180
succeeded to display keywords in their OJS 3.0.2.0
Is there any available information how they have done that?
Thanks

Hi @vvucic,

Tagging @ajnyga, who manages that installation!

Regards,
Alec Smecher
Public Knowledge Project Team

Hi,

That is a journal using the default theme in 3.0.2. I have not implemented our own theme yet.

The field which is translated as keywords is actually the subject metadata field. You can see that bit in the template here: https://github.com/pkp/ojs/blob/master/templates/frontend/objects/article_details.tpl#L296

Subject is basically the same thing as keywords in Dublin Core. Actually, @asmecher, what is the idea behind introducing the new keywords metadata field to OJS3?

Hi,
If I understood you well you put keywords in the Subject field in article metadata?

Thanks

Yes, that used to be the only field in OJS2 that was available for keywords - there was no field labeled keywords. I think that in that specific article those keywords were entered using OJS2, because we upgraded just a month ago - thus those are words that are in the subject field.

I am not sure what the difference between subject and keywords field is in OJS3, but hopefully Alec will answer that.

Well, I tried hard to reproduce this, but failed. We would like our keywords to be displayed like this too :smile:

Ok, I see now.

The article @vvucic linked was created using OJS2 as I suspected.

In OJS2 the subject metadata field is stored in submission_settings table using a setting_name subject.
The function in the template I linked above is looking for values from that table and field.

If you save subject metadata in OJS3, the words are saved in controlled_vocab_entry_settings table. The function that is listing those subject keywords does not look for them from here.

So basically two things should happen:

  1. The upgrade script for OJS3 should migrate the subject metadata from the submissions_settings table to the controlled_vocab_entry_settings table
  2. The function $article->getLocalizedSubject() should use the valus from controlled_vocab_entry_settings

tagging @bozana and @asmecher

1 Like

Hi @ajnyga

The keywords (and other article metadata) should be already migrated, s. this function https://github.com/pkp/ojs/blob/master/classes/install/Upgrade.inc.php#L79.
For the second point I am not sure, maybe @asmecher can tell what’s the plan…
Now the keywords are get something like this:

$dao = DAORegistry::getDAO(‘SubmissionKeywordDAO’);
$articleKeywords = $dao->getKeywords($articleId, $supportedLocales);

where $supportedLocales is an array of locales that the keywords should be returned for/in.
Te result is an array of arrays, something like:
Array (
[en_US] => Array (
[0] => kw_en_1
[1] => kw_en_2
[2] => kw_en_3)
[de_DE] => Array (
[0] => kw_de_1
[1] => kw_de_2
[2] => kw_de_3)
)

Hi @bozana,

Ok great, thanks! But probably the script did not remove the subject field from submission_settings table because the article above is showing those values?

So I guess $article->getLocalizedSubject() just needs to be edited then. And furthermore, it would be a good thing to get a decision on the keywords/subject issue. Most of the journals probably choose keywords as a metadata field because it sounds familiar, but I do not think that is Dublin Core? If there is no good reason to have these two separate fields then perhaps they should be combined?

Yes, the article settings were not removed. I suppose there was a reason for that, thus (and for other questions) lets see what @asmecher says… :slight_smile:

Hi all,

I don’t recall the justification in not removing the settings – but in any case they won’t cause any problems, I don’t think. The reason for the discrepancy in field names is that we needed to reconcile the OJS and OMP code; we went with the OMP-style naming for OJS 3.x, and coded the migration to move content to it.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi two questions

1. So do you plan to keep both the subject and keywords fields in the metadata? And if so, what is the plan with they keywords field? I mean, when should that be used and will it show somehow show in the exported metadata, for example in DC?

I am planning to connect a thesaurus service to OJS (https://finto.fi/en/) and I am trying to figure out what field it should be that I connect it to.

2. $article->getLocalizedSubject() should probably be edited so that it is not using the submission_settings field anymore?

Hi @asmecher,

Sorry for the bump, I know you have your hands full. But I would really need an answer to the questions above. Regarding the second question, I would be happy to do a pr to get this fixed.

Hi @ajnyga,

Stay tuned, and sorry for the delay on this – I’m trying to carve out the time to address it properly, but that’s been hard to do!

Regards,
Alec Smecher
Public Knowledge Project Team

No problem at all. I am just in the process of integrating a thesaurus service and am also writing a metadata guide for our journals. This is one of the loose ends there.

If it helps, I would be happy to do a pr at least with the getLocalizedSubject function. But if there are a lot of other things attached to it (I do not know yet) then it would probably be a good idea for you or someone from the pkp team to handle it.

Hi @ajnyga,

Thanks – I’ll need to do a survey of older releases of OJS and OMP, as the roots of this are pretty obscure. Once I get the chance I’ll summarize it here.

Regards,
Alec Smecher
Public Knowledge Project Team

(See also the related issue: https://github.com/pkp/pkp-lib/issues/1828)

Hello,

is there any summary of keywords issue in OJS3? We’re developing an OJS platform with two journals to be published soon and we’re perplexed that keywords are no longer displayed or output anywhere in the article page.

What’s bothering is that there is a keywords field in workflow screen as in OJS 2.x but there is no output.

Hi @szmigieldesign,

That’s high on my priority list and I hope to attack it this week. The best place to track progress is on the github issue, which has some current activity.

Regards,
Alec Smecher
Public Knowledge Project Team

This example from biology is intended to contribute to the discussion (also those that take place
in github):
Scientific names are to be registered in ZooBank. They receive an LSID e.g. Coleoptera Linnaeus, 1758 - urn:lsid:zoobank.org:act:556C312C-0C9E-4CE2-A9ED-27B561E3C851. It would be great to store the name ”Coleoptera” and its URN as a keyword to the article. From the perspective of OJS, this would be a free keyword which comes from ZooBank but would not necessarily be technically connected.