Support » Plugin: Cookii - Free GDPR Cookie Consent » Banner disappears after refresh

Viewing 3 replies - 1 through 3 (of 3 total)
  • Exactly, and this is not compliant with the law in place as the user must explicitly, not implicitly accept the use of cookies.
    In other words, the visitor must manualy close the popup, or notice.

    Also, WPML compatibility does not work for this same reason, because WPML first loads the page in the original language, then reloads in the detected language (geolocalisation, or browser language). The ICO notice appears once on the original language, then when the page refresh in the visitors language, the notice is gone.

    This renders this plugin useless.

    Here is how I changed the code inside the popup.js inside the plugin folder to make it stay:

    (function($){
    $(document).ready(function(){
    	/* Check document cookie, do nothing if cookie shows user has visited before (in last 15 days) */
    	if( $.cookie("visited") != 'true' ) {
    		//console.log('New visitor, display popup');
    
    		/* Disply the cookie message */
    		$('#eu-cookie').show("fast");
    	}
    
    	/* Allow user to close cookie popup */
    	$('a.close-icon').click(function() {
    		/* Set popup not to display if user visited the site in the last 15 days */
    		$.cookie('visited', 'true', { expires: 15, path: '/' }); //cookie to be valid for entire site
    		//console.log('Close button clicked');
    		$('#eu-cookie').hide("fast");
    		return false;
    	});
    
    	/* Allow user to close cookie popup with escape, return or space button */
    	$(document).keydown( function(eventObject) {
    		if(eventObject.which==27) { //Escape button
    			/* Set popup not to display if user visited the site in the last 15 days */
    			$.cookie('visited', 'true', { expires: 15, path: '/' }); //cookie to be valid for entire site
    			//console.log('Escape button pressed');
    			$('a.close-icon').click(); //emulates click on prev button
    		}
    	});
    });
    })(jQuery);

    remember that the plugin uses the plugins.min.js so you have to minify this version and than rename it.

    Massive apologies for the shit support and development on this guys. I’ve rebuilt an upgraded version of the plugin that works with the latest version of WP.

    I’ll build this into the next release and patch it this week.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Banner disappears after refresh’ is closed to new replies.