Bugzilla – Attachment 157423 Details for
Bug 35099
Cannot load records with invalid marcxml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35099: Prevent crash from invalid marc in the parent record
Bug-35099-Prevent-crash-from-invalid-marc-in-the-p.patch (text/plain), 1.33 KB, created by
Nick Clemens (kidclamp)
on 2023-10-19 11:51:20 UTC
(
hide
)
Description:
Bug 35099: Prevent crash from invalid marc in the parent record
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-10-19 11:51:20 UTC
Size:
1.33 KB
patch
obsolete
>From f17dae80ee2ae7b777b425c8e13705ea156da94b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 19 Oct 2023 11:49:26 +0000 >Subject: [PATCH] Bug 35099: Prevent crash from invalid marc in the parent > record > >When getting the query for components, we need to parse the MARC::Record. >If that fails, we simply should not attempt the component search as the user should see a warning about the degraded MARC > >To test: >prove -v t/db_dependent/selenium/regressions.t >It fails >apply patch, restart_all >prove -v t/db_dependent/selenium/regressions.t >It passes >--- > Koha/Biblio.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index fc38955718..0326c1c814 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -767,7 +767,12 @@ sub get_volumes_query { > # MARC21 Only for now > return if ( C4::Context->preference('marcflavour') ne 'MARC21' ); > >- my $marc = $self->metadata->record; >+ # If the marc cannot be loaded, do not build the query >+ # the staff interface should already be displaying an error message in this case >+ # so we don't need to return the error >+ my $marc; >+ eval { $marc = $self->metadata->record;}; >+ return unless $marc; > > # Only build volumes query if we're in a 'Set' record > # or we have a monographic series. >-- >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 35099
:
157394
|
157398
|
157423
|
157430
|
157431
|
157432
|
157510
|
157513
|
157515