There are 2 issues with rebuild_zebra.pl since items have been removed from biblioitems.marcxml: (1) If some fields (itemcallnumber for example) contains some non-ASCII characters, items extraction from items table can fail. Items MARC::Record can't be constructed and fail with an 'invalid wide character error'. (2) MARCXML records which are exported into a file are invalid. Example: <datafield tag="915" ind1=" " ind2=" "> <subfield code="t">DOCUJ</subfield> </datafield> sion="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> </leader> <datafield tag="995" ind1=" " ind2=" "> <subfield code="2">0</subfield> <subfield code="k">J 591 CUI</subfield> <subfield code="f">0003401004</subfield> <subfield code="9">1</subfield> <subfield code="c">AMB</subfield> <subfield code="o">0</subfield> <subfield code="e">1</subfield> <subfield code="j">0.00</subfield> <subfield code="b">AMB</subfield> <subfield code="p">0</subfield> <subfield code="q">J</subfield> </datafield>
Created attachment 5173 [details] [review] Proposed patch
How to test: - Stop your zebra indexer cronjob - Modify the first item of your first biblio record: add a 'é' at the end of the Call number field - Run zebraidx by hand: ./rebuild_zebra.pl -r -b -x -nosanitize -k -d ./ -v - You can stop the process quickly since the first biblio record has been exported - Examine the export file: less biblio/exported_records Result: - You won't see your 'é' at the end of the first item call number. - The delimitation between first and second record is wrong.
Created attachment 6178 [details] [review] Signed off patch I reproduced the 2 bugs and this patch fix them. Signed off.
QA comment: perfect test plan, small patch, passed QA Patch pushed, please test