Hi,
I believe a piece of code was forgotten when reworking the setting holding eu_cookie_compliance's cookie name, making the code erasing cookies erase its own cookie.
This said, in my case this loop does not remove any of my cookies, so I'm not sure what's wrong... which maybe suggests something is wrong with my environment or that this function does not cover all use-cases?
Anyway, I still think the following is invalid in eu_cookie_compliance.js -> Drupal.behaviors.eu_cookie_compliance_popup_block_cookies :
// Add the EU Cookie Compliance cookie.
euCookieComplianceWhitelist.push((settings.eu_cookie_compliance.cookie_name === '') ? 'cookie-agreed' : settings.eu_cookie_compliance.cookie_name);
and should be replaced with:
var cookieName = (typeof eu_cookie_compliance_cookie_name === 'undefined' || eu_cookie_compliance_cookie_name === '') ? 'cookie-agreed' : eu_cookie_compliance_cookie_name;
euCookieComplianceWhitelist.push(cookieName);
Your view on this?
Comments
Comment #2
pacproduct commentedPatch attached.
Comment #3
pureh2o commentedHi,
I have issues with the cookies being removed too frequently, leading to a significant slowdown of my entire website, especially on ajax calls.
For each and every ajax call, regardless of the type of setting I would choose in the EU cookie compliance configuration (e.g. no consent, opt-in, do not store, basic store..), there was a call to this function that you highlighted above on line 437, and then an action on the cookie...
I applied your patch and magic happened, the problem got fixed, there is no more performance problem.
However with your patch, I cannot make the banner for the first-time user show up anymore. The I used to test the banner in the past was to open a Chrome Incognito window, or to delete all the browsers's cache including all the cookies. In both cases the pop-up banner does not show-up anymore. Without changing anything then I reverted the patch back, and then the pop-up would appear.
I'm having limited software development knowledge so I can't judge what's wrong, but from what I can guess, the cookie (whichever cookie that might be) does not need to be read/written every time there is an ajax call/load of page. If the user provided the agreement/disagreement in the beginning/once, there should be no more need to do something with the cookie.
Comment #4
svenryen commentedHi pureh2o, do you have a link to the site in question? You can send it to me through my contact form (click my avatar, then click Contact) if you don't feel like submitting it to the issue queue.
Comment #5
pureh2o commentedI sent you a message via the Contact form
Comment #6
pureh2o commentedHi svenryne,
Did you have the chance to check what I sent you. I had to disable the module, thus I'd like to re-enable it, but I need to fix this issue first.
I'm happy to help in explaining better the scenario and enabling and disabling the patch so that you can better under the issue.
Many thanks and happy new year
Comment #7
svenryen commentedComment #8
svenryen commentedComment #9
pureh2o commentedHi svenryen,
Does your last post means that it's fixed? Does the banner appear now with the latest 7.x-1.x-dev of 7th of March. In the release notes I couldn't find this fix.
Thank you
Comment #10
svenryen commentedPatch needs review, says the status :)
If it was status Fixed, it would indeed be fixed.
Comment #11
svenryen commentedReviewed and tested. Thanks for catching this. The issue doesn't exist in D8.
Comment #13
svenryen commented