Bugzilla – Attachment 95340 Details for
Bug 23846
Handle records with broken MARCXML on the bibliographic detail view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23846: Handle exception gracefully at the OPAC
Bug-23846-Handle-exception-gracefully-at-the-OPAC.patch (text/plain), 1.72 KB, created by
Jonathan Druart
on 2019-11-12 17:19:19 UTC
(
hide
)
Description:
Bug 23846: Handle exception gracefully at the OPAC
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-12 17:19:19 UTC
Size:
1.72 KB
patch
obsolete
>From 09bf62e3d369cd95b3420b87429f4c2dad3162e0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Nov 2019 18:18:23 +0100 >Subject: [PATCH] Bug 23846: Handle exception gracefully at the OPAC > >I do not think we should have the same trick as the intranet, and >display a message. This should be enough. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- > opac/opac-detail.pl | 4 +++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 5da7b95c18..571f3b2395 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -71,7 +71,7 @@ > [% IF decoding_error %] > <div> > There is an error with this bibliographic record, the view may be degraded. >- <br/> Error: [% decoding_error %] >+ <br/> Error: [% decoding_error | html %] > </div> > [% END %] > [% IF ( ocoins ) %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 5e29b3f627..07655b2a4e 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -845,8 +845,10 @@ $template->param( > content_identifier_exists => $content_identifier_exists, > ); > >+# Catch the exception as Koha::Biblio::Metadata->record can explode if the MARCXML is invalid > # COinS format FIXME: for books Only >-$template->param( ocoins => $biblio->get_coins ); >+my $coins = eval { $biblio->get_coins }; >+$template->param( ocoins => $coins ); > > my ( $loggedincommenter, $reviews ); > if ( C4::Context->preference('reviewson') ) { >-- >2.11.0
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 23846
:
94419
|
94420
|
95291
|
95292
|
95329
|
95330
|
95340
|
95341
|
95342
|
95343
|
95344