Bugzilla – Attachment 20200 Details for
Bug 10684
Koha search dies on undecodable records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10684 - Koha search dies on undecodable records
Bug-10684---Koha-search-dies-on-undecodable-record.patch (text/plain), 1.08 KB, created by
Chris Cormack
on 2013-08-08 23:01:49 UTC
(
hide
)
Description:
Bug 10684 - Koha search dies on undecodable records
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-08-08 23:01:49 UTC
Size:
1.08 KB
patch
obsolete
>From a5aa2c08e5c712d3d5db1c1129f139e8f3494fbb Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 5 Aug 2013 09:28:19 -0400 >Subject: [PATCH] Bug 10684 - Koha search dies on undecodable records > >When a record fails to decode during a search, Koha dies with an error. >Koha should ignore bad records and continue on ( and log the error ). > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/Search.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index aec024b..74536ea 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1698,7 +1698,10 @@ sub searchResults { > > # loop through all of the records we've retrieved > for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { >- my $marcrecord = MARC::File::USMARC::decode( $marcresults->[$i] ); >+ my $marcrecord = eval { MARC::File::USMARC::decode( $marcresults->[$i] ) }; >+ warn "ERROR DECODING RECORD - $@: " . $marcresults->[$i] if $@; >+ next if $@; >+ > my $fw = $scan > ? undef > : $bibliotag < 10 >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10684
:
20109
|
20200
|
20632
|
20633
|
20635