Bugzilla – Attachment 177973 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.81 KB, created by
Jonathan Druart
on 2025-02-12 21:11:16 UTC
(
hide
)
Description:
Bug 39112: Fix item search results error
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-02-12 21:11:16 UTC
Size:
1.81 KB
patch
obsolete
>From fb39f12a4de4d9ebcd8eb9159ac3f61694049e30 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> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../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 90b677a3ed7..bb39b1b3c77 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.34.1
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