@@ -, +, @@ with eval - Run prove t/db_dependent/Search.t - It will fail at test 65 [1] - Apply the patch, it will warn for some failing records, but the tests will run smoothly. - All tests and QA script pass after applying the patch. - Verfied that sample record is not searchable before applying patch, but can be searched without problems after applying it. - Tested authority searching still workds as expected. - Tested bilbiographic searching still works as expected. - Simple search, also truncated search terms - Facetting - Advanced search, also itemtype and pubyear limits - Tested dontmerge preference, editing a linked authority and confirming the change is made to the linked records as well. --- C4/Search.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -506,10 +506,17 @@ sub getRecords { for my $facet (@$facets) { for ( my $j = 0 ; $j < $jmax ; $j++ ) { - my $marc_record = MARC::Record->new_from_xml( + my $marc_record = eval { MARC::Record->new_from_xml( $results[ $i - 1 ]->record($j)->raw(), 'UTF-8' - ); + ); }; + + if ( $@ ) { + warn "ERROR DECODING RECORD - $@: " . + $results[ $i - 1 ]->record($j)->raw(); + next; + } + my @used_datas = (); foreach my $tag ( @{ $facet->{tags} } ) { --