Bugzilla – Attachment 80591 Details for
Bug 21475
Error in the OPAC when viewing a record which has no biblio-level itemtype
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21475: Fix crash on missing default itemtype
Bug-21475-Fix-crash-on-missing-default-itemtype.patch (text/plain), 1.23 KB, created by
Marcel de Rooy
on 2018-10-15 12:23:06 UTC
(
hide
)
Description:
Bug 21475: Fix crash on missing default itemtype
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-10-15 12:23:06 UTC
Size:
1.23 KB
patch
obsolete
>From c25c0b05bd113ef3aa53112839c01adef09cc878 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 15 Oct 2018 14:01:14 +0200 >Subject: [PATCH] Bug 21475: Fix crash on missing default itemtype >Content-Type: text/plain; charset=utf-8 > >Test plan: >Enable ArticleRequests. >Find book without itemtype (942c). Maybe you need this: > update biblioitems set itemtype=NULL where biblionumber=[...] >Goto opac detail for that book. No crash anymore? > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > opac/opac-detail.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 6f10c6b..901cbef 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -760,7 +760,9 @@ if( C4::Context->preference('ArticleRequests') ) { > my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef; > my $artreqpossible = $patron > ? $biblio->can_article_request( $patron ) >- : Koha::ItemTypes->find($biblio->itemtype)->may_article_request; >+ : my $itemtype = Koha::ItemTypes->find($biblio->itemtype) >+ ? $itemtype->may_article_request >+ : q{}; > $template->param( artreqpossible => $artreqpossible ); > } > >-- >2.1.4
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 21475
:
80591
|
80593
|
80595
|
80843