we have build a xml for the Native XML import/export plugin and want to import the DOI as well. The XML is like:
<article xmlns="http://pkp.sfu.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" locale="en_US" language="en" date_submitted="2018-10-04" stage="production" date_published="2019-01-28" section_ref="plantbiotech" seq="1" access_status="0" xsi:schemaLocation="http://pkp.sfu.ca native.xsd">
<id type="internal" advice="ignore">10407</id>
<id type="doi" advice="update">*our_doi*</id>
However, with that the DOI is not inserted. What could be the problem? Which types for
advice are valid?
We use OJS 184.108.40.206
Thanks in advance!
Do you have the DOI configured and enabled on your system?
We can confirm this problem – DOIs are not written to the database using the instruction
<id type="doi" advice="update">*our_doi*</id> We tried several approaches: DOI plugin enabled (using a set prefix and no automatic assigning of DOIs), DOI plugin disabled, prefix as part of the XML, prefix not part of the XML - no change in behaviour whatsoever. What’s also curious is that the native XML export produces the exact same statement as the one OJS apparently ignores on import.
We managed to find a workaround for this. DOI import is working for us if DOIs are also enabled for the issues, not just for the articles. The XML has to include issue DOIs (may be placeholders that you delete later), like so:
current="0" access_status="1" xsi:schemaLocation="http://pkp.sfu.ca
<id type="internal" advice="ignore">17</id>
<id type="doi" advice="update">10.[yourprefix]/[yoursuffix]</id>
The DOI plugin obviously has to be enabled and contain a prefix matching your XML.
Clever workaround. That is effective because it loads the DOI plugin early in the process, making it available later when it is needed for the articles.
This was a bug in 3.1.0-1. It was fixed in 3.1.1: