Bug 41204 - OpenURL ILL no longer defaults to Standard if FreeForm
Summary: OpenURL ILL no longer defaults to Standard if FreeForm
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords: rel_25_05_candidate, rel_25_11_candidate
Depends on:
Blocks:
 
Reported: 2025-11-06 11:10 UTC by Pedro Amorim
Modified: 2025-11-06 14:19 UTC (History)
3 users (show)

See Also:
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:
Circulation function:


Attachments
Bug 41204: Fallback to Standard earlier (1.67 KB, patch)
2025-11-06 11:15 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41204: Fallback to Standard earlier (1.82 KB, patch)
2025-11-06 14:19 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>