Cookie Control
Unable to accept/close (11 posts)

  1. Chris
    Posted 4 years ago #

    Just tried to get Cookie Control plugin working on a website of mine and having mixed results. It creates a popup without any issues and the "Read More" scroll works fine too. However it appears that the X to close the box, and the "I'm happy with this" doesn't work.

    Unable to get it to disappear or hide :(

    Any ideas?


  2. Chris
    Posted 4 years ago #

    By the way, the website I am testing it on is;

  3. zestylemon
    Posted 4 years ago #

    I'm not sure if you've managed to fix this or not but it works as expected for me using Firefox 11.0

  4. Chris
    Posted 4 years ago #

    I've got it to close now... this was because I was using an old version of JQuery. Changed my theme to point to the latest release from the JQuery website.

    However, now the Cookie Control opens on every page. Even when you click on I Am Happy With This... it will close, but on opening another page, it will open the popup again.

    I've checked the cookies on the website and on reads;
    Name: civicShowCookieIcon
    Value: yes
    Domain: .www.xmaselves.co.uk
    ... not the domain has a . at the beginning. Would this be at fault? Not sure where I can change this. Any help muchly appreciated.


  5. al2010
    Posted 4 years ago #

    I have exactly the same problem. When I click on 'I am happy' the plugin pops up again when I navigate to a different page. It is quite intrusive so as a temporary measure I have set the pop-up to disappear after three seconds - but that's not great. I wondered if it might be a problem with the cache. I use W3cache and have a similar issue with another pop-up message box on another site.

    Help would also be appreciated.

  6. Chris
    Posted 4 years ago #

    I've not got any cache taking place on this website, so that's not to blame. If you look at the cookie being placed by civicShowCookieIcon, what domain is placing it?

    Mine is .www.xmaselves.co.uk when I suspect it should be the domain but without the leading .

    Is yours the same?

  7. al2010
    Posted 4 years ago #

    Yes! Good piece of detective work. You are right about the cache - I disabled it and it made no difference to Cookie control. And the cookie is being placed on .domainname, rather than domainname. I have had a look at the Civic website, their Cookie Control Pop-up works correctly and places the cookie on domainname, rather than .domainname. So it looks like a coding error. There are only two files in the plugin: a php file and javascript file. I am not sure if I can find the error but will look. Thanks.

  8. Lee
    Posted 4 years ago #

    Did either of you manage to fix this? I'm having exactly the same problem, the cookie is showing my domain as '.domainname' but I'm not quite sure how to go about fixing it?

  9. Lee
    Posted 4 years ago #

    This appears to be a problem for a lot of people, it seems to be with javascript. I know little about js but I have managed to narrow it down to the following...

    Of my WordPress websites, those which use js only for cookie control are the ones which work fine. The WordPress websites which use js for other things (i.e. plugins) are making cookie control not work properly.

    This doesn't appear to be a conflict between cookie control and any specific plugin using js, just the use of js full stop.

    It appears to be happening on every website, not just mine.

    Could a fix possibly be developed?

  10. Paul Cole
    Posted 4 years ago #

    I have the same problem.

    I'm not too clever with code, but I noticed that clicking once doesn't actually set the allow cookie. If you click ”I am happy with this“ a second time, then check you browser's cookies, the following cookie will now be set:


    Bizarre. It's as if the plugin is blocking the cookie it has to set to allow cookies until it gets clicked again?

    I don't have too much that could conflict with the plugin. I don't allow comments, but use Google Analytics, a store and Fecebook/Twitter feeds.

    Site is studioonelongeaton.co.uk

  11. Paul Cole
    Posted 4 years ago #

    Right, I've had a bit of a play and the problem seems to be when I use the call back scripts.

    The plugin recommends that if you use Analytics, you need to set two callback scripts to fire: onAccept and onCookiesAllowed.

    I've removed them individually and re-loaded my pages, after clearing the ”civicAllowCookies“ cookie each time.

    I found that the onAccept callback seems to be the one interfering with letting someone click, “I am happy with this”. Using only the callback for onCookiesAllowed allows the cookie to be set, the icon stays green and minimised for the remainder of the time browsing around the site.

    I'm presuming that this will affect my analytics data and only register a site visit from the following page load. I'll be monitoring this closely.

    This law is a total hassle for small businesses. If it affects my site too much, I may have to remove the plugin and rely on implied consent...

    Right, now to write a Privacy Policy!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic