Easy to break marc templates in the config file
Bug #1340892 reported by
Mike Rylander
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Low
|
Unassigned | ||
OpenSRF |
Fix Released
|
Low
|
Unassigned | ||
2.5 |
Fix Committed
|
Low
|
Unassigned |
Bug Description
If you have an XML comment in the <marctemplates> section of the opensrf.xml that controls open-ils.cat, you won't be able to create a new record. The problem is that the list delivered to the staff client and used to populate an internal hash contains '#comment' in the list, which can't be loaded, of course, because that's not a template, and also makes the hash unbalanced and breaks the backend data structure.
opensrf.settings should probably tell XML::Simple to ignore comments entirely, but short of that, it should should make sure to avoid including non-element child nodes in lists.
no longer affects: | evergreen/2.7 |
no longer affects: | evergreen/2.6 |
no longer affects: | evergreen/2.5 |
no longer affects: | evergreen/master |
Changed in evergreen: | |
status: | New → Confirmed |
Changed in opensrf: | |
status: | New → Confirmed |
Changed in evergreen: | |
importance: | Undecided → Low |
Changed in opensrf: | |
importance: | Undecided → Low |
Changed in opensrf: | |
assignee: | nobody → Galen Charlton (gmc) |
Changed in opensrf: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
NOTE: This is a bug in OpenSRF that affects Evergreen.
While I confirmed this behavior in OpenSRF master just now, OpenSRF SettingsParser.pm uses XML::LibXML instead of XML::Simple.
The "problem" was in the XML2perl helper function in OpensRF: :Utils: :SettingsParser . It was ignoring nodes named "comment" but not also those named "#comment." (Who knew that XML::Libxml would add a # to the node name?)
I have pushed a branch that fixes it for me:
http:// git.evergreen- ils.org/ ?p=working/ OpenSRF. git;a=shortlog; h=refs/ heads/user/ dyrcona/ lp1340982- ignore- settings- comments
This branch should be back ported to OpenSRF 2.5 if any more releases are planned.