I have two OJS instances: One production site with 2.4.x and a fresh install with a new publication based on 3 version.
I want to publish the OAI-PMH endpoints to be harvested and found that in 2.4.x, the subject occurrences are joined and separated via a semicolon. I need one occurrence for subject. I’ve tried to find the part of the code in 2.4.x that creates the XML exposed but I got stuck in this part
from \plugins\oaiMetadataFormats\dc\OAIMetadataFormat_DC.inc.php, I’ve found the referenced file, but cannot find where it maps the different metadata. BTW, I’ve found that in OJS3 is note exposed at all the subjects, but perhaps I should update my git copy? Is there any advance with the subject bug in OJS3?
The dc:subject element is defined as multilingual in the system, so it will need even more changes to change that i.e. to avoid the xml:lang attribute. But you could do something like this:
$subjects = $article->getSubject(null);
foreach ($subjects as $locale => $subject) {
$terms = explode(";", $subject);
foreach ($terms as $term) {
$this->_addLocalizedElements($dc11Description, ‘dc:subject’, array($locale => trim($term)));
}
}
This should handle the xml:lang attribute correctly, with the appropriate locale.