Closed kjgarza closed 5 years ago
This bug actually appears to be related to attempting to update an older schema version to a newer version i.e. 3 to 4 via gathering the data from a JSON-LD endpoint.
The steps to reproduce:
Create a Findable DOI
Use this metadata as an example:
<?xml version="1.0" encoding="UTF-8"?>
<resource xmlns="http://datacite.org/schema/kernel-3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd">
<identifier identifierType="DOI">10.23698/AIDA/DRSK</identifier>
<creators>
<creator>
<creatorName>Karin Lindman</creatorName>
<affiliation>Department of Clinical Pathology, Region Östergötland, Linköping, Sweden</affiliation>
</creator>
<creator>
<creatorName>Jerónimo F. Rose</creatorName>
<affiliation>Center for Medical Image Science and Visualization (CMIV), Linköping University, Linköping, Sweden</affiliation>
</creator>
<creator>
<creatorName>Martin Lindvall</creatorName>
<affiliation>Sectra AB, Sweden</affiliation>
</creator>
<creator>
<creatorName>Caroline Bivik Stadler</creatorName>
<affiliation>Center for Medical Image Science and Visualization (CMIV), Linköping University, Linköping, Sweden</affiliation>
</creator>
<creator>
<creatorName>Claes Lundström</creatorName>
<affiliation>Center for Medical Image Science and Visualization (CMIV), Linköping University, Linköping and Sectra AB, Sweden</affiliation>
</creator>
<creator>
<creatorName>Darren Treanor</creatorName>
<affiliation>Department of Clinical Pathology, Region Östergötland, Sweden; Section of Pathology and Tumour Biology, Leeds Institute of Cancer and Pathology, University of Leeds and Department of Cellular Pathology, St. James University Hospital, Leeds, UK</affiliation>
</creator>
</creators>
<titles>
<title>Skin data from the Visual Sweden project DROID</title>
</titles>
<publisher>Analytic Imaging Diagnostics Arena (AIDA)</publisher>
<publicationYear>2019</publicationYear>
<descriptions>
<description descriptionType="Other">_Data used in research study (to be published).</description>
</descriptions>
<rightsList>
<rights rightsURI="">Restricted access</rights>
</rightsList>
</resource>
Then attempt to update with the newer schema via a landing page URL: https://datasets.aida.medtech4health.se/10.23698/aida/drsk
This then generates the 422 mentioned above.
Thank you Richard! I can confirm that the workaround you emailed me separately works:
However to solve that specific DOI, I updated the schema manually, I created another temporary draft DOI, used the URL to generate the schema and then copied that with the correct DOI in the xml to this DOI, then deleted the temporary DOI. This isn't an ideal work-around but it allowed me to update the metadata for this DOI.
I've used it to update the other DOIs that were causing me problems.
This is Lupo API Error, rather than Fabrica
{
"errors": [
{
"source": "xml",
"title": "No matching global declaration available for the validation root. at line 2, column 0"
}
]
}
When updating a DOI using schema.org url upload there is not schema version. the API merges the update with the old doi information.
If the old DOI is in previous version, then it will cause conflict.
Probably the solution is to default to lastest version when the metadata is valid and there is no schema information.
The parser of the schema.org url is calling bolognese which seems to return nil
if the schemaVersion is not supplied.
Actually,
Refers to the version of schema.org, not the version of the datacite schema.
https://schema.org/schemaVersion
So when using the Reader in crosscite we will never get the datacite schema version.
I think the solution should be to default the latest schema version in LUPO controller when we have a schema.org upload.
Expected Behaviour
When I update doi metadata in Fabrica using Upload file with a URL (to a landing page with schema.org). The metadata should get updated without errors.
Current Behaviour
The new pages like this one
https://datasets.aida.medtech4health.se/10.23698/aida/drsk
use json-ld, and I would like to be able to just point Fabrica to each of these pages and press "Update DOI", but when I put that URL (or indeed the entire json-ld blob) into the main text field on the "Update DOI (File Upload)" page nothing happens. No error message, and I'm not redirected anywhere, just nothing.
details: https://usersnap.com/a/#/datacite/p/datacite-41ebcc0f/579
Steps to Reproduce
Context (Environment)
Production Envrioment.
Hypothesis
The API return a 422 error on updating, it could be that the description fields are not "cleaned" before sending the information.
Detailed Description
Possible Implementation
Front conversations