Bugzilla – Attachment 157739 Details for
Bug 35141
Prevent link_bibs_to_authorities from dying on search error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata
Bug-35141-Prevent-linkbibstoauthorities-from-dying.patch (text/plain), 1.25 KB, created by
Nick Clemens (kidclamp)
on 2023-10-24 12:04:13 UTC
(
hide
)
Description:
Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-10-24 12:04:13 UTC
Size:
1.25 KB
patch
obsolete
>From 2b9a09344e39f47a04a3eeb17076a9d48dd0781b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 24 Oct 2023 12:01:09 +0000 >Subject: [PATCH] Bug 35141: Prevent link_bibs_to_authorities from dying on > invalid metadata > >When fetching the record we need to eval in case of exception > >To test: >1 - Apply first patch >2 - perl misc/link_bibs_to_authorities.pl >3 - Note it dies on parser error at record 369 >4 - Apply this patch >5 - perl misc/link_bibs_to_authorities.pl >6 - The process completes - with warning thrown on record 369 >--- > misc/link_bibs_to_authorities.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/misc/link_bibs_to_authorities.pl b/misc/link_bibs_to_authorities.pl >index 08550c76c0..3dfdd049b7 100755 >--- a/misc/link_bibs_to_authorities.pl >+++ b/misc/link_bibs_to_authorities.pl >@@ -201,7 +201,8 @@ sub process_bib { > my $tagtolink = $args->{tagtolink}; > my $allowrelink = $args->{allowrelink}; > my $biblio = Koha::Biblios->find($biblionumber); >- my $record = $biblio->metadata->record; >+ my $record; >+ eval{ $record = $biblio->metadata->record; }; > unless ( defined $record ) { > print > "\nCould not retrieve bib $biblionumber from the database - record is corrupt.\n"; >-- >2.30.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 35141
:
157738
|
157739
|
157766
|
157767
|
157972
|
157973
|
157974