Problem/Motivation
In one of the previous patches, in calls to the createCookie() function in the simple_popup_blocks.js file, the cookie_days argument was replaced with the value 100. As a result, no matter what Cookie expiry value is set in the module settings, cookie is always created with a lifetime of 100 days.
Steps to reproduce
1. Add e new simple popup block to a page. Set a Cookie expiry value in the block settings other than 100:

2. Check that a new cookie is created with a lifetime of 100 days:

Proposed resolution
In calls to the createCookie() function, replace the value 100 with the cookie_days variable.
Remaining tasks
Add a patch.
User interface changes
No interface changes are expected for this issue.
API changes
No API changes are planned for this issue.
Data model changes
No data model changes are expected.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | simple-popup-blocks-cookie-lifetime-is-always-100-days-3311873-6.patch | 1.13 KB | vitaliyb98 |
| new_cookies_value.png | 50.37 KB | shoroshanska | |
| cookie_expiry_setting.png | 18.54 KB | shoroshanska |
Comments
Comment #2
shoroshanska commentedPlease review my patch.
Comment #3
shoroshanska commentedComment #4
gambryThis makes sense to me. I can see that JS variable defaults to 100 if not set, and the form defaults to 100 when creating a new block.
The only issue is if user has changed the value, and not reverted back to 100 after noticing that didn't work. But I don't think it would be wise to reset the values to 100.
RTBC! Thanks @shoroshanska!
Comment #5
ysamoylenko commentedThe patch looks good to me! Thanks for your contribution @shoroshanska.
Comment #6
vitaliyb98 commentedAdded which could be applied
Comment #7
matthiasm11 commented+1 for #6
Comment #8
shoroshanska commentedI don't see any difference between my patch #2 and VitaliyB98's patch. Could you please clarify what you changed?
Comment #9
gambry@shoroshanska there is an additional space in your patch, from what I can see.
Comment #10
i-trokhanenkoI'm going to commit the #6 patch to 8.x-3.x
Comment #12
i-trokhanenkoThanks!