-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie Banner being rendered inside Gutenberg Editor (Metaslider plugin) #413
Comments
@mateuswetah thanks for your report. The problem where the blame lies is always a difficult one. In this case, the practical solution would be that all plugins like the meta slider plugin set an 'is_preview' flag, that triggers the Gutenberg is_preview() function. This would make it work for all plugins in the same way. In Complianz we already check for this flag, which ensures compatibility 90% of the time. However, to be pragmatic, I'd like to give you a solution instead of passing the ball to someone else, so I've extended our custom cmplz_is_pagebuilder_preview function to allow for meta slider as well. You can check it by downloading the master from this github repo. Hope this helps! |
Hi @rlankhorst! Thank you for the prompt answer! I tried adding the same changes that you made in the last commit to my hosted version of the plugin however the problem remains... but your logic makes sense, that is the action passed by the Meta Slider plugin 🤔 Were you able to reproduce the fix? |
@mateuswetah I have to admit that I was so confident that this would work, that I didn't test it... |
Hhehehe it happens! But that is so weird... the change you made makes all sense but still has no effect... I guess we'll have to dig a bit more 😢 . Don't worry, take your time with this, maybe it is a simple detail left behind... |
I'll set it up tomorrow, and get back with you with a tested fix 😬 |
@mateuswetah I have found the issue. I needed to include the cmplz_is_pagebuilder() condition in the banner loader as well. I thought this was already the case, but apparently the issues we had until now with pagebuilders was mainly the cookie blocker, not the html. This branch fixes the issue (yes, actually tested 😄 ). To do things properly, it's now added to the test queue, and will get merged after testing. Let me know if this works for you! |
It works 👯 Thanks for the effort, I'm glad you find some detail that maybe impact other plugins as well! I'll leave to you to close the issue when it is released ;) |
Hi there! Thank you for the amazing plugin 👍🏼
I would like to report a situation that I am not 100% sure if it is a bug from your side, but it looks like...
I'm building a page using the block editor (Gutenberg) and a slider plugins called Metaslider. When I insert their block, it asks me to select a banner from its list and when I select one, the banner is supposed to be loaded in the editor. However, having Complianz activated, the Cookie consent banner is rendered inside the block 😥 And it also goes very ugly since no styles are rendered:
(in the screenshot I even reduced the size of that SVG close button)
While there is a chance that Metaslider is doing something wrong on their side, I wonder if the script that loads the Complianz banner should even be loaded in a scenario like this... Is this something we could change?
The text was updated successfully, but these errors were encountered: