Bug 41512 - ILLCheckAvailability stage table doesn't render
Summary: ILLCheckAvailability stage table doesn't render
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
Depends on:
Blocks:
 
Reported: 2026-01-02 14:17 UTC by Pedro Amorim
Modified: 2026-01-03 02:40 UTC (History)
6 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:
This fixes creating ILL requests when the ILLCheckAvailability system preference is used - the checking for availability was not completed and the table was not shown.
Version(s) released in:
Circulation function:


Attachments
Bug 41512: Fix ILLCheckAvailability (3.21 KB, patch)
2026-01-02 14:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41512: Fix ILLCheckAvailability (3.25 KB, patch)
2026-01-03 02:33 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2026-01-02 14:17:51 UTC

    
Comment 1 Pedro Amorim 2026-01-02 14:20:53 UTC
Created attachment 190827 [details] [review]
Bug 41512: Fix ILLCheckAvailability

1) Install the unpaywall plugin:
  https://github.com/openfifth/koha-plugin-ill-avail-unpaywall/releases/tag/1.0.2
2) Configure an email address on the plugin configuration (I believe any email address should work):
<staff_url>/cgi-bin/koha/plugins/run.pl?class=Koha%3A%3APlugin%3A%3ACom%3A%3APTFSEurope%3A%3AAvailabilityUnpaywall&method=configure
3) Enable ILLModule and ILLCheckAvailability sys prefs
4) Create a new ILL request, visit:
  <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
5) Pick type: journal article and enter the DOI: 10.1002/bjs.1800621024
6) Enter a cardnumber e.g. '42' for koha user and any library.
7) Notice the availability screen never renders, a console error is logged on the browser.
8) Apply patch. Refresh. Repeat.

This appears to have stopped working after bug 26553. Using git bisect, after bug 26553 (cc09868152f7e1c4a0883a5ebf3dfa948827a384), this started returning a 'bad request: malformed query string' because query params were being sent to the plugin API route (which doesn't consider them). Bug 40865 then fixed the bad request error, but resulted in the console error we see now, which is fixed by this patch.
ajax.dataSrc appears to now be returning an additional level of 'data' due to datatables upgrade (?), this patch changes the dataSrc override to be more in line with the example doc at https://datatables.net/reference/option/ajax.dataSrc
Comment 2 David Nind 2026-01-03 02:33:30 UTC
Created attachment 190853 [details] [review]
Bug 41512: Fix ILLCheckAvailability

1) Install the unpaywall plugin:
  https://github.com/openfifth/koha-plugin-ill-avail-unpaywall/releases/tag/1.0.2
2) Configure an email address on the plugin configuration (I believe any email address should work):
<staff_url>/cgi-bin/koha/plugins/run.pl?class=Koha%3A%3APlugin%3A%3ACom%3A%3APTFSEurope%3A%3AAvailabilityUnpaywall&method=configure
3) Enable ILLModule and ILLCheckAvailability sys prefs
4) Create a new ILL request, visit:
  <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
5) Pick type: journal article and enter the DOI: 10.1002/bjs.1800621024
6) Enter a cardnumber e.g. '42' for koha user and any library.
7) Notice the availability screen never renders, a console error is logged on the browser.
8) Apply patch. Refresh. Repeat.

This appears to have stopped working after bug 26553. Using git bisect, after bug 26553 (cc09868152f7e1c4a0883a5ebf3dfa948827a384), this started returning a 'bad request: malformed query string' because query params were being sent to the plugin API route (which doesn't consider them). Bug 40865 then fixed the bad request error, but resulted in the console error we see now, which is fixed by this patch.
ajax.dataSrc appears to now be returning an additional level of 'data' due to datatables upgrade (?), this patch changes the dataSrc override to be more in line with the example doc at https://datatables.net/reference/option/ajax.dataSrc

Signed-off-by: David Nind <david@davidnind.com>