Easy to break marc templates in the config file

Bug #1340892 reported by Mike Rylander
6
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.

Tags: pullrequest
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
Revision history for this message
Jason Stephenson (jstephenson) wrote :

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.

no longer affects: opensrf/3.0
Changed in opensrf:
milestone: none → 3.0.1
tags: added: pullrequest
Galen Charlton (gmc)
Changed in opensrf:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

OpenSRF patches pushed to master, rel_3_0, and rel_2_5. Thanks, Jason!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in opensrf:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Confirmed
Changed in opensrf:
assignee: Galen Charlton (gmc) → nobody
Changed in opensrf:
status: Fix Committed → Fix Released
Revision history for this message
Galen Charlton (gmc) wrote :

Setting the Evergreen side of it to fixed-released, as no supported version of Evergreen uses OpenSRF 2.5.x.

Changed in evergreen:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.