NEU-Libraries / cerberus

Digital Repository Service
8 stars 0 forks source link

Blank preview screen in MODS XML editor when termsOfAddress element is empty #1208

Closed sarahjeansweeney closed 2 years ago

sarahjeansweeney commented 3 years ago

When a MODS record contains an empty <mods:namePart type="termsOfAddress"> element, the preview pane appears blank when the user attempts to validate and preview the MODS:

Screen Shot 2021-06-01 at 11 54 19 AM

The record validates and may be saved when the empty element is removed.

Here's an example of the MODS with a blank termsOfAddress element:

    <mods:name type="personal" authority="local_crrj">
        <mods:namePart type="given">Nelson</mods:namePart>
        <mods:namePart type="family">Nash</mods:namePart>
        <mods:namePart type="date">-1933</mods:namePart>
        <mods:namePart type="termsOfAddress"></mods:namePart>
    </mods:name>

Blank elements are common (and are regularly created by the spreadsheet loader), so this blank element should be valid. Also, the MODS will validate in the XML editor when other namePart attributes, like date and family, are blank. termsOfAddress should be treated similarly to other namePart attributes.