| Summary: | Only set bibs_selected cookie when BrowseResultSelection is activated | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
| Component: | Searching | Assignee: | Owen Leonard <oleonard> |
| Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, martin.renvoize, nick |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | 19290 | ||
| Bug Blocks: | 21024 | ||
| Attachments: |
Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated
Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated |
||
|
Description
Katrin Fischer
2018-06-03 09:45:35 UTC
Created attachment 75771 [details] [review] Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated This patch adds a system preference check around the call to the JavaScript include which sets the bibs_selected cookie. With BrowseResultsSelection disabled, the cookie should never be set. To test you should be using a browser with a tool for inspecting cookies. View the cookies for your Koha domain under each of these conditions, clearing cookies between each step: Without the patch applied: - With BrowseResultSelection enabled, search for any item. Your cookie tool should report that you have a bibs_selected cookie stored. - With BrowseResultSelection disabled, search for any item. You should have a bibs_selected cookie. With the patch applied: - With the BrowseResultSelection system preference enabled, search for any item. Your cookie tool should report that you have a bibs_selected cookie stored. - With BrowseResultSelection disabled, search for any item. You should have no bibs_selected cookie. Created attachment 76196 [details] [review] Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated This patch adds a system preference check around the call to the JavaScript include which sets the bibs_selected cookie. With BrowseResultsSelection disabled, the cookie should never be set. To test you should be using a browser with a tool for inspecting cookies. View the cookies for your Koha domain under each of these conditions, clearing cookies between each step: Without the patch applied: - With BrowseResultSelection enabled, search for any item. Your cookie tool should report that you have a bibs_selected cookie stored. - With BrowseResultSelection disabled, search for any item. You should have a bibs_selected cookie. With the patch applied: - With the BrowseResultSelection system preference enabled, search for any item. Your cookie tool should report that you have a bibs_selected cookie stored. - With BrowseResultSelection disabled, search for any item. You should have no bibs_selected cookie. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Hum yes, "commons.js" was certainly not the best name. Maybe the test must be moved to common.js, but not blocker for this quick fix. Created attachment 76289 [details] [review] Bug 20864: Only set bibs_selected cookie when BrowseResultSelection is activated This patch adds a system preference check around the call to the JavaScript include which sets the bibs_selected cookie. With BrowseResultsSelection disabled, the cookie should never be set. To test you should be using a browser with a tool for inspecting cookies. View the cookies for your Koha domain under each of these conditions, clearing cookies between each step: Without the patch applied: - With BrowseResultSelection enabled, search for any item. Your cookie tool should report that you have a bibs_selected cookie stored. - With BrowseResultSelection disabled, search for any item. You should have a bibs_selected cookie. With the patch applied: - With the BrowseResultSelection system preference enabled, search for any item. Your cookie tool should report that you have a bibs_selected cookie stored. - With BrowseResultSelection disabled, search for any item. You should have no bibs_selected cookie. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Awesome work all! Pushed to master for 18.11.x Pushed to 18.05.x for 18.05.02 Bad one, there is a JS error on the search result, which breaks all JS functionalities (add to basket, list, etc.) (In reply to Jonathan Druart from comment #8) > Bad one, there is a JS error on the search result, which breaks all JS > functionalities (add to basket, list, etc.) See bug 20864. Reverted in 18.05.x series. Anyone have an opinion on whether I should work on backporting this? |