Jump to content

Cookie Management Banner


adrian

Recommended Posts

5 hours ago, ngrmm said:

hi
somehow i cant see the cookiebanner on frontend. it's always on display:none fro the start.

could TXT records (SPF / DKIM) have any effect on this module?

Those shouldn't have an effect on this. Perhaps you can share your module settings. And also, please try in a browser incognito/private mode to make sure the accept cookies are not already set.

Link to comment
Share on other sites

1 hour ago, adrian said:

Those shouldn't have an effect on this. Perhaps you can share your module settings. And also, please try in a browser incognito/private mode to make sure the accept cookies are not already set.

thx
problem is solved. found out that the latest adblockplus-browserplugin blocks it ... hihi

  • Like 1
Link to comment
Share on other sites

4 minutes ago, adrian said:

Thanks for figuring that out. Not sure if you are using http://prebake.eu/ or whether AdblockPlus blocks these by default now. 

i use ADB in chrome. it updates automatically. it seems that https://www.i-dont-care-about-cookies.eu/ has been added to ADB-chrome.
i guess by avoiding word like cookie, overlay, … in the dom-elements it's possible that it wont get blocked

Link to comment
Share on other sites

1 minute ago, ngrmm said:

i guess by avoiding word like cookie, overlay, … in the dom-elements it's possible that it wont get blocked

Probably, but honestly as a user I think I might go back from uBlock to ABP to get this feature ? I actually really hate these cookie banners - who of us out there actually bother to use them to decline setting cookies anyway?

  • Like 1
Link to comment
Share on other sites

1 minute ago, adrian said:

Probably, but honestly as a user I think I might go back from uBlock to ABP to get this feature ? I actually really hate these cookie banners - who of us out there actually bother to use them to decline setting cookies anyway?

true, i dont like them either. but due to GDPR is a european law to have them. technically you still have them even if they are blocked.
only problem are clients who do not understand this ?

but maybe you add a note into the module, that it might get blocked by adblockers.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

Hi Adrian,

I just installed your Plugin Cokie Management Banner and now the complete website has crashed. I get an error when i want to access the module's configuration, so I can't delete the module - what can I do?

I need urgent help!

Thanks

Tobi

 

error.JPG

Edited by Tobi
Link to comment
Share on other sites

While I am waiting to hear back, if you have a critical error like this, you can remove a module by deleting it's files from /site/modules and it's entry in the modules database table which is easy to do with Adminer which is packaged with Tracy.

  • Like 1
Link to comment
Share on other sites

PHP 5.3 is the issue - it doesn't let you use $this in anonymous functions. I had forgotten about this as I haven't used 5.3 in years. The quick fix for you is to change those instances of "$this->wire" to just "wire"

I think probably many of my modules will be affected by this ?

Link to comment
Share on other sites

1 minute ago, Tobi said:

While installing Tracy I get this Error ?

"Module is not installable because not all required dependencies are currently met."

That's because Tracy requires PHP 5.4.

'requires'  => 'ProcessWire>=2.7.2, PHP>=5.4.4',

This is a requirement of the Tracy core and not specifically my module.

Please note that PHP 5.4 has been out for 6 years now. 7 has been out for 3 years. If your host won't let you upgrade to 7 I would look elsewhere!

Link to comment
Share on other sites

You're right, I'll ask him to upgrade!

4 minutes ago, adrian said:

PHP 5.3 is the issue - it doesn't let you use $this in anonymous functions. I had forgotten about this as I haven't used 5.3 in years. The quick fix for you is to change those instances of "$this->wire" to just "wire"

I think probably many of my modules will be affected by this ?

Where can I change "$this->wire" to just "wire" ?

Tank you!

Link to comment
Share on other sites

10 minutes ago, Tobi said:

You're right, I'll ask him to upgrade!

Where can I change "$this->wire" to just "wire" ?

Tank you!

Well if you upgrade you won't need to change anything. But in the meantime look at line 106 (where that error is coming from) and you'll see $this->wire('languages') - change that to wire('languages').

Do the same for other instances like $this->wire('session') - change this to wire('session').

Does that make sense?

Link to comment
Share on other sites

Just now, Tobi said:

Cool, I think I got it! Thanks a lot for your immediate help!

No problem!

BTW, I have updated the module so it is now tagged as requiring php 5.4 so hopefully no-one else comes across this error.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

I think I have found an issue which affects the "Live Search" feature of PW on edit language pages. The info for manually loading assets contains html markup, and even they are inside "```" quotes they make the Live Search choke ("invalid character at ..."). The JS error made the whole index file of Live Search outputted on the page and broke other JS functionality.

It was not easy to track down, first I though it's AOS, then Tracy but finally it turned out to be this module (the reported line and column was not entirely proper). What made it even harder that you have to manually clear the Live Search cache and rebuild the index to test. This page can be found at "/setup/languages/edit/?id=1041", and the index file is at /site/assets/files/1041/.phrase-index.txt (use an existing language ID).

First I tried to use only one "`" quote, then adding extra double quotes, etc. but nothing worked. Finally I replaced starting and closing html tags with their html entities and it worked well:

array(
    'type' => 'checkbox',
    'name' => 'autoload_assets',
    'label' => __('Autoload Assets'),
    'description' => __('Autoload module CSS and JS files.'),
    'notes' => __("If you disable this, you will need to load these files manually:\n```<link rel='stylesheet' type='text/css' href='/site/modules/CookieManagementBanner/assets/css/CookieManagementBanner.css' />\n<script defer src='/site/modules/CookieManagementBanner/assets/js/CookieManagementBanner.js'></script>```\nNOTE: you must load the JS file with the defer attribute."),
    'value' => 1
),

Let me know if you need more info.

  • Like 3
Link to comment
Share on other sites

Hey @tpr - thanks for figuring that one out ?

A bit OT - I haven't ever used the language translation feature so maybe I am confused about something, but when I click the "Click here to build search phrase index" link, it takes me to  the "Select File(s)" page so if I actually want to use the live search feature I then have to go back to the previous url. 

Back to the issue - I have made your suggested change and I can confirm it works here, but I do have to wonder if this is maybe actually a bug in the phrase-index generator or the code that loads the results - shouldn't it be the place where the entity conversion happens, because there must be other modules out there that will trigger this error as well. Do you think a Github Issue should be raised?

Link to comment
Share on other sites

Yes, after indexing it goes to the select file page, I'm not sure why.

I suspect that something is buggy in the indexing so a GitHub issue could be handy. Perhaps its only a missing html encoding but I haven't examined it in detail.

Link to comment
Share on other sites

  • 3 months later...

Thanks for the very useful module.

Just one issue: Either cookie banner placement has its issues: If placed on top, it gets in the way with the main nav. If placed in the bottom, it may overlay the important "imprint" link often placed in the sub-footer.

How about a small box in the lower left or right?:

 

2019-03-31_1109.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...