Unable to deposit dois for crossref. seemed to be related to XML

Describe the bug
When we tried to deposit dois to Crossref, we receive the following error:

Error: cvc-pattern-valid: Value '10.xxx/' is not facet-valid with respect to pattern '10\.[0-9]{4,9}/.{1,200}' for type '#AnonType_doi'.
Error: cvc-type.3.1.3: The value '10.xxx/' of element 'doi' is not valid.

<?xml version="1.0" encoding="UTF-8"?>
<doi_batch_diagnostic status="completed" sp="ds3.crossref.org">
   <submission_id>1596662090</submission_id>
   <batch_id>_1699647180</batch_id>
   <record_diagnostic status="Failure">
      <doi />
      <msg>Error: cvc-pattern-valid: Value '10.xxx/' is not facet-valid with respect to pattern '10\.[0-9]{4,9}/.{1,200}' for type '#AnonType_doi'.
Error: cvc-type.3.1.3: The value '10.xxx/' of element 'doi' is not valid.
</msg>
   </record_diagnostic>
   <batch_data>
      <record_count>1</record_count>
      <success_count>0</success_count>
      <warning_count>0</warning_count>
      <failure_count>1</failure_count>
   </batch_data>
</doi_batch_diagnostic>

On our server, it logged the error Filter output validation failed, expected "schema(https://www.crossref.org/schemas/crossref5.3.1.xsd)", but found "object", referer: https://xxx/dois

It seemed that the XML was not generated correctly. However, I don’t know how to display the content of the xml.

To Reproduce
Steps to reproduce the behavior:

  1. Go to ‘DOIs’
  2. Select an article
  3. Click on ‘Deposit DOI(s)’
  4. See error

What application are you using?
OJS 3.4.0.3

Additional information
Recently upgraded to 3.4.0.3.

Thanks a lot for your help!

Hi @Johnny_Zhang,

Have you literally entered 10.xxx as a DOI prefix somewhere? It’s not a valid DOI prefix.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes. the prefix is correct. I just changed that in the question. Thanks.

I was trying to figure out what happened. Then I got the error below. Thanks.

An unexpected error has occurred. Please reload the page and try again.

POST https://xxx/api/v1/dois/submissions/export 500 (Internal Server Error) jquery.min.js?v=3.4.0.3:2

Hi @Johnny_Zhang,

Check your PHP error log to see if it has more details.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @Johnny_Zhang,

It looks like your DOIs are missing a suffix. Check your DOI suffix configuration to make sure there’s a pattern specified there.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher Thank you very much for your help! I did have a DOI suffix. It seemed that the XML generated to send to crossref had some issues. I actually had trouble exporting the DOI metadata. When I tried that, I got the error An XML validation error occurred and the XML could not be exported.. I also saw the following error in my browser console jquery.min.js?v=3.4.0.3:2 POST https://correct.url.here/api/v1/dois/submissions/export 400 (Bad Request)

Thanks.

Hey @Johnny_Zhang,

If you go to the network tab of your browser and look at the error related to the 400 (Bad Request) and look at the response tab, is there any further information there?

Regards,

Erik
PKP Team

This is the response. Thanks.

{
    "error": "api.dois.400.xmlExportFailed",
    "errorMessage": "An XML validation error occurred and the XML could not be exported."
}

This problem was with the assignment of the doi for an issue. It’s now fixed. Thanks a lot for all your help.