Bug 41204

Summary: OpenURL ILL no longer defaults to Standard if FreeForm
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ILLAssignee: Pedro Amorim <pedro.amorim>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: lisette, lucas, martin.renvoize, pedro.amorim, tomascohen
Version: MainKeywords: rel_26_05_candidate
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38288
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41057
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
26.05.00
Circulation function:
Attachments: Bug 41204: Fallback to Standard earlier
Bug 41204: Fallback to Standard earlier
Bug 41204: Fallback to Standard earlier

Description Pedro Amorim 2025-11-06 11:10:50 UTC
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.
Comment 1 Pedro Amorim 2025-11-06 11:15:53 UTC
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.
Comment 2 Pedro Amorim 2025-11-06 14:19:33 UTC
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>
Comment 3 Kyle M Hall (khall) 2026-01-30 19:18:04 UTC
Created attachment 192274 [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>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2026-02-06 22:20:47 UTC
Nice work everyone!

Pushed to main for 26.05