From 22b79a4ba9789549319c69877b0162a540688c9e Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 18 Dec 2025 12:48:24 +0000 Subject: [PATCH] Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority --- Koha/ILL/Request.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm index 5e76fc5889e..777de51ce70 100644 --- a/Koha/ILL/Request.pm +++ b/Koha/ILL/Request.pm @@ -1195,7 +1195,16 @@ sub expand_template { # Set files to load $params->{template} = $template_name; $params->{opac_template} = $template_name; + } elsif ( $params->{error} + && $params->{status} eq 'failed_captcha' + && C4::Context->preference("AutoILLBackendPriority") ) + { + my $template_name = 'ill/backends/Standard/' . ( $params->{method} // q{} ) . '.inc'; + # Set files to load + $params->{template} = $template_name; + $params->{opac_template} = $template_name; + $params->{stage} = 'form'; } else { my $plugin = $self->get_backend_plugin( $self->_backend->name ); -- 2.39.5