[Koha-bugs] [Bug 9496] rebuild_zebra.pl should handle invalid XML records better

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 20 14:22:33 CET 2013


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

Paul Poulain <paul.poulain at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #16444|0                           |1
        is obsolete|                            |

--- Comment #6 from Paul Poulain <paul.poulain at biblibre.com> ---
Created attachment 16514
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16514&action=edit
[PASSED QA] bug 9496: improve error checking in rebuild_zebra.pl

When using rebuild_zebra to index all records, skip over
bibliographic or authority records that don't come out
as valid XML.  Also, strip extraneous XML declarations when
using --nosanitize.

Test plans
----------
Note that both plans assume that DOM indexing is turned on.

Test plan #1
============

[1] Run rebuild_zebra.pl with the -x -nosanitize options.  Without
    the patch, zebraidx should terminate early and complain
    about invalid XML.
[2] With the patch, the rebuild_zebra.pl should work without
    error.

Test plan #2
============
[1] Intentionally make a MARCXML record invalid, e.g, by running
    the following SQL:

    UPDATE bilbioitems SET marcxml = CONCATENATE(marcxml, 'junk')
    WHERE biblionumber = 123;

[2] Run rebuild_zebra.pl -b -x -r
[3] Without the patch, only part of the database will be indexed.
[4] With the patch, rebuild_zebra.pl will not export the bad
    record and will give an error message saying so, but will
    successfully index the rest of the records.

Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Signed-off-by: Larry Baerveldt <larry at bywatersolutions.com>
Signed-off-by: Mason James <mtj at kohaaloha.com>

Signed-off-by: Paul Poulain <paul.poulain at biblibre.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list