Bug 38288 introduced a compatibility measure to fallback to 'Standard' if provided backend on the URL if 'FreeForm'. This was done in order to not introduced immediate breakage for third-party applications redirecting to Koha through openURL sending backend=FreeForm. Bug Bug 41057 introduced code to present a 404 if the provided backend in the URL is not a valid OPAC backend, preventing ILL requests from being created by visiting the URL directly. This worked, but broke the functionality introduced in 38288, i.e. it now shows a 404 if the backend is FreeForm.
Created attachment 189156 [details] [review] Bug 41204: Fallback to Standard earlier 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: <opac_url>/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.
Created attachment 189178 [details] [review] Bug 41204: Fallback to Standard earlier 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: <opac_url>/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 <leo.o’neill@uwl.ac.uk>