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.

Comments

shoroshanska created an issue. See original summary.

shoroshanska’s picture

Status: Active » Needs review
StatusFileSize
new2.33 KB

Please review my patch.

shoroshanska’s picture

gambry’s picture

Status: Needs review » Reviewed & tested by the community

This 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!

ysamoylenko’s picture

The patch looks good to me! Thanks for your contribution @shoroshanska.

vitaliyb98’s picture

Added which could be applied

matthiasm11’s picture

+1 for #6

shoroshanska’s picture

I don't see any difference between my patch #2 and VitaliyB98's patch. Could you please clarify what you changed?

gambry’s picture

@shoroshanska there is an additional space in your patch, from what I can see.

i-trokhanenko’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

I'm going to commit the #6 patch to 8.x-3.x

  • i-trokhanenko committed 7bc12169 on 8.x-3.x
    Issue #3311873 by shoroshanska, VitaliyB98: Cookie life time is always...
i-trokhanenko’s picture

Status: Patch (to be ported) » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.