Plugin Author
Support
(@nikelschubert)
Hi, can you share the website you have troubles with? and the version of the plugins?
Regards
Hi, sorry for the delay. I am attaching a screenshot where the website address is written. As you can see, unfortunately, the banner is reloaded continuously if you click on accept. I left the domain field empty and I didn’t check to make the banner reappear until accepted, as you described in the FAQ.
https://ibb.co/fkfmSWp
I thank you in advance!
The plugin is at the latest version and I’ve also the add-on
Plugin Author
Support
(@nikelschubert)
Hi @semplicewebsite,
i had a look at the settings in the the JS: The problem is that you added in the banner settings under “cookie settings” a url for cookie domain and not an url.
If you leave that field empty it should work.
Regards
Hello, forgive me, I had made several tests and I had left the domain entered but even without the problem remains. I have now left the field blank. If you could take a look again you will see that unfortunately the banner keeps showing up
Plugin Author
Support
(@nikelschubert)
Hi @semplicewebsite , thanks for reporting back. I found the issue: somehow the cookies are set by the plugin to httpOnly.
But it only happens on your server. I could not reproduce this on my environments.
Can you share the PHP version you are using? As soon as I can reproduce this I will come up with a fix.
As a shorttime quickfix you can deactivate the “Prevent premature cookie deletion (use backend cookie)” feature. That should stop this behaviour.
Regards
-
This reply was modified 1 year, 8 months ago by Support.
Hello and thank you very much for your time. The PHP version is this: PHP 8.1 (ea-php81)
Looking forward to your fix…
Thanks for developing this plugin!
the temporary fix you suggested works great!
Plugin Author
Support
(@nikelschubert)
Hi@semplicewebsite ,
thanks.
I had now a deeper look and i am sure, that the problem is in your server configuration.
I think your server adds to all cookies which are set by http the values “;HttpOnly;Secure” which makes them not readable for javascript anymore.
What makes me certain:
- The code is pretty straight forward and i can not reproduce this issue on my test system with php 8.1
- In the screenshot you see the header response from your website. You see the set cookie header. the httpOnly and secure looks attached, because all values from my plugin come with spaces after the “;” but the last to not: https://beautiful-cookie-banner.com/screens/Screenshot_11.png
- For cookie nsc_bar_sc_done the httpOnly flag is set by the plugin and it is not the last value. And all cookies are set by the same method in the plugin.
Maybe you have a plugin installed which does that (Firewall configuration?) or the server/load balancer/proxy is configured to do that.
Here for example an article which describes how it is done: https://geekflare.com/wordpress-x-frame-options-httponly-cookie/
I guess there are many ways of implementing it. So this article is just an example of one implementation method. How it is done on your side: i can not tell.
Regards
hello, actually this problem I only find with supportHost… not with the other servers. What can I ask my provider to solve the problem?
Hi, first I wanted to thank you for finding the problem. I contacted the Provider who solved the server-side problem thanks to your suggestions.
Thanks a lot again!!