Bug 2810 - corrupt marc data is causing the commit_biblios_file.pl to abort
Summary: corrupt marc data is causing the commit_biblios_file.pl to abort
Status: CLOSED DUPLICATE of bug 2435
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: PC All
: P3 normal (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-19 07:21 UTC by Chris Cormack
Modified: 2012-10-26 00:51 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
bad record (377 bytes, text/plain)
2008-11-19 07:22 UTC, Chris Cormack
Details
bad record data (440 bytes, text/plain)
2008-11-19 07:23 UTC, Chris Cormack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 00:56:41 UTC


---- Reported by michele.maenpaa@liblime.com 2008-11-19 07:21:14 ----

I have corrupt marc data that caused the commit_biblios_file.pl  to abort.
the output is below. I have two marc records that are causing this.  I will attached the records.  Can the commit_biblios_file.pl skip the bad records instead of aborting.


problem with :143463 : :19: parser error : attributes construct error
    <subfield code="""> is for lawless /</subfield>
                     ^
:19: parser error : Couldn't find end of Start Tag subfield line 19
    <subfield code="""> is for lawless /</subfield>
                     ^
:19: parser error : Opening and ending tag mismatch: datafield line 17 and subfield
    <subfield code="""> is for lawless /</subfield>
                                                   ^
:21: parser error : Opening and ending tag mismatch: record line 2 and datafield
  </datafield>
              ^
:22: parser error : Extra content at the end of the document
  <datafield tag="260" ind1=" " ind2=" ">
  ^
 at /usr/lib/perl5/XML/LibXML/SAX/Parser.pm line 31
 
<?xml version="1.0" encoding="UTF-8"?>
<record
    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">

  <leader>003010s19a2200109   4500</leader>
  <controlfield tag="008">081020s1995    xx            000 0 und d</controlfield>
  <datafield tag="020" ind1=" " ind2=" ">
    <subfield code="a">0</subfield>
    <subfield code="7">9424628</subfield>
  </datafield>
  <datafield tag="100" ind1="1" ind2=" ">
    <subfield code="a">G</subfield>
    <subfield code="a">fton, Sue</subfield>
  </datafield>
  <datafield tag="245" ind1="1" ind2="0">
    <subfield code="a">"</subfield>
    <subfield code="""> is for lawless /</subfield>
    <subfield code="c">Sue Grafton.</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="a">N</subfield>
    <subfield code="w"> York :</subfield>
    <subfield code="b">Random House,</subfield>
    <subfield code="c">c1995.</subfield>
  </datafield>
  <datafield tag="300" ind1=" " ind2=" ">
    <subfield code="a">2</subfield>
    <subfield code="a">udio cassettes</subfield>
  </datafield>
  <datafield tag="999" ind1=" " ind2=" ">
    <subfield code="c">143463</subfield>
    <subfield code="d">143463</subfield>
  </datafield>
</record>
Can't call method "append_fields" on an undefined value at /home/koha-dataload/kohaclone/C4/Items.pm line 2034.








 problem with :152705 : :17: parser error : xmlParseEntityRef: no name
    <subfield code="&"> Tanzania.</subfield>
                     ^
 at /usr/lib/perl5/XML/LibXML/SAX/Parser.pm line 31
 
<?xml version="1.0" encoding="UTF-8"?>
<record
    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">

  <leader>00423-023a2200121   4500</leader>
  <datafield tag="020" ind1=" " ind2=" ">
    <subfield code="a">0-679</subfield>
    <subfield code="0">2309-7</subfield>
  </datafield>
  <datafield tag="100" ind1="1" ind2=" ">
    <subfield code="a">Fodor</subfield>
  </datafield>
  <datafield tag="245" ind1="1" ind2="0">
    <subfield code="a">Kenya</subfield>
    <subfield code="&"> Tanzania.</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="a">Unite</subfield>
    <subfield code=" ">States :</subfield>
    <subfield code="b">Fodor's Travel Publications, Inc,</subfield>
    <subfield code="c">1992.</subfield>
  </datafield>
  <datafield tag="300" ind1=" " ind2=" ">
    <subfield code="a">3098</subfield>
  </datafield>
  <datafield tag="520" ind1="8" ind2=" ">
    <subfield code="a">Nobod</subfield>
    <subfield code=" ">knows Kenya and Tanzania better than Fodor's, the leader in travel for 57 years.</subfield>
  </datafield>
  <datafield tag="650" ind1=" " ind2="4">
    <subfield code="a">Trave</subfield>
    <subfield code="-">East Africa</subfield>
    <subfield code="x">Game Parks-East Africa</subfield>
    <subfield code="x">Safarus-East Africa</subfield>
  </datafield>
  <datafield tag="999" ind1=" " ind2=" ">
    <subfield code="c">152705</subfield>
    <subfield code="d">152705</subfield>
  </datafield>
</record>
Can't call method "append_fields" on an undefined value at /home/koha-dataload/kohaclone/C4/Items.pm line 2034.



---- Additional Comments From michele.maenpaa@liblime.com 2008-11-19 07:22:59 ----

Created an attachment
bad record

bad record



---- Additional Comments From michele.maenpaa@liblime.com 2008-11-19 07:23:25 ----

Created an attachment
bad record data





---- Additional Comments From drdrulm@yahoo.com 2009-06-03 13:57:12 ----

I think I found one of these also in our catalog:

http://opac.smfpl.org/cgi-bin/koha/opac-detail.pl?biblionumber=141504

At SMFPL. When I turn on full error messages it just says:

File Not Found

Firefox can't find the file at http://192.168.1.105:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=137729.

    * Could the item have been renamed, removed, or relocated?
    * Is there a spelling, capitalization, or other typographical error in the address?
    * Do you have sufficient access permissions to the requested item?

We have found 2 of these now. We deleted the other one because the item was taken out. This appears to be a *new* item. 

-Darrell Ulm



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:56 UTC  ---

This bug was previously known as _bug_ 2810 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2810
Imported an attachment (id=862)
Imported an attachment (id=863)

Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was michele.maenpaa@liblime.com.
CC member drdrulm@yahoo.com does not have an account here
CC member michele.maenpaa@liblime.com does not have an account here
The original submitter of attachment 862 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 863 [details] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Katrin Fischer 2012-04-02 21:41:07 UTC
From the description I think this is a duplicate to bug 2435 - behaviour needs to be retested on current master.

*** This bug has been marked as a duplicate of bug 2435 ***