Bug 41478 - AutoILLBackendPriority - Unauthenticated request shows backend form if wrong captcha
Summary: AutoILLBackendPriority - Unauthenticated request shows backend form if wrong ...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Lisette Scheer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-18 13:26 UTC by Pedro Amorim
Modified: 2026-01-30 17:56 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority (1.16 KB, patch)
2025-12-18 13:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41478: Refactor: Readability + Never nester (5.11 KB, patch)
2025-12-18 13:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority (1.16 KB, patch)
2026-01-05 14:23 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41478: Refactor: Readability + Never nester (5.11 KB, patch)
2026-01-05 14:23 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority (1.20 KB, patch)
2026-01-06 18:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 41478: Refactor: Readability + Never nester (5.15 KB, patch)
2026-01-06 18:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority (1.27 KB, patch)
2026-01-29 15:47 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 41478: Refactor: Readability + Never nester (5.22 KB, patch)
2026-01-29 15:47 UTC, Lisette Scheer
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-12-18 13:26:26 UTC
It should always show the Standard form when AutoILLBackendPriority is in use.
Comment 1 Pedro Amorim 2025-12-18 13:27:52 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2025-12-18 13:27:54 UTC Comment hidden (obsolete)
Comment 3 Pedro Amorim 2026-01-05 14:23:46 UTC
Created attachment 190890 [details] [review]
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority
Comment 4 Pedro Amorim 2026-01-05 14:23:49 UTC
Created attachment 190891 [details] [review]
Bug 41478: Refactor: Readability + Never nester

1) Install the following dummy backend plugin:
https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9
2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority
3) Logout, create a new Unauthenticated ILL request on the OPAC, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard
4) Fill in the mandatory top fields (first name, last name, email address and library)
5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic.
6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123'
7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally.
This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form.
8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority).
9) Input the correct captcha this time
10) Confirm the created request landed in the PluginBackend backend.
Comment 5 David Nind 2026-01-06 18:29:04 UTC
Created attachment 190947 [details] [review]
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2026-01-06 18:29:07 UTC
Created attachment 190948 [details] [review]
Bug 41478: Refactor: Readability + Never nester

1) Install the following dummy backend plugin:
https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9
2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority
3) Logout, create a new Unauthenticated ILL request on the OPAC, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard
4) Fill in the mandatory top fields (first name, last name, email address and library)
5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic.
6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123'
7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally.
This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form.
8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority).
9) Input the correct captcha this time
10) Confirm the created request landed in the PluginBackend backend.

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Lisette Scheer 2026-01-29 15:47:35 UTC
Worked as expected and all tests passed.
The plugin sets all to type journal article, but it appears to be part of the plugin, just testing notes.
Comment 8 Lisette Scheer 2026-01-29 15:47:41 UTC
Created attachment 192152 [details] [review]
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 9 Lisette Scheer 2026-01-29 15:47:43 UTC
Created attachment 192153 [details] [review]
Bug 41478: Refactor: Readability + Never nester

1) Install the following dummy backend plugin:
https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9
2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority
3) Logout, create a new Unauthenticated ILL request on the OPAC, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard
4) Fill in the mandatory top fields (first name, last name, email address and library)
5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic.
6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123'
7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally.
This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form.
8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority).
9) Input the correct captcha this time
10) Confirm the created request landed in the PluginBackend backend.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 10 Lucas Gass (lukeg) 2026-01-30 17:56:36 UTC
Nice work everyone!

Pushed to main for 26.05