[Bug 42277] New: JS error when viewing a subscription
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Bug ID: 42277 Summary: JS error when viewing a subscription Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org If no orders exist yet, there is a JS error in the console: Uncaught TypeError: can't access property "DataTable", table is undefined -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 196773 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196773&action=edit Bug 42277: Remove JS error when viewing a subscription If no orders exist yet, there is a JS error in the console: Uncaught TypeError: can't access property "DataTable", table is undefined Test plan: 0. Do no apply this patch 1. Create a new subscription and go to the detail view 2. Open the console and notice the JS error 3. Apply this patch 4. Confirm that the JS error is gone 5. Create an order from this subscription 6. Confirm that the orders table is displayed -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42293 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42293 [Bug 42293] Tidy all script tags - serials -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196773|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 196815 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196815&action=edit Bug 42277: Remove JS error when viewing a subscription If no orders exist yet, there is a JS error in the console: Uncaught TypeError: can't access property "DataTable", table is undefined Test plan: 0. Do no apply this patch 1. Create a new subscription and go to the detail view 2. Open the console and notice the JS error 3. Apply this patch 4. Confirm that the JS error is gone 5. Create an order from this subscription 6. Confirm that the orders table is displayed Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42309 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196815|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 --- Comment #3 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 197708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197708&action=edit Bug 42277: Remove JS error when viewing a subscription If no orders exist yet, there is a JS error in the console: Uncaught TypeError: can't access property "DataTable", table is undefined Test plan: 0. Do no apply this patch 1. Create a new subscription and go to the detail view 2. Open the console and notice the JS error 3. Apply this patch 4. Confirm that the JS error is gone 5. Create an order from this subscription 6. Confirm that the orders table is displayed Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 --- Comment #4 from Brendan Lawlor <blawlor@clamsnet.org> --- This works and makes sense to use optional chaining when a property or a function might not exist. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/... Testing notes: I also tested closing and opening a subscription and managed to get two slightly different errors. It's pretty cool how the dev tools link to subscription-detail.pl shows you the exact line where the error comes from, even though the line numbers are different. jquery-3.6.0.min_25.1200046.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading 'DataTable') TypeError: Cannot read properties of undefined (reading 'DataTable') at HTMLDocument.<anonymous> (http://localhost:8081/cgi-bin/koha/serials/subscription-detail.pl:2191:34) jquery-3.6.0.min_25.1200046.js:2 Uncaught TypeError: Cannot read properties of undefined (reading 'DataTable') at HTMLDocument.<anonymous> (subscription-detail.pl:2191:34) Nice work! Passing QA. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 --- Comment #6 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- *** Bug 42613 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42277 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_24_11_candidate, | |rel_25_05_candidate --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #7)
*** Bug 42613 has been marked as a duplicate of this bug. ***
Yep. Would be good to get this one backported to 25.05 and 24.11. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org