Closed laurenwalker closed 5 years ago
@laurenwalker I noticed that this EML is not valid due to line 117:
<authentication method="MD5">/authentication>
.
There is a missing <
. Maybe that helps with diagnosing the issue.
actually there are many missing characters and elements. some examples:
<attributeName>dO2/N2/attributeName>
(line 187)
otherEntity
and dataset
not closed at end (~line 217)
The error icon in the people section may be coming from the contact, which was serialized as null
:
<contact id="2940906010390095"><individualName><givenName>null</givenName></individualName><userId directory="https://orcid.org">https://orcid.org/0000-0001-5496-5113</userId></contact>
For whatever reason, this person was never registered with a DataONE account when he logged in: https://cn.dataone.org/cn/v2/accounts/http%3A%2F%2Forcid.org%2F0000-0001-5496-5113
This is why there was no name to grab to the contact, so it was serialized as null
.
@laurenwalker - Is the issue here that Todd's attribute names have /
s in them, and we're not escaping them, so they jack up the XML?
Could we develop some validation tests that try really hard to break the app using a variety of unusual characters and character sequences -- both valid and invalid -- to be sure the application can serialize those all correctly and not error out? If these included a set of unicode characters, a wide variety of reserved characters in XML (<>/'&";), well-formed and malformed entity references (e.g., , &, "e; &foo;, etc.), undefined entity references, and characters from character encodings that are not the current encoding (e.g., Windows-1252 or CP-1252 or ISO-8859-1 characters in a UTF-8 doc), we might be able to prevent some of these surprises from emerging slowly one at a time.
The simplest way to handle the People section bug is to create the creator and contact when the Editor first loads rather than later when the user clicks Submit. We've talked before about doing it this way anyway, so I went ahead with that route. A creator or contact will be created during Submit if the user deletes either of them without adding a replacement party.
I'll look into the attributes stuff next. I think developing some tests for these scenarios is a great idea.
Jesse and I discussed the odd serialization errors where there are missing <
's.
From Slack:
trying to decipher his email it sounds like this XML is perhaps where Sowers “…downloaded the meta data from [his] previous submission and cut and pasted in new information for the current submission.” the
cut and pasted
seems like a probable explanation for the oddly absent<
s if that’s true, it’s probably not a helpful GH comment for debugging efforts
I think the <
's may have been erased when he manually edited the plain XML in a text editor. I haven't been able to recreate the missing <
bug and I don't see any invalid EML
errors in our Google Analytics, which would have happened if the saving process got that far.
I think the People section was the only bug that prevented him from saving. I'll close this issue.
We heard from a user trying to submit to the ADC who encountered an error after clicking submit.
From the user:
Serialized EML from the user's local memory:
`