https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41944
--- Comment #7 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 196746 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196746&action=edit Bug 41944: Fix template error for non-existent ILL requests This patch fixes a template error that occurred when attempting to view a non-existent ILL request in the staff interface. Previously, navigating to ill-requests.pl with an invalid illrequest_id would result in a 500 error and a stacktrace. Instead of redirecting to a generic 404 page, the script now uses output_and_exit with the 'unknown_ill_request' blocking error, which renders a user-friendly 'ILL request not found.' message consistent with how Koha handles other missing resources (e.g. unknown_patron in members/memberentrygen.tt, unknown_biblio in catalogue/detail.tt). The template is wrapped with [% UNLESS blocking_error %] to prevent processing ILL-specific content when the request doesn't exist, following the same pattern used in serials/subscription-detail.tt and members/moremember.tt. Note: the large diff in ill-requests.tt is mostly auto-indentation by the pre-commit tidier. The actual change is just the addition of the UNLESS/END guard. Test plan: 1. Ensure KTD is launched with Rapido ILL plugin and bootstrapped (do NOT apply this patch yet): $ ktd --proxy --name rapido --single-plugin ~/git/koha-plugins/rapido-ill up -d $ ktd --shell k$ cd /kohadevbox/plugins/rapido-ill/scripts k$ perl bootstrap_rapido_testing.pl k$ restart_all 2. Log into the staff interface at http://rapido-intra.localhost. 3. Point your browser to a non-existent ILL request, e.g., http://rapido-intra.localhost/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1000 => FAIL: Template errors and a stacktrace are displayed, or a 500 error in production logs. 4. Apply this patch. 5. Repeat step 3. => SUCCESS: An 'ILL request not found.' message is displayed, consistent with other not-found pages in Koha. 6. Sign off :-D Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
