Bug 19702

Summary: Basket not displaying correctly on home page
Product: Koha Reporter: David Bourgault <david.bourgault>
Component: OPACAssignee: David Bourgault <david.bourgault>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, josef.moravec, nick, philippe.blouin
Version: Main   
Hardware: All   
OS: All   
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
Bug 19702 - Correct cookie path in Basket.js
Bug 19702: Correct cookie path in Basket.js

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