Bugzilla – Attachment 154737 Details for
Bug 34598
Error 500 is shown when ILL request is not found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34598: Improve handling of not found ILL request
Bug-34598-Improve-handling-of-not-found-ILL-reques.patch (text/plain), 3.06 KB, created by
Nick Clemens (kidclamp)
on 2023-08-24 13:22:22 UTC
(
hide
)
Description:
Bug 34598: Improve handling of not found ILL request
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-08-24 13:22:22 UTC
Size:
3.06 KB
patch
obsolete
>From 7f66dc985f23a4ac0b6b42e260129a4e8e7148b4 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 23 Aug 2023 14:45:27 +0000 >Subject: [PATCH] Bug 34598: Improve handling of not found ILL request > >1) Enable ILLmodule and install FreeForm, run: > bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2) Visit a request that doesn't exist (assuming empty illrequests table): > INTRA/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=1 >3) Verify an error 500 is returned with message "Can't call method > "backend_illview"" >4) Apply patch >5) Repeat steps 1-3. Verify that a "ILL request not found." message is > now displayed > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > ill/ill-requests.pl | 4 +++- > koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/includes/ill-toolbar.inc | 1 + > 3 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index fc7da41710..058774321a 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -22,7 +22,7 @@ use Modern::Perl; > use CGI; > > use C4::Auth qw( get_template_and_user ); >-use C4::Output qw( output_html_with_http_headers ); >+use C4::Output qw( output_and_exit output_html_with_http_headers ); > use Koha::Notice::Templates; > use Koha::AuthorisedValues; > use Koha::Illcomment; >@@ -97,6 +97,8 @@ if ( $backends_available ) { > ( tran_success => $params->{tran_success} ) : () ), > ); > >+ output_and_exit( $cgi, $cookie, $template, 'unknown_ill_request' ) if !$request; >+ > my $backend_result = $request->backend_illview($params); > $template->param( > whole => $backend_result, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc >index b596390fd5..1f48630b39 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc >@@ -13,6 +13,8 @@ > <div class="dialog message">Basket not found.</div> > [% CASE 'unknown_vendor' %] > <div class="dialog message">Vendor not found.</div> >+ [% CASE 'unknown_ill_request' %] >+ <div class="dialog message">ILL request not found.</div> > [% CASE 'order_cannot_be_edited' %] > <div class="dialog message">This order cannot be edited, the basket is closed or the order was already received.</div> > [% CASE 'wrong_csrf_token' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-toolbar.inc >index 03fec59ce1..cf90149ee0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-toolbar.inc >@@ -1,3 +1,4 @@ >+[% INCLUDE 'blocking_errors.inc' %] > [% USE Koha %] > [% IF Koha.Preference('ILLModule ') && CAN_user_ill %] > <div id="toolbar" class="btn-toolbar"> >-- >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 34598
:
154712
|
154733
| 154737