Bugzilla – Attachment 162577 Details for
Bug 36099
JS error in console on non-existent biblio record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36099: count and holdcount template vars into JS vars should default to 0 if empty
Bug-36099-count-and-holdcount-template-vars-into-J.patch (text/plain), 1.60 KB, created by
Jonathan Druart
on 2024-02-29 09:06:41 UTC
(
hide
)
Description:
Bug 36099: count and holdcount template vars into JS vars should default to 0 if empty
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-02-29 09:06:41 UTC
Size:
1.60 KB
patch
obsolete
>From 250fd35f7872fbf64c972e06adb28b30545647da Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 26 Feb 2024 10:03:22 +0000 >Subject: [PATCH] Bug 36099: count and holdcount template vars into JS vars > should default to 0 if empty > >Visit: >http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=4321 >Notice you have 2 console errors: >1) Uncaught SyntaxError: Unexpected token ';' >2) Uncaught ReferenceError: biblionumber is not defined > >Apply patch. Repeat. Notice no error shows. >Visit an existing biblionumber. Confirm all is well. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >index 3ab04f9af12..fc88b79abff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >@@ -3,8 +3,8 @@ > <script> > /* Some required variables from the template */ > var biblionumber = [% biblionumber | html %]; >- var count = [% count | html %]; >- var holdcount = [% holdcount | html %]; >+ var count = [% count || 0 | html %]; >+ var holdcount = [% holdcount || 0 | html %]; > [% SET orders = biblio.orders %] > [% SET current = Context.Scalar(orders, "filter_by_current") %] > [% SET cancelled = Context.Scalar(orders, "filter_by_cancelled") %] >-- >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 36099
:
162426
|
162431
| 162577