Bugzilla – Attachment 154712 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), 2.95 KB, created by
Pedro Amorim
on 2023-08-23 14:57:40 UTC
(
hide
)
Description:
Bug 34598: Improve handling of not found ILL request
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-08-23 14:57:40 UTC
Size:
2.95 KB
patch
obsolete
>From e600a02a1f23d1b9d4f122307584e496bdcb5d5b 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 >--- > 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