From 33a89326fea3c366852a0b3f036d4e3724a7f197 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 --- 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 17737e49001..55bd16a3082 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.39.5