[Bug 11829] New: JavaScript error on staff client biblio details pages if template variables are undefined
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Bug ID: 11829 Summary: JavaScript error on staff client biblio details pages if template variables are undefined Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org In the JavaScript included in cat-toolbar.inc: var holdcount = [% holdcount %] If [% holdcount %] is undefined that line triggers an error. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11821 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Looks like this was caused by the QA follow-up to 9823 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 25588 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25588&action=edit Bug 11829 - JavaScript error on staff client biblio details pages if template variables are undefined The JavaScript included in cat-toolbar.inc expects several variables to be passed to the template for use in calculations. Several scripts to not pass the required variables to the template, leading to a JS error. This patch re-adds (See Bug 9823) hold count calculation to the required scripts and copies the acquisitions-related count calculation from detail.pl into related bibliographic detail scripts so that the commonnly-included cat-toolbar.inc can receive correct values. To test, locate a bibliographic record which has no holds and is not used in a current or deleted order, but which has a local cover image attached. Check the following views to confirm there is no JavaScript error: - Normal - MARC - Labeled MARC - ISBD - Items - Images (from the Images tab on the "Normal" detail page) Next, locate a bibliographic record with no items attached which is used in an Acquisitions order. On each of the pages listed above, choose "Delete record" from the Edit menu. This should trigger a warning that the record is used in an order. Cancel the deletion. Finally, delete the order which references the bibliographic record. On each of the pages listed above, choose "Delete record" again. This should trigger a warning that the record is used in a deleted order. Cancel the deletion. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 11831 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 25593 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25593&action=edit [Signed-off] Bug 11829 - JavaScript error on staff client biblio details pages if template variables are undefined The JavaScript included in cat-toolbar.inc expects several variables to be passed to the template for use in calculations. Several scripts to not pass the required variables to the template, leading to a JS error. This patch re-adds (See Bug 9823) hold count calculation to the required scripts and copies the acquisitions-related count calculation from detail.pl into related bibliographic detail scripts so that the commonnly-included cat-toolbar.inc can receive correct values. To test, locate a bibliographic record which has no holds and is not used in a current or deleted order, but which has a local cover image attached. Check the following views to confirm there is no JavaScript error: - Normal - MARC - Labeled MARC - ISBD - Items - Images (from the Images tab on the "Normal" detail page) Next, locate a bibliographic record with no items attached which is used in an Acquisitions order. On each of the pages listed above, choose "Delete record" from the Edit menu. This should trigger a warning that the record is used in an order. Cancel the deletion. Finally, delete the order which references the bibliographic record. On each of the pages listed above, choose "Delete record" again. This should trigger a warning that the record is used in a deleted order. Cancel the deletion. I went through the test plan, everything works OK. It resolves Bug 11831 as well. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25588|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 25604 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25604&action=edit [PASSED QA] Bug 11829 - JavaScript error on staff client biblio details pages if template variables are undefined The JavaScript included in cat-toolbar.inc expects several variables to be passed to the template for use in calculations. Several scripts to not pass the required variables to the template, leading to a JS error. This patch re-adds (See Bug 9823) hold count calculation to the required scripts and copies the acquisitions-related count calculation from detail.pl into related bibliographic detail scripts so that the commonnly-included cat-toolbar.inc can receive correct values. To test, locate a bibliographic record which has no holds and is not used in a current or deleted order, but which has a local cover image attached. Check the following views to confirm there is no JavaScript error: - Normal - MARC - Labeled MARC - ISBD - Items - Images (from the Images tab on the "Normal" detail page) Next, locate a bibliographic record with no items attached which is used in an Acquisitions order. On each of the pages listed above, choose "Delete record" from the Edit menu. This should trigger a warning that the record is used in an order. Cancel the deletion. Finally, delete the order which references the bibliographic record. On each of the pages listed above, choose "Delete record" again. This should trigger a warning that the record is used in a deleted order. Cancel the deletion. I went through the test plan, everything works OK. It resolves Bug 11831 as well. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> - Printing from MARC and ISBD view works again - No more Javascript errors found - Deleting a record with attached order gives the correct warning, both for ordered and cancelled. Passes all tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #25593|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11836 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #6 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Owen! I've opened bug 11836 for the code duplication (re)introduced by this patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jesse@bywatersolutions.com --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- *** Bug 11841 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m Depends on| |9780 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 --- Comment #8 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- This patch corrects also the feature added by bug 9780. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |9823 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Heather Braum <hbraum@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hbraum@nekls.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11829 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #9 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Pushed to 3.14.x, will be in 3.14.07 (Quite a dirty bug) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org