Bug 19702 - Basket not displaying correctly on home page
Summary: Basket not displaying correctly on home page
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: David Bourgault
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-27 21:04 UTC by David Bourgault
Modified: 2019-10-14 19:56 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19702 - Correct cookie path in Basket.js (1.33 KB, patch)
2017-11-27 21:13 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 19702 - Correct cookie path in Basket.js (1.12 KB, patch)
2017-11-28 00:28 UTC, Dilan Johnpullé
Details | Diff | Splinter Review
Bug 19702: Correct cookie path in Basket.js (1.59 KB, patch)
2017-12-21 20:07 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Bourgault 2017-11-27 21:04:27 UTC
When viewing the "base url" of the OPAC catalog, the basket is not displayed correctly:

Say your website is `opac.books.com`, the basket will be displayed correctly for all page under `opac.books.com/cgi-bin/koha/` but not on `opac.books.com/`
Comment 1 David Bourgault 2017-11-27 21:13:35 UTC
Created attachment 69402 [details] [review]
Bug 19702 - Correct cookie path in Basket.js

This corrects the cookie path in bootstrap/js/basket.js. It used to take the default value (current page path), but will now be "/"

Test plan:
0) Visit the OPAC, add a book to your basket
1) Navigate to the OPAC's homepage (www.domain.com, without the /cgi-bin/koha)
    -> The basket will display as empty
2) Apply patch
3) Clear your cookies and your cache
4) Redo step 1)
    -> Basket will display correctly
Comment 2 Dilan Johnpullé 2017-11-28 00:28:16 UTC
Created attachment 69407 [details] [review]
Bug 19702 - Correct cookie path in Basket.js

Patch applies without issue and functions as descibed.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Comment 3 Josef Moravec 2017-12-21 20:07:35 UTC
Created attachment 70083 [details] [review]
Bug 19702: Correct cookie path in Basket.js

This corrects the cookie path in bootstrap/js/basket.js. It used to take
the default value (current page path), but will now be "/"

Test plan:
0) Visit the OPAC, add a book to your basket
1) Navigate to the OPAC's homepage (www.domain.com, without the
    /cgi-bin/koha)
    -> The basket will display as empty
    2) Apply patch
    3) Clear your cookies and your cache
    4) Redo step 1)
        -> Basket will display correctly

Patch applies without issue and functions as descibed.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Jonathan Druart 2017-12-22 16:17:00 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 5 Nick Clemens (kidclamp) 2018-01-15 16:45:29 UTC
Awesome work all, pushed to stable for 17.11.02
Comment 6 Fridolin Somers 2018-01-19 13:17:36 UTC
Pushed to 17.05.x for v17.05.08