Problem/Motivation

If version cookie doesn't exist, some use cases do want to retrigger the popup.

Steps to reproduce

  1. Agree to to cookie policy before the module has the Cookie Policy Version feature #2987584: Terms version change (GDPR regulation)
  2. Update to a module version which has that feature
  3. Surf to the website again and notice you won't have to re-agree, while some use cases would like this

Proposed resolution

We removed:

      if (typeof Drupal.eu_cookie_compliance.getVersion() === 'undefined') {
        // If version doesn't exist as a cookie, set it to the current one.
        // For modules that update to this, it prevents needless retriggering
        // For first time runs, it makes no difference as the other IF statements
        // below will still cause the popup to trigger
        // For incrementing the version, it also makes no difference as either it's
        // a returning user and will have a version set, or it's a new user and
        // the other checks will trigger it.
        Drupal.eu_cookie_compliance.setVersion();
      }

But it'd probably better to keep that as default behaviour and introduce a setting to skip this behaviour.

Remaining tasks

Patch, test, ...

User interface changes

Yes. Configuration option addition.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#5 default-version-fix_3170219-5.patch2.46 KBreszli

Comments

PieterDC created an issue. See original summary.

pieterdc’s picture

Title: Option to retrigger popup instead of always trying to prevent it » Option to retrigger popup instead of trying to prevent it when no policy version is set
svenryen’s picture

Title: Option to retrigger popup instead of trying to prevent it when no policy version is set » [1.x] Option to retrigger popup instead of trying to prevent it when no policy version is set

I see the point. We'll try to get this into 1.x before we start 2.x.

svenryen’s picture

Title: [1.x] Option to retrigger popup instead of trying to prevent it when no policy version is set » [1.x][2.0.x] Option to retrigger popup instead of trying to prevent it when no policy version is set
reszli’s picture

StatusFileSize
new2.46 KB

I ran into the same use-case, where I needed to retrigger the popup for users who already expressed consent on the old version (without categories)

attached patch (against 8.x-1.19) works for me

svenryen’s picture

Thanks for the patch. We'll get this into the next verison.

svenryen’s picture

Status: Active » Needs review

  • svenryen committed b40e04d on 8.x-1.x authored by reszli
    Issue #3170219 by reszli, svenryen, PieterDC: [1.x][2.0.x] Option to...
svenryen’s picture

Status: Needs review » Fixed

Committed, thanks for the contribution!

Status: Fixed » Closed (fixed)

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