DSpace
DSpace copied to clipboard
ORCID search should work out of the box
Describe the bug Out of the box, ORCID search doesn't work. This means that in order to do a person search, the user should change ORCID configurations to have it working. Mainly, out of the box, a search task is performed from:
https://api.sandbox.orcid.org/v3.0/search?q=paulo&start=0&rows=10
instead of
https://pub.sandbox.orcid.org/v3.0/search?q=paulo&start=0&rows=10
The installer must specify the orcid.api-url setting to use pub.sandbox.orcid.org address (the public address). The public address is currently not considered.
Having api.sandbox.orcid.org as the default, you are required to specify ORCID's settings like client's id an secret. And that forces you to change default ORCID settings. Only then it makes sense to change DSpace ORCID's settings, otherwise (IMHO) the system should work without changes.
To Reproduce Steps to reproduce the behavior:
- Install DSpace 7.5
- Create a collection for persons
- On my "MyDspace" import a person from external source
- Use Orcid and search for a person
- You will have an Unmarshall exception for trying to parse a Forbidden HTML page
2023-05-08 16:20:01,373 ERROR 64ed10cd-017d-4207-a5fa-90e47c106514 bcf5c650-544a-4d20-88fb-77963c0db75d org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ An exception has occurred (status:500)
java.lang.RuntimeException: Unable to unmarshall orcid messagejavax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.]
Expected behavior Without specifying any ORCID's setting, the user should be able to use ORCID public search.
Very similar/likely the same issue as https://github.com/DSpace/DSpace/issues/9333
TL;DR I think the problem is that the DSpace code uses the property where the member API link is expected(orcid.api-url), to make calls that can also be serviced by the public API.
This seems like a very tiny configuration change. If anyone wants to submit a PR we can consider it a bug fix for 7.6.x and 8.0.