Bugzilla – Attachment 190827 Details for
Bug 41512
ILLCheckAvailability stage table doesn't render
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41512: Fix ILLCheckAvailability
Bug-41512-Fix-ILLCheckAvailability.patch (text/plain), 3.21 KB, created by
Pedro Amorim
on 2026-01-02 14:20:53 UTC
(
hide
)
Description:
Bug 41512: Fix ILLCheckAvailability
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2026-01-02 14:20:53 UTC
Size:
3.21 KB
patch
obsolete
>From 4d502d0de1fa726cd68e7f1186680b266c482abf Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Fri, 2 Jan 2026 14:18:36 +0000 >Subject: [PATCH] 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 >--- > koha-tmpl/intranet-tmpl/prog/js/ill-availability.js | 3 ++- > koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js b/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js >index 536c23727b1..8807dd95b6f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-availability.js >@@ -101,7 +101,8 @@ $(document).ready(function () { > column.render = renders[column.data]; > } > }); >- tableDef.ajax.dataSrc = function (data) { >+ tableDef.ajax.dataSrc = function (json) { >+ let data = json.data; > var results = data.results.search_results; > // The source appears to be returning it's own pagination > // data >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js b/koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js >index 49631c9ce1a..7ece769c332 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js >@@ -101,7 +101,8 @@ $(document).ready(function () { > column.render = renders[column.data]; > } > }); >- tableDef.ajax.dataSrc = function (data) { >+ tableDef.ajax.dataSrc = function (json) { >+ let data = json.data; > var results = data.results.search_results; > // The source appears to be returning it's own pagination > // data >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41512
:
190827
|
190853