Hi,

Great module, does what it says on the tin except when you click on any other link on the page it seems to set the cookie to accepted. Not sure if I'm incorrect in understanding how its suppose to behave but I assume by clicking on the "Yes I agree" button, only then will the cookie be accepted?

I found in eu_cookie_compliance.js line 18:

$('a, input[type=submit]').bind('click.eu_cookie_compliance', function(){

Is the culprit where clicking any link on the page sets the cookie. By changing that line of code to:

$('input[type=submit]').bind('click.eu_cookie_compliance', function(){

It behaved as I expected.

This is the first time I've ever reported a bug here so apologies if this post is a bit rough around the edges. Not sure what happens next as I've made the code changes locally and I'm surprised no body else has picked up on this.

Steve

Comments

Miszel’s picture

Status: Active » Closed (works as designed)

Hi Steve,

Thanks for reporting however this is not a bug but a feature as per description on the module page.

Iine 18 is exucuted under a condition:

if (clicking_confirms) {
  $('a, input[type=submit]').bind('click.eu_cookie_compliance'

This feature can be switched off on the admin page by unchecking the 'Consent by clicking' checkbox.

Marcin

stevecheng’s picture

Hi Marcin,

Thanks for the reply, sorry I missed that on the description page.

Steve

borys’s picture

Hi Marcin,

But it looks like this feature is missing for Drupal 7 version, can you add there as well?

Thanks!

Miszel’s picture

Title: All clicks on the page appear to set cookie » Consent by clicking should be optional
Version: 6.x-1.8 » 7.x-1.x-dev
Category: bug » feature
Priority: Critical » Major
Status: Closed (works as designed) » Needs work

Yes, this should be forward ported. Changed the title to better reflect the problem.

Miszel’s picture

Status: Needs work » Needs review

And now commitetd to 7.x-1.x. If you could test it and confirm that it works, I will make a release.

borys’s picture

I did a quick test, and I can confirm that it works as expected.

Marcin, thanks a lot for very quick response and fix!

Miszel’s picture

Status: Needs review » Closed (fixed)

Thank you both for bringing that up. It is now in 7.x-1.10.

  • Commit 91bb291 on 7.x-1.x, 7.x-2.x by Marcin Pajdzik:
    #2071319 - Consent by clicking should be optional