redbox-mint / redbox

http://www.redboxresearchdata.com.au
GNU General Public License v2.0
5 stars 10 forks source link

"Invalid XML placeholder" doesn't prevent import #69

Closed rwalkerands closed 6 years ago

rwalkerands commented 6 years ago

The file config/src/main/config/home/templates/rif.vm has these lines:

#set($defaultOnError = "&Invalid XML placeholder... prevents ANDS Harvesting records in error&")
#set($group = $systemConfig.getString($defaultOnError, "identity", "RIF_CSGroup"))
...
    <rif:registryObject group="$util.encodeXml($group)">

So the code escapes the value of the group attribute, which makes "&Invalid XML placeholder..." into valid XML.

We have recently imported records that indeed have this group:

https://researchdata.ands.org.au/contributors/invalid-xml-placeholder-prevents-ands-harvesting-records-in-error (sample record: https://researchdata.ands.org.au/testing-spectrum-ha-spectral-detection/341549)

I haven't checked for other instances of the code escaping what's meant to remain invalid.

ghost commented 6 years ago

Hi @rwalkerands Thanks for pointing this out. It looks like that's been there for a while :P I'll go through and find other references like this which attempt to baulk the ands processing and correct so these ampersand messages don't go through as unescaped so validation fails. I'll also let the authors know as they have their own customised template.