Bug 41057 - OPAC ILL visiting a URL directly does not respect ILLOpacbackends
Summary: OPAC ILL visiting a URL directly does not respect ILLOpacbackends
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-20 15:27 UTC by Pedro Amorim
Modified: 2025-11-10 15:23 UTC (History)
7 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:
25.11.00,25.05.05,24.11.11
Circulation function:


Attachments
Bug 41057: Return 404 if creating backend is not an OPAC backend (1.49 KB, patch)
2025-10-20 15:33 UTC, Pedro Amorim
Details | Diff | Splinter Review
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend (1.39 KB, patch)
2025-10-20 15:47 UTC, Pedro Amorim
Details | Diff | Splinter Review
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend (1.43 KB, patch)
2025-10-23 10:39 UTC, Pedro Amorim
Details | Diff | Splinter Review
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend (1.44 KB, patch)
2025-10-23 10:48 UTC, Pedro Amorim
Details | Diff | Splinter Review
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend (1.51 KB, patch)
2025-10-23 10:50 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41057: Return 404 if creating backend is not an OPAC backend (1.79 KB, patch)
2025-10-23 11:02 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41057: Return 404 if creating backend is not an OPAC backend (1.88 KB, patch)
2025-10-24 07:14 UTC, Marcel de Rooy
Details | Diff | Splinter Review
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend (1.87 KB, patch)
2025-11-06 12:23 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-10-20 15:27:53 UTC

    
Comment 1 Pedro Amorim 2025-10-20 15:33:35 UTC
Created attachment 188170 [details] [review]
Bug 41057: Return 404 if creating backend is not an OPAC backend

Test plan, ktd:
1) Enable ILLModule
2) Install an additional backend plugin e.g. 'RapidILL':
  https://github.com/openfifth/koha-ill-rapidill/releases/tag/v2.2.5
3) Restart plack if you have to:
$ koha-plack --restart kohadev
4) Edit the ILLOpacbackends system preference to just 'Standard'.
5) Now, attempt to create a request with the installed backend directly:
  <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=RapidILL
6) Notice the form is shown. It shouldn't be, as the only OPAC back is Standard.
7) Apply patch. Repeat. You get a 404.
Comment 2 Pedro Amorim 2025-10-20 15:47:42 UTC
Created attachment 188171 [details] [review]
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend
Comment 3 Pedro Amorim 2025-10-23 10:39:46 UTC
Created attachment 188320 [details] [review]
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend
Comment 4 Pedro Amorim 2025-10-23 10:48:21 UTC
Created attachment 188322 [details] [review]
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend
Comment 5 Pedro Amorim 2025-10-23 10:50:50 UTC
Created attachment 188323 [details] [review]
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend

Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk>
Comment 6 Pedro Amorim 2025-10-23 11:02:03 UTC
Created attachment 188325 [details] [review]
Bug 41057: Return 404 if creating backend is not an OPAC backend

Test plan, ktd:
1) Enable ILLModule
2) Install an additional backend plugin e.g. 'RapidILL':
  https://github.com/openfifth/koha-ill-rapidill/releases/tag/v2.2.5
3) Restart plack if you have to:
$ koha-plack --restart kohadev
4) Edit the ILLOpacbackends system preference to just 'Standard'.
5) Now, attempt to create a request with the installed backend directly:
  <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=RapidILL
6) Notice the form is shown. It shouldn't be, as the only OPAC back is Standard.
7) Apply patch. Repeat. You get a 404.

Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk>
Comment 7 Marcel de Rooy 2025-10-24 07:14:42 UTC
Created attachment 188400 [details] [review]
Bug 41057: Return 404 if creating backend is not an OPAC backend

Test plan, ktd:
1) Enable ILLModule
2) Install an additional backend plugin e.g. 'RapidILL':
  https://github.com/openfifth/koha-ill-rapidill/releases/tag/v2.2.5
3) Restart plack if you have to:
$ koha-plack --restart kohadev
4) Edit the ILLOpacbackends system preference to just 'Standard'.
5) Now, attempt to create a request with the installed backend directly:
  <opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=RapidILL
6) Notice the form is shown. It shouldn't be, as the only OPAC back is Standard.
7) Apply patch. Repeat. You get a 404.

Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Lucas Gass (lukeg) 2025-10-24 13:59:08 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 9 Paul Derscheid 2025-10-29 09:10:38 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 10 Pedro Amorim 2025-11-06 12:23:20 UTC
Created attachment 189165 [details] [review]
[24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend

Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk>
Comment 11 Pedro Amorim 2025-11-06 12:24:42 UTC
(In reply to Pedro Amorim from comment #10)
> Created attachment 189165 [details] [review] [review]
> [24.11] Bug 41057: Return 404 if creating backend is not an OPAC backend
> 
> Signed-off-by: Nial Halford-Busby <n.halford-busby@lboro.ac.uk>

Updated 24.11 patch to include fix from bug 41204 since it's not yet been backported.
Bug 41204 should only be pushed to 25.11.x and 25.05.x.
Comment 12 Fridolin Somers 2025-11-10 15:23:29 UTC
Pushed to 24.11.x for 24.11.11

Thanks a lot for the patch ;)