Bugzilla – Attachment 177953 Details for
Bug 39112
Item search returns error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39112: Fix item search results error
Bug-39112-Fix-item-search-results-error.patch (text/plain), 1.73 KB, created by
Caroline Cyr La Rose
on 2025-02-12 17:32:16 UTC
(
hide
)
Description:
Bug 39112: Fix item search results error
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2025-02-12 17:32:16 UTC
Size:
1.73 KB
patch
obsolete
>From a1af1b56d22107102fb6ce6a10da59c64b7b1129 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 12 Feb 2025 17:23:14 +0000 >Subject: [PATCH] Bug 39112: Fix item search results error > >This patch updates the template which generates item search JSON (for >use by the DataTable) to add a 'collapse' FILTER around it. This >eliminates whitespace which causes the JSON to be invalid. > >To test, apply the patch and perform an item search in the staff >interface. It should return results without error. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >--- > .../prog/en/modules/catalogue/itemsearch_json.tt | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt >index 90b677a3ed..bb39b1b3c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt >@@ -1,6 +1,8 @@ >-{ "draw": [% draw | html %], "recordsTotal": [% total_rows | html %], "recordsFiltered": [% total_rows | html %], "data": [ >-[%- FOREACH item IN results -%] >- [%- INCLUDE 'catalogue/itemsearch_item.json.inc' item = item, user = user -%] >- [%- UNLESS loop.last %],[% END -%] >-[%- END -%] >-] } >+[% FILTER collapse %] >+ { "draw": [% draw | html %], "recordsTotal": [% total_rows | html %], "recordsFiltered": [% total_rows | html %], "data": [ >+ [% FOREACH item IN results %] >+ [% INCLUDE 'catalogue/itemsearch_item.json.inc' item = item, user = user %] >+ [% UNLESS loop.last %],[% END %] >+ [% END %] >+ ] } >+[% END %] >-- >2.43.0
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 39112
:
177952
|
177953
|
177973
|
177974