Complianz breaks Cornerstone – follow-up

There was a thread on this but I can’t comment, as it has subsequently been locked – Complianz breaks Cornerstone + Quickfix

I’ve tried adding the code to my functions.php and it switches off the Complianz plugin on the front end, rather than just when using Cornerstone. I was really hoping that this was going to work, as manually switching the login off every time I need to implement updates is incredibly time consuming!

Hey @NeilHardcastle,

you mean Complianz is not working at all? Even if you are logged out of WordPress?

Yes, when I added that code to my functions.php my Complianz Cookie Banner disappears on the front end, even when not logged into Wordpress. When I delete it, it comes back again.

I don’t know if I’ve made an error in copying it across but it doesn’t look right to me, when viewed in my functions. php – I’ve attached a screenshot

On my site the Complianz banner appears when I’m logged out and all cookies are deleted.
Is it possible, that your consent cookies are set, and that is why the banner does not show when logged out?
Deleting all cookies might help. Do you have a link to the site?

I’ve tested it using another device and browser and neither the banner nor the ‘manage consent tab’ appear when I add that code.

Strange, that it works on my site :man_shrugging:
But I can have a look on a fresh setup.
Just to be sure we use the same versions: are Complianz, Pro and WordPress on the latest updates on your site?
So I can setup a local environment with the same versions.

Many thanks for this
WordPress 6.4.1
Pro version 6.4.2
Complianz version 6.5.5

Hi Neil,

Can you please let us know if you are still getting the issue?

Thanks

Hi. Yes I’m still getting the issue. The only thing I can see is that the add_filter command might not be working on my setup?

Hey Neil,

in fact I can reproduce it in a fresh install.
Only thing I can quickly think of is to check if user is logged, and if yes, prevent the cookie banner stuff.

You can try it like this instead of the other code snippet:

function cmplz_my_filter_site_needs_cookiewarning( $cookiewarning_required) {
	if ( is_user_logged_in() ) {
		return false;
	}
	return true;
}
add_filter( 'cmplz_site_needs_cookiewarning', 'cmplz_my_filter_site_needs_cookiewarning' );

@raye thank you so much, that has now worked. I really appreciate your help on this.

Ok sounds good! Please have in mind, this is more of a brutal hack. I.e. I don’t know what part of Complianz is shut down this way. So you should have an eye on this, if you are in the Complianz settings (like scanning for cookies etc.).

Noted, thanks, but for regular site maintenance and updates, it’s a life-saver! Certainly more reliable than switching Complianz off and forgetting you’ve done so for a couple of weeks (yes, that happened)

@NeilHardcastle, It’s good to know that.

@Raye, Thanks for chiming in!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.