Koha/misc
Galen Charlton 151e22070a 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@esilibrary.com>
Signed-off-by: Larry Baerveldt <larry@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-21 22:25:03 -04:00
..
admin Bug 6061: clearing up system preference on update 2011-06-14 14:16:48 +12:00
bin Revert "Bug 7167: New version for updatedatabase" 2012-12-27 14:02:56 -05:00
cronjobs Bug 8378 - <fine> in overdues changed to <<items.fine>> 2013-03-21 21:53:05 -04:00
interface_customization Bug 9615 - Combine staff home page images into single sprite 2013-02-20 08:29:22 -05:00
load_testing Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl 2012-08-31 17:55:41 +02:00
maintenance Bug 8844: UNIMARC_sync_date_created_with_marc_biblio.pl creates a modification log 2012-11-20 07:43:24 -05:00
migration_tools bug 9496: improve error checking in rebuild_zebra.pl 2013-03-21 22:25:03 -04:00
release_notes Update release notes for 3.12-alpha2 release 2013-03-20 10:12:27 -04:00
translator Bug 5709: Add the ability to translate HTML5 placeholder text in an input field 2012-12-13 10:34:57 -05:00
batchCompareMARCvsFrameworks.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
batchdeletebiblios.pl Bug 8674 follow-up Fix perlcritic error 2012-10-02 17:48:03 +02:00
batchDeleteUnusedSubfields.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
batchImportMARCWithBiblionumbers.pl Bug 8576: Software error on authority edition when using merge 2012-08-28 17:55:33 +02:00
batchRebuildBiblioTables.pl Bug 6001 : batchRebuildBiblioTables.pl doesn't crash anymore when GetMarcBiblio fails. Unprocessed biblionumbers are displayed at the end of the execution instead. 2011-04-29 08:56:57 +12:00
batchRepairMissingBiblionumbers.pl Repair the old repairmissingbiblionumbers script 2009-04-18 15:39:24 -05:00
batchupdateISBNs.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
check_sysprefs.pl MT3289 : check_sysprefs.pl case sensitive variable names 2011-03-31 15:23:24 +13:00
commit_file.pl Bug 2060: Update command line MARC import scripts 2012-09-19 17:16:18 +02:00
export_borrowers.pl Bug 9045 - Adding some parameters to export_borrowers.pl 2013-03-21 10:47:42 -04:00
exportauth.pl Bug 6755 Problems with switching languages 2011-09-23 09:47:09 +12:00
koha-install-log Bug 7818: update installer for biblio DOM indexing 2012-06-09 11:43:56 +02:00
kohalib.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
link_bibs_to_authorities.pl Bug 8818: make sure we load modules before using them 2012-10-01 19:01:50 +02:00
perlmodule_ls.pl Bug 2505 - add strict and warnings to perlmodule_ls 2010-04-21 20:30:52 +12:00
perlmodule_rm.pl Bug 2505 - remove unnecessary -w and replace with use warnings; 2010-04-07 13:27:07 -04:00
recreateIssueStatistics.pl Bug 6025: Adds a script that re-create missing statistics from issues and old_issues tables 2012-03-20 17:02:33 +01:00
sax_parser_print.pl Bug 2617: Add strict (and warnings), partial fix. 2009-03-11 08:36:55 -05:00
sax_parser_test.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
stage_file.pl Bug 2060: Update command line MARC import scripts 2012-09-19 17:16:18 +02:00