OMP DOI plugin - How to export crossref XML?

Dear @ajnyga
Thank you for sharing this plugin with us.
I installed it on two OMP 3.3.8 sites. One of the sites gave a 504 gateway timeout, and I couldn’t reach the plugin interface (to enter the username & password, and to deposit a book doi). On the other site, I entered a valid CrossRef username and password. But I get the following error message when I tried to deposit a doi. Hope, this may help to improve the plugin,
I noticed that the orcid id information is located within the person name tag.

##<?xml version="1.0" encoding="UTF-8"?>
 <doi_batch_diagnostic status="completed" sp="a-cs1">
 <record_diagnostic status="Failure">
 <doi />
 <msg>Error: cvc-datatype-valid.1.2.1: '' is not a valid value for 'NMTOKEN'.
 Error: cvc-attribute.3: The value '' of attribute 'language' on element 'book_metadata' is not valid with respect to its type, 'null'.
 Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ORCID'. One of '{"":given_name, "":surname}' is expected.
 (403 Forbidden)##

The xml code produced by the plugin is here

<?xml version="1.0" encoding="UTF-8"?>

<?xml version="1.0" encoding="utf-8"?>
<doi_batch xmlns="" xmlns:xsi="" xmlns:jats="" xmlns:ai="" xmlns:rel="" version="4.4.2" xsi:schemaLocation="">
<registrant>Turkforensic Test Yayınevi</registrant>
<book xmlns:default="" xmlns:jats="" book_type="edited_book">
<book_metadata xmlns="" xmlns:jats="" language="">
<person_name contributor_role="author" sequence="first">
<title>Adli Tıp ve Adli Bilimler</title>
<jats:abstract xmlns:jats="">
<jats:p>Adaletin... Rehberi</jats:p>
<publication_date media_type="online">
<isbn media_type="electronic">9786052584446</isbn>
<publisher_name>Turkforensic Test Yayınevi</publisher_name>


Hard to say what is wrong in the first case, would need to see a php error for that.

Error: cvc-attribute.3: The value '' of attribute 'language' on element 'book_metadata' is not valid with respect to its type, 'null'.
What is the language of the publication? The language attribute mentioned there is set with PKPLocale::getIso1FromLocale($locale) so it seems like whatever the locale is that function is returning null.

Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ORCID'. One of '{&quot;;:given_name, &quot;;:surname}' is expected.
This is probably because there is no author name available and Crossref is expecting to see that data before ORCID. I am not sure if it is possible to register content without an author name.

Hi @ajnyga!

First, thanks so much for sharing your plugin!
The Datacite plugin is now part of the plugin gallery. Would it be possible to integrate your code to that plugin, so we maximize future compatibility efforts? Have you suggested this to @Dulip_Withanage?
Thanks again!

Thank you @ajnyga for developing this and the other handy plugins for OMP! They will have a massive impact on our workflow.

When I tested it for anthologies, the Crossref XML Plugin seem to be putting both volume editors and chapter authors in the main tag (under <book_metadata> or <book_series_metadata>). I expected it to be only editors in this tag, and then the chapter authors in the tag for each chapter. So now the chapter authors appear twice in the XML.

I’m not sure if it’s due to the plugin or the way we’ve entered the metadata. Any comments on this would be appreciated :slight_smile:

Hi @mannemark

Did you check what the Crossref guidelines say about this? In case it is not according to their guidelines, let’s change that in the plugin. It does sound like that is a mistake.

oh, I think the problem here is of course that in OMP editors and chapter authors are basically the same role. You can not distinquish between them because “Editor” and “Author” there are just labels which any publisher can edit.

@asmecher this is a similar problem as we have with translators vs. authors. We would really need more defined contributor data in the applications. I am not sure if CREDIT would solve this problem either like it does not solve the translators vs authors problem.

But your plugin can distinguish between them, in the XML output I get either “editor” and “author” as values in the contributor_role attribute. I’m guessing it gets the editor role from the check box " Identify this contributor as the editor of this volume." instead of from the selected role then perhaps?

Regarding the Crossref guidelines they actually seem to imply that chapter authors should be in both contributor tags. But I don’t think it’s entirely clear, and the examples from Crossref do not really make sense to me. I’ve reached out to Crossref for clarification, will post here as soon as I get a response.

All the best,

Just received word from the support at Crossref. They admitted that the information on their web was unclear but told me that the my interpretation was correct, editors should be in the book metadata, chapter authors in each individual article.

Thanks for finding that out.

The way I distinguish between the contributors now is that I check which contributors are attached to chapters.

Like I mentioned, in the user permission level both chapters authors and volume editors are ROLE_ID_AUTHOR (a constant used in the code) so we can not use the roles to distinguish the difference. Of course the labels for the roles are different, but since they are editable, those can not be used either because if a press would edit the label, the plugin would not work as expected.

Of course I could just add the contributors to the book level in cases where they are not mentioned as chapter authors. But that would not work in situations where the volume editor is also selected to be the author of a chapter, which is also very likely.

So to be honest, I do not have an easy fix for this.

Edit: just to add a screencapture of the current roles in OMP regarding this issue. Author in the permission level column means that in code level these roles are identical and we can not distinguish between them. Like I mentioned, this is also a problem with Translators.

Screenshot 2023-03-30 at 13.35.53

In my opinion the problem comes from the situation where we try to use the same taxonomy for defining user rights within the system (applies to the users table) and contributors roles (applies to the authors table). These should be separate.

OK, thanks for the explanation. Just a final check: it’s not possible to use whatever happens in the code when checking this box?

Either way it’s not a huge problem, we can simply export the XML files and clean them and upload manually to Crossref in the meantime. It’s still way better than the solution I was using before. So thank you once again for the great work!

I’m also wondering if the plugin can handle CC-license metadata. It doesn’t seem to include any license from my testing, so once again I’m wondering if it’s the plugin or our metadata that could be the problem.

haha, I actually already do: datacite/ at crossref · ajnyga/datacite · GitHub

I probably should not try remembering what I’ve wrote but read instead :smiley:

I have to rethink the logic there. Probably
a) if volume editors exist, only show these contributors in the book level
b) if no volume editors exist, show all contributors also in the book level

Because probably we can not have an empty contributors element in the book level, so if we have a case where OMP has an Edited Volume with just Chapter authors added and no specified Volume Editors, then we need to add the Chapter Authors both in the book level and the chapter level.

Regarding the problem I mentioned above, the tick box does solve it, but I think it is a half-measure and only solves one specific contributor distinction in the system while we should support more distinctions.

1 Like

Looking forward to seeing the development in the future, in the meantime this is working really well for us anyways.

I just thought I’d add a comment about the “export” and “deposit” buttons. They are not functioning as buttons, you have to click the text inside the button. If you click the button part outside of the text it only returns a blank screen. We were going crazy troubleshooting why it would only work randomly until we realized :laughing:
We are fixing this in our installation, but of course it would be a welcome improvement for any later versions of the plugin.

All the best,

Great to hear about the Crossref plugin for OMP. We have OMP and PHP 7.4 When the plugin is installed the Plugin page keeps loading, so it is not possible to enable the plugin. I get the following PHP error:

GET /index/$$$call$$$/grid/admin/plugins/admin-plugin-grid/fetch-grid?_=1681897499341 HTTP/1.0 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 621 Apache SSL/TLS access

2023-04-19 11:45:01 Warning

AH01071: Got error ‘PHP message: PHP Warning: require_once(/data/www/vhosts/ failed to open stream: No such file or directory in /data/www/vhosts/ on line 25PHP message: PHP Fatal error: require_once(): Failed opening required ‘/data/www/vhosts/’ (include_path=’.:/opt/plesk/php/7.4/share/pear’) in /data/www/vhosts/ on line 25’, referer:

Does somebody know what is wrong and what to do?

Hello. It’s been a year since I asked about the crossref plugin for 3.4, so I thought maybe something changed and it is worth to ask again. whether there are plans to create it?

1 Like

Yes, I am waiting this plugin too. I always send xml to Crossref for registration. So, any news about this plugin for OMP 3.4?

1 Like

Hi @ajnyga, we are implementing your plugin in our OMP 3.3.
Moving the plugin to production environment, we noticed that it accesses only the Crossref test API due to a comment on row 8 of (we think the comment should be on row 9).
Can you correct the comment and have a look to our issue? We weren’t able to send the issue to your fork, probably it would be better if this plugin wouldn’t be a fork anymore…
Thanks and best regards

Are there any news about OMP 3.4 Crossref Plugin?

1 Like

Hello @ajnyga!
Just wanted to report that adding abstracts to chapters meant that there was some errors when validating the xml. I got this for each chapter in my xml:

[Error] :58:17: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘titles’. One of ‘{“”:abstract, “”:component_number, “”:publication_date, “”:acceptance_date, “”:pages, “”:publisher_item, “”:crossmark, “”:program, “”:program, “”:program, “”:program, “”:archive_locations, “”:scn_policies, “”:doi_data}’ is expected.

Not sure if some local error or if the plugin needs some tweaking. Will deposit without abstracts in the meantime.
Best regards,