From c91599636de5cb79090b7c173f16b685c8f90bc0 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 6 Nov 2025 11:14:07 +0000 Subject: [PATCH] Bug 41204: Fallback to Standard earlier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fallback to 'Standard' if 'FreeForm' needs to happen earlier in the code, before other backend checks are performed Test plan, before applying patch: 1) Enabled ILLModule 2) Login to OPAC and access a FreeForm URL directly: /cgi-bin/koha/opac-illrequests.pl?backend=FreeForm&op=add_form 3) Notice you get a 404. Apply patch and restart plack. 4) Repeat 2) Notice you get the 'Standard' form as expected. Create the ILL request. It's created as a 'Standard' request. Signed-off-by: Leo O’Neill Signed-off-by: Kyle M Hall --- opac/opac-illrequests.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl index cc97f51c9d0..10431e74b11 100755 --- a/opac/opac-illrequests.pl +++ b/opac/opac-illrequests.pl @@ -74,6 +74,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( # Are we able to actually work? my $patron = Koha::Patrons->find($loggedinuser); my $backends = Koha::ILL::Request::Config->new->opac_available_backends($patron); +$params->{backend} = 'Standard' if $params->{backend} eq 'FreeForm'; if ( $params->{backend} && !grep { $_ eq $params->{backend} } @$backends ) { print $query->redirect("/cgi-bin/koha/errors/404.pl"); @@ -131,7 +132,6 @@ if ( $op eq 'list' ) { ); } - $params->{backend} = 'Standard' if $params->{backend} eq 'FreeForm'; my $request = Koha::ILL::Request->new->load_backend( $params->{backend} ); # Before request creation operations - Preparation -- 2.50.1 (Apple Git-155)