Bugzilla – Attachment 157973 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.40 KB, created by
Marcel de Rooy
on 2023-10-27 07:28:09 UTC
(
hide
)
Description:
Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-10-27 07:28:09 UTC
Size:
1.40 KB
patch
obsolete
>From 9cd09f24ba2c67e9cab59426dbb822a73167924b 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 >Content-Type: text/plain; charset=utf-8 > >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 > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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