Bugzilla – Attachment 183230 Details for
Bug 40127
JS error on biblio detail page when there are no items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40127: Remove JS error from the biblio detail page when no items
Bug-40127-Remove-JS-error-from-the-biblio-detail-p.patch (text/plain), 1.58 KB, created by
David Nind
on 2025-06-13 08:31:57 UTC
(
hide
)
Description:
Bug 40127: Remove JS error from the biblio detail page when no items
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-06-13 08:31:57 UTC
Size:
1.58 KB
patch
obsolete
>From de3382dbc630901b00eaeca906affdaa88bf8802 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 12 Jun 2025 09:59:05 +0200 >Subject: [PATCH] Bug 40127: Remove JS error from the biblio detail page when > no items > >"build_items_table is not defined" > >We should not try to build the items table if there are no items. > >Test plan: >Go to the bibliographic detail page of a biblio without items >You should not see errors in the browser's console > >Go to the bibliographic detail page of a biblio with items >You should not see errors in the browser's console >The table should be displayed and the different features should work as >before > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 398b41d0f2..f56c645ba1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -1732,7 +1732,7 @@ > items_tab_ids.forEach( function( tab_id, index ) { > > // Early return if the tab is not shown (ie. no table) >- if (!$("#%s-tab".format(tab_id)).length) return; >+ if (!$("#%s_table".format(tab_id)).length) return; > [% IF Koha.Preference('AlwaysShowHoldingsTableFilters') %] > build_items_table(tab_id, true, {}, build_items_table_drawncallback); > [% ELSE %] >-- >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 40127
:
183185
|
183186
|
183187
|
183188
|
183189
|
183190
|
183228
|
183229
| 183230 |
183283