mother-db / ezEMLmotherDB

A web front-end for the metapype-eml client
Apache License 2.0
0 stars 1 forks source link

additionalInfo empty element in wrong position in otherEntity #48

Closed dietrichasuedu closed 1 year ago

dietrichasuedu commented 1 year ago

I created a brand new document I uploaded one of the valid dataverse xml files: Japanese Macaque 20478-F1-09_UN_001a, which correctly clears out the Title, Image, and Slide data - forcing the user to enter. I added this information and then downloaded the document, it included an empty element under , which is under the eml xsd, in the WRONG position - after entityType instead of before. (Since it is not part of mother's xsd, it is not handled by mother_pype and shouldn't be. ) Note that we are reusing eml's otherEntity for the image. Did our code changes make this happen? I had to change xml file extension to txt. The one without _thumbnail is the one from dataverse. The one with _thumbnail was downloaded during our meeting today. Please investigate. 20478-F1-09_UN_001a_thumbnail.xml.txt 20478-F1-09_UN_001a.xml.txt

jpraymer commented 1 year ago

This was being caused because existing nodes were being modified in otherEntity instead of deleting and recreating the nodes like seemingly every other form would do. As a result, a new node for additionalInfo was being created after the existing entityType node instead of them all being created in order. This has now been rectified by properly recreating the nodes whenever the form is submitted.