Bugzilla – Attachment 88573 Details for
Bug 22735
Broken MARC and ISBD views
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22735: Resolve internal server error on missing item type
Bug-22735-Resolve-internal-server-error-on-missing.patch (text/plain), 2.21 KB, created by
Katrin Fischer
on 2019-04-23 22:18:26 UTC
(
hide
)
Description:
Bug 22735: Resolve internal server error on missing item type
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-23 22:18:26 UTC
Size:
2.21 KB
patch
obsolete
>From a46307112ee62ca58c6fac45a925ff055065e21d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 19 Apr 2019 06:49:48 +0000 >Subject: [PATCH] Bug 22735: Resolve internal server error on missing item type > >Trivial fix, similar to opac-detail, applied to ISBD and MARC detail. > >Test plan: >Enable ArticleRequests pref. >Make sure you have a biblio with no item type in 942c. (Perhaps you need to >make 942c not mandatory temporarily and save a biblio record without this >field being filled.) >If you are logged in, log out. >Go to MARC or ISBD detail page. No crash anymore? > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > opac/opac-ISBDdetail.pl | 5 ++++- > opac/opac-MARCdetail.pl | 5 ++++- > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index ed39f72ca0..50d08b377e 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -226,9 +226,12 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > } > > if( C4::Context->preference('ArticleRequests') ) { >+ my $itemtype = Koha::ItemTypes->find($biblio->itemtype); > my $artreqpossible = $patron > ? $biblio->can_article_request( $patron ) >- : Koha::ItemTypes->find($biblio->itemtype)->may_article_request; >+ : $itemtype >+ ? $itemtype->may_article_request >+ : q{}; > $template->param( artreqpossible => $artreqpossible ); > } > >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 4867eda860..dd709003a8 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -351,9 +351,12 @@ if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){ > } > > if( C4::Context->preference('ArticleRequests') ) { >+ my $itemtype = Koha::ItemTypes->find($biblio->itemtype); > my $artreqpossible = $patron > ? $biblio->can_article_request( $patron ) >- : Koha::ItemTypes->find($biblio->itemtype)->may_article_request; >+ : $itemtype >+ ? $itemtype->may_article_request >+ : q{}; > $template->param( artreqpossible => $artreqpossible ); > } > >-- >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 22735
:
88334
|
88335
|
88336
|
88370
| 88573