pkp / orcidProfile

A plugin to pull ORCID information into a PKP user profile
GNU General Public License v3.0
16 stars 51 forks source link

Unable to submit review data with multilingual submission #322

Open jnugent opened 3 weeks ago

jnugent commented 3 weeks ago

Describe the bug we've a client using OJS 3.3, with a member API account. They are trying to integrate the reviewer thanking component and the review submission to ORCID is failing with

2024-10-16 11:18:51.921 INFO Publication fail: {"response-code":400,"developer-message":"400 Bad request: invalid JSON - cvc-complex-type.2.4.a: Invalid content was found starting with element '{\"http://www.orcid.org/ns/common\":translated-title}'. One of '{\"http://www.orcid.org/ns/common\":title}' is expected.","user-message":"Invalid JSON.","error-code":9047,"more-info":"https://members.orcid.org/api/resources/troubleshooting"}

Looking at the code it seems that the translated-title stuff is added to the payload if the default language is not the language of the submission. I'm not really sure why the translated title is showing up ahead of the regular title. All of the title metadata is filled in in all locales.

I can provide access to the installation and the orcid.log if necessary.

OJS 3.3

ewhanson commented 3 weeks ago

Thanks @jnugent, I don't remember the exact details, but I had run into something similar when moving the plugin into the main library for 3.5. I'll have a look and get it fixed. I shouldn't need anything specific, but if I do need to see the orcid.log I'll let you know.