Hi,

on d6 site we have Domain access module 6.x-2.12 enabled and EU cookies module 6.x-1.8.
We would like if the user has once agreed to accept cookies to not disturb him with the pop-up again when he switches to another subdomain.
Now if the user visits main.mysite.com the pop-up appears and he agrees with cookies. Then he goes to second.mysite.com and the pop-up appears again. How can we limit the pop-up to appears only once?
Please advice.
Thank you

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Miszel’s picture

Category: support » feature

At the moment, you cannot do that. Acceptance of cookies is recorded per language/domain.

marsdk’s picture

I have patched the module, so you can add the domain in your settings for the module to achieve that subdomain can use the same cookie.

jessehs’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
3.87 KB

Not sure why, but I was having trouble actually setting the cookie to be the cookie domain I configured. This patch adds a dependency: jQuery.cookie:

https://github.com/carhartl/jquery-cookie

Setting the cookie this way makes things work.

rolled against 6.x-1.8

VisualFox’s picture

Version: 6.x-1.8 » 7.x-1.x-dev
FileSize
6.41 KB

Not sure why, but I was having trouble actually setting the cookie to be the cookie domain I configured.

That because you need to set the domain for the cookie for example

document.cookie = "cookie-agreed-"+Drupal.settings.eu_cookie_compliance.popup_language + "="+status+";expires=" + date.toUTCString() + ";domain=" + Drupal.settings.eu_cookie_compliance.popup_cookie_domain + ";path=" + Drupal.settings.basePath;
VisualFox’s picture

my patch was done against 7.x so I updated the issue to 7.x-1.x not sure that was the best practice. Code wise I didn't see any difference between 6.x and 7.x for this patch.

svenryen’s picture

Status: Needs review » Closed (fixed)