[Bug 38257] New: Several functionalities broken in cart pop up
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Bug ID: 38257 Summary: Several functionalities broken in cart pop up Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: emmi.takkinen@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org For some reason change made in bug 37033 to cart pop up has broken its functionalities. All following functionalities are now broken: - More details - Send - Download - Print - Empty and close - Remove - Add to a list - Place hold - Batch modify - Batch delete To reproduce: 1. Search for items and add one or more search results to your cart. 2. Open cart. 3. Attempt to use one functionality mentioned above. => Either nothing happens or table is loaded again with no items in table. However items are still displayed in cart when it's opened again. Also following errors are displayed in browsers console:
Uncaught TypeError: antiClickjack is null Uncaught TypeError: $(...).dataTable is not a function
Removing line [% INCLUDE 'intranet-bottom.inc' popup_window=1 %] from basket.tt fixes the problem, but then plugin intranet_js won't work. -- 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=38257 --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Welp, it seems this one was easy to tackle. Moving line [% INCLUDE 'intranet-bottom.inc' popup_window=1 %] above other include lines fixes the issue. However we still need to make sure that this doesn't cause same problem which bug 37033 fixed. -- 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=38257 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |emmi.takkinen@koha-suomi.fi |ity.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=38257 --- Comment #2 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 173263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173263&action=edit Bug 38257: Fix cart pop up functionalities Almost all functionalities in cart pop up were broken due changes made in bug 37033. Also following errors were displayed in browsers console:
Uncaught TypeError: antiClickjack is null Uncaught TypeError: $(...).dataTable is not a function
This happens because when 'intranet-bottom.inc' is loaded after other .inc files in page. To test: 1. Search for items and add one or more search results to your cart. 2. Open cart. 3. Attempt to use one or more functionalities (download, remove item etc.). => Either nothing happens or table is loaded again with no items in table. However items are still displayed in cart when it's opened again. 4. Apply this patch, restart services if needed. 5. Again attempt to download, remove items, print etc. from cart => Everything should now work as expected. Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #3 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Lari tested this and plugins should still work as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=37033 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #4 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- There is still a problem with Download button. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173263|0 |1 is obsolete| | --- Comment #5 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 173488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173488&action=edit Bug 38257: Fix cart pop up functionalities Almost all functionalities in cart pop up were broken due changes made in bug 37033. Also following errors were displayed in browsers console:
Uncaught TypeError: antiClickjack is null Uncaught TypeError: $(...).dataTable is not a function
This happens because when 'intranet-bottom.inc' is loaded after other .inc files in page. To test: 1. Search for items and add one or more search results to your cart. 2. Open cart. 3. Attempt to use one or more functionalities (download, remove item etc.). => Either nothing happens or table is loaded again with no items in table. However items are still displayed in cart when it's opened again. 4. Apply this patch, restart services if needed. 5. Again attempt to download, remove items, print etc. from cart => Everything should now work as expected. Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 --- Comment #6 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 173489 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173489&action=edit Bug 38257: Do not use js_includes.inc in two different files Downloading cart didn't work because js_includes.inc file was included both in basket.tt and intranet-bottom.inc. This patch removes related codeline from basket.tt. To test: 1. Search for items and add one or more search results to your cart. 2. Open cart. 3. Attempt to download items from your cart. => Either nothing happens. 4. Apply this patch, restart services if needed. 5. Again attempt to download. => Download menu should now work as expected. Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173489|0 |1 is obsolete| | --- Comment #7 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 173683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173683&action=edit Bug 38257: Do not use js_includes.inc in two different files Downloading cart didn't work because js_includes.inc file was included both in basket.tt and intranet-bottom.inc. This patch removes related codeline from basket.tt. To test: 1. Search for items and add one or more search results to your cart. 2. Open cart. 3. Attempt to download items from your cart. => Either nothing happens. 4. Apply this patch, restart services if needed. 5. Again attempt to download. => Download menu should now work as expected. Sponsored-by: Koha-Suomi Oy Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 SamSowanick <sam.sowanick@corvallisoregon.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sam.sowanick@corvallisorego | |n.gov Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |aleisha@catalyst.net.nz QA Contact|testopia@bugs.koha-communit |aleisha@catalyst.net.nz |y.org | --- Comment #8 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Sorry team I'm not able to reproduce the bug at all. Can you provide more information about what might cause the cart to break so I can properly test this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 --- Comment #9 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- (In reply to Aleisha Amohia from comment #8)
Sorry team I'm not able to reproduce the bug at all.
Can you provide more information about what might cause the cart to break so I can properly test this?
Are you testing with item search cart or e.g. acquisitions cart? This is related to the former one. In bug 37033 we added this line to basket.tt file:
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
It was added after other include and asset files in the same file:
[% INCLUDE js_includes.inc %] [% INCLUDE 'datatables.inc' %] [% Asset.js("js/cart.js") | $raw %] [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
It seems that this prevents those other files from working properly, leading to every functionality of the cart not working and following errors in browsers console (last one strongly suggest that datatables.inc is not loaded properly):
Uncaught TypeError: antiClickjack is null Uncaught TypeError: $(...).dataTable is not a function
Moving intranet-bottom.inc as before all those other files fixed most of the functionalities, but downloading the cart was still not working. In intranet-bottom.inc file js_includes.inc is also declared at the bottom of the file. So my guess is that somehow declaring js_includes.inc both in intranet-bottom.inc and basket.tt prevents js_includes.inc from working. After moving it from basket.tt, downloading started working again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173488|0 |1 is obsolete| | --- Comment #10 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 173835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173835&action=edit Bug 38257: Fix cart pop up functionalities Almost all functionalities in cart pop up were broken due changes made in bug 37033. Also following errors were displayed in browsers console:
Uncaught TypeError: antiClickjack is null Uncaught TypeError: $(...).dataTable is not a function
This happens because when 'intranet-bottom.inc' is loaded after other .inc files in page. To test: 1. Search for items and add one or more search results to your cart. 2. Open cart. 3. Attempt to use one or more functionalities (download, remove item etc.). => Either nothing happens or table is loaded again with no items in table. However items are still displayed in cart when it's opened again. 4. Apply this patch, restart services if needed. 5. Again attempt to download, remove items, print etc. from cart => Everything should now work as expected. Sponsored-by: Koha-Suomi Oy Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173683|0 |1 is obsolete| | --- Comment #11 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 173836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173836&action=edit Bug 38257: Do not use js_includes.inc in two different files Downloading cart didn't work because js_includes.inc file was included both in basket.tt and intranet-bottom.inc. This patch removes related codeline from basket.tt. To test: 1. Search for items and add one or more search results to your cart. 2. Open cart. 3. Attempt to download items from your cart. => Either nothing happens. 4. Apply this patch, restart services if needed. 5. Again attempt to download. => Download menu should now work as expected. Sponsored-by: Koha-Suomi Oy Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.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=38257 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.06 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to main |Pushed to stable --- Comment #13 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to oldstable |Needs documenting --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Looks like this does not impact 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38257 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |david@davidnind.com Resolution|--- |FIXED --- Comment #15 from David Nind <david@davidnind.com> --- Bug fix, no user interface changes - no update required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org