Koha-clms/Koha/ILL
Pedro Amorim 0e95900335
Bug 42653: get_backend_plugin should cache results per backend name
The plugin cache used a single slot, so the first backend looked up
poisoned it for all subsequent calls. This caused 500 errors when
viewing ILL requests that had been migrated between backends.

Test plan:
1) Download and install 2 additional plugin backends that implement
their own templates:
https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/download/v2.6.1/koha-ill-libkey-lending-tool-v2.6.1.kpz
https://github.com/openfifth/koha-ill-reprintsdesk/releases/download/v4.2.0/koha-ill-reprintsdesk-v4.2.0.kpz

2) Enable ILLModule and run the following SQL:

INSERT INTO illrequests (borrowernumber, branchcode, status, backend, placed)
SELECT b.borrowernumber, br.branchcode, 'COMP', 'ReprintsDesk', NOW()
FROM borrowers b, branches br
LIMIT 1;

INSERT INTO action_logs (timestamp, user, module, action, object, info, interface)
VALUES
 (NOW() - INTERVAL 2 HOUR, 1, 'ILL', 'INCDOCS_REQUEST_PLACED', 1,
  '{"log_origin":"IncDocs","response":1}', 'intranet'),
 (NOW() - INTERVAL 1 HOUR, 1, 'ILL', 'REPRINTS_DESK_REQUEST_ORDER_UPDATED', 1,
  '{"log_origin":"ReprintsDesk","response":null}', 'commandline');

3) Attempt to open the 'Manage request' page for this newly created
request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1

4) Notice you get a 500 error:
Template process failed: file error - : not found

5) Apply all patches, restart plack, refresh. Notice the 'Manage
request' page now renders correctly.

6) Click the 'ILL request log' toolbar button. Confirm that both the
IncDocs and ReprintsDesk entries are shown.

Signed-off-by: Hannah Prince <helm.consortium.nhs.net>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-01 15:42:17 +00:00
..
Backend Bug 40105: Patrons cannot add notes when creating an ILL 2026-03-05 08:33:32 -07:00
Batch Bug 42397: Add 'ILL_BATCHES' action_logs modulename 2026-06-19 12:00:16 +00:00
ISO18626 Bug 37762: (QA follow-up): Warn and return 500 on schema validation failure in progress_request 2026-05-15 08:11:12 -06:00
Request Bug 40504: Auto functionality: 2026-03-26 14:21:22 +01:00
Backend.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Batch.pm Bug 41950: (follow-up) Add DBIC relationship aliases for +count embeds 2026-06-29 16:19:49 +00:00
Batches.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Comment.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Comments.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
ISO18626.pm Bug 37762: (QA follow-up): Add ShippedReturn support action type 2026-05-08 12:25:49 -06:00
Request.pm Bug 42653: get_backend_plugin should cache results per backend name 2026-09-01 15:42:17 +00:00
Requests.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00