metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

500 error when updating valid EML 2.1.1 documents with missing schemaLocation

Open helbashandy opened this issue 4 years ago • 3 comments

Describe the bug After upgrading ESS-DIVE's underlying metacatUI to 2.14.0 on data-stage.ess-dive.lbl.gov, in testing older data packages updates we realized that when an EML document that is on 2.1.1 is missing the schemaLocation, metacatUI doesn't handle updates for those document. For example, an EML document that starts with the following node:

<?xml version="1.0" ?>
<eml:eml packageId="ess-dive-23ad472d099a6f3-20200903T192228119072" system="ess-dive" xmlns:cit="eml://ecoinformatics.org/literature-2.1.1" xmlns:doc="eml://ecoinformatics.org/documentation-2.1.1" xmlns:ds="eml://ecoinformatics.org/dataset-2.1.1" xmlns:eml="eml://ecoinformatics.org/eml-2.1.1" xmlns:prot="eml://ecoinformatics.org/protocol-2.1.1" xmlns:res="eml://ecoinformatics.org/resource-2.1.1" xmlns:stmml="http://www.xml-cml.org/schema/stmml-1.1" xmlns:sw="eml://ecoinformatics.org/software-2.1.1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

MetacatUI shows the following error:

    Error inserting or updating document: ess-dive-27a90361bad844c-20200903T192229411859 since <?xml version="1.0"?><error>SchemaLocation: schemaLocation value = 'https://eml.ecoinformatics.org/eml-2.2.0 https://eml.ecoinformatics.org/eml-2.2.0 https://eml.ecoinformatics.org/eml-2.2.0/eml.xsd' must have even number of URI's.</error>

To Reproduce Steps to reproduce the behavior:

  1. Go to this data package on ESS-DIVE stage: https://data-stage.ess-dive.lbl.gov/view/ess-dive-27a90361bad844c-20200903T192229411859

  2. Try to update it through the UI

Expected behavior MetacatUI should

Screenshots Screen Shot 2021-04-15 at 12 20 09 AM

Desktop (please complete the following information):

  • Version [e.g. 22] 2.14.0

helbashandy avatar Apr 15 '21 07:04 helbashandy