[Koha-bugs] [Bug 7239] Acquisitions basket, add order to basket, from new, Source of classification or shelving scheme being blank caused internal error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 17 04:18:35 CET 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7239

--- Comment #2 from Chris Hall <chrish at catalyst.net.nz> 2011-11-17 03:18:35 UTC ---
Here is a further explanation of the bug, I was planning to post it with the
patch but the attach patch button took me to another page.

The bug seems to be caused by the line:
$xml .= "</datafield>\n" if @$tags > 0;
in C4/Biblio.pm (line 1955)

It seems that if the Source of classification or shelving scheme is not filed
in then the resulting xml is:
<collection$
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
  xmlns="http://www.loc.gov/MARC21/slim">
<record>
</datafield>
</record>
</collection>

and if you do fill in the field then the xml is:
<collection
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
  xmlns="http://www.loc.gov/MARC21/slim">
<record>
<datafield tag="952" ind1=" " ind2=" ">
<subfield code="2">ddc</subfield>
</datafield>
</record>
</collection>

Patch places a stronger check on that line (checking if $xml contains a
<datafield tag, rather than if $tags size is > 0)

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the Koha-bugs mailing list