Closed (fixed)
Project:
EU Cookie Compliance (GDPR Compliance)
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2018 at 07:43 UTC
Updated:
7 Oct 2020 at 16:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ricovandevin commentedSetting issue status to Needs review to trigger feedback on the "first attempt" patch.
Comment #4
dozz commentedComment #5
dozz commentedChanging status to Needs review after uploading new patch file with fixed coding standards.
Comment #7
dozz commentedComment #8
dozz commentedComment #10
svenryen commented@Dozz, can you take a look at the report and fix what appears to be some coding style issues?
Comment #11
dozz commented@svenryen, I fixed the coding style issues right before your comment. The remaining issues are not related to this patch. They also exist in the original code: eu_cookie_compliance.module line 237
I can fix them in my patch or add another patch if you want.
Comment #12
svenryen commentedIf you have time, it would be great if you can do a patch for that.
Comment #13
dozz commentedHi @svenryen, actually the last codesniffer_fixes.patch fixes this remaining coding style issue.
Comment #14
akalam commentedUpdating status with last patch AUTHORED BY Dozz
Comment #16
dozz commentedAdded the codesniffer fix to the main patch
Comment #18
akalam commentedThanks for the patch, it is an amazing work!
I found 4 bugs on #16 to make it fully functional:
- Categories are not saved on "Save Preferences" action (tested in chrome).
- All categories are saved on "accept" action, instead of the current settings (tested in chrome).
- Whitelisted Scripts are not loaded on save preferences or accept action (tested in chrome).
- let and const statements that are can cause issues on old browsers.
Here is a patch solving this issues. Hope to help.
Comment #19
akalam commentedComment #21
akalam commentedUpdated patch to set all categories as checked by default. Added interdiff with #16 and #18
Comment #23
akalam commentedComment #24
svenryen commentedThanks for the patch, akalam. I will take a look once the bug reports have been sorted out. Maybe you can find somebody to do a review meanwhile?
Comment #25
dozz commentedUpdated patch to work with latest dev version.
Comment #27
dozz commentedUpdated patch to work with latest dev version.
Comment #28
dozz commentedChange status to needs review
Comment #30
svenryen commentedSorry that we don't have tests :)
Comment #31
dozz commentedUpdated patch to work with latest dev version.
Comment #33
svenryen commentedThanks, Dozz.
I started reviewing your patch this week. Any chance you can help port it to Drupal 7?
Comment #34
akalam commentedComment #35
svenryen commentedThis patch is looking promising, and goes a good way to being a feature that can be added to the module.
Some comments first on the labels for the new option added:
I'm not sure about the grammar of "Mark first consent as checked and readonly.", I would assume you're marking a checkbox as checked and read only and not the consent itself. Maybe we should have a native English speaker validate the strings added by this patch.
I would suggest: "Check the first checkbox and mark it read only"
I'd also like to move the new option to follow immediately after "Opt-in", since these two options are similar, and then label the new option "Opt-in categories" rather than just "Categories".
Now to the functionality:
1) There's now an additional button to "Save preferences", which I think many users will find confusing. It's not clear whether I need to click both buttons, and what will happen when I dismiss the banner clicking "OK I agree", will I accept all options, none, or just the ones I have checked? Can you make it so the "OK" button saves the preferences and remove the "Save preferences" button? These banners add already quite some annoyance for users, so we should aim to make the experience as easy and streamlined as possible.
2) We need default css for the new features. The ideal patch that we can accept and merge is when the site builders can install the module, choose a background and foreground color and then have an "ok"-ish appearance that fits well with the color scheme of their site without having to code a css file to position the checkboxes on the same line.
3) Do we really need "Descriptions"? If an option says "Advertising" or "Statistics" isn't that label clear enough in itself?
4) Option 2 and onwards are also checked by default, even though there's no interface option or advise on this. Do we want to have another check box in the preferences to "Check all options by default"? I can see that some site owner could want to offer unchecked checkboxes for the remaining options after the first one. I've seen that pattern on a few sites.
5) The check boxes need to be present in the "Privacy options" tray so that the users can change the settings if they change their mind.
6) We need a port to Drupal 7 before we can add this feature to the module.
I haven't yet reviewed all the code added for code style issues or bugs, will do that once the patch addresses these issues.
Comment #36
dozz commentedHi Sven
Thank you for reviewing the patch.
I agree on the improvement of the comments.
1) I also agree that the extra button has no added value when all checkboxes are checked by default but that was not the case in my initial patch. It was changed in #21. As you suggest we should make this optional.
My client's legal department preferred a solution similar to how it was (previously) done on vrt.be. I just noticed that they changed their cookie popup design very recently but their current design still demonstrates most of what I try to achieve.
The reason for not checking all checkboxes by default is that agreeing to the optional categories should be opt-in.
On the other hand, we want to make it as easy as possible for the visitor to accept all cookie categories.
So that is why there is a main 'Accept all cookies' button that stands out next to a smaller 'Save preferences' button (or link).
Maybe we can make the button as well as checking all checkboxes optional.
2) I agree that we need default css so the module can work out-of-the-box.
3) Visitors may not understand why 'Advertising' needs cookies. So people might want to explain that those cookies are used to give you more relevant ads based on your browsing behaviour. Those descriptions are optional though.
4) As explained under 1, I agree
5) Yes, and they are present on the site I am working on. I will need to check and examine what goes wrong on a new install.
6) OK
I will try to make some time to work on a new patch.
Comment #37
svenryen commentedThanks for following up, and looking for time to improve the patch. If you need to bounce any ideas, you can typically find me on Drupal Slack.
1) Yes, that's a good idea. Let's have a button, and a preference for whether to display it.
3) Can we do a compromise: Display the Description as a hover tooltip? Or at least make it optional. Right now it seems like a description is required, which just adds clutter to the screen if it's to be added for every category.
Comment #38
dozz commentedAnother update for the patch, with most of the discussed improvements.
Comment #40
dozz commentedCoding standard fixes.
Comment #42
dozz commentedFixed blocking category specific javascripts.
Comment #44
dozz commentedFixed JS error
Comment #45
svenryen commentedComment #47
akalam commentedComment #48
khaldoon_masud commentedCan we do the same for Drupal 7 module?
Comment #49
svenryen commentedI have reviewed the patch. Here's my feedback:
Missing a space before curly brace.
Thanks for removing $key, which isn't used. Though it would have been better if it was handled in a separate issue, since it's unrelated to this work.
Please try not to shift formatting as part of your patch, it gets difficult to see what was changed.
Same here
Good catch - thanks!
I think we should call it "Opt-in with categories" to make it very clear that the method works like "Opt-in".
We just used the | character for a different feature. Let's rather use colon for the separation in this patch.
Comment #50
svenryen commentedI also think we should make some improvements to the HTML markup, as some users may want to display the options horizontally rather than vertically. Instead of the current
I think we should have an additional outer div and also add a class to that div:
Comment #51
svenryen commentedAttached is a patch that addresses the comments in #49, adds an update hook and fixes some small issues here and there.
It would be awesome if @akalam or @Dozz can take the patch for a spin to do an RTBC, then we can get this issue merged and start porting it to D7.
Unfortunately no interdiff as the patch in #44 doesn't apply nicely to the latest commit of 1.x-dev.
Comment #52
robinwest commentedI've tested the patch from #51 against latest dev and it is working fine for me.
Two minor things I noticed:
Comment #53
svenryen commentedThank you for the review. Would you say it's good to go as RTBC?
1. Good idea. I was contemplating the same while changing the patch, but it escaped me.
2. Well spotted. I have a bad habit of using title case in English labels.
Comment #54
svenryen commentedThe thing that cause me to hold back on using colon for whitelisted cookies was that maybe somebody would put colons in the cookie names, but I guess we can just say we don't support cookies with colon in the name? Would colon be more likely to be used in a cookie name than the vertical bar?
Comment #55
robinwest commentedAh yes that is tricky, but I think colon should be fine.
I've looked it up and according to this answer on StackOverflow, colon should be forbidden in cookie names, but nothing is ever enforced.
I think we should just stick to RFC-6265 and use colon as separator.
Comment #56
robinwest commentedI've attached a patch for both changes.
I also just realised that colons/pipes in cookie names would not be an issue, since the JS code checks for the first index.
That means that the only part that can't contain the separator is the category name.
Comment #58
svenryen commentedThanks for the patch. Looks good.
Now on to porting this to Drupal 7..
Comment #59
svenryen commentedComment #60
svenryen commentedHere's a preliminary patch for 7.x. Would be great if somebody can test it and RTBC. I've done some testing, but there was a lot of code to port so some D8 codes may have slipped through.
I also found a few issues with the 8.x version. Here's an updated patch as well as an interdiff.
Comment #61
svenryen commentedComment #63
svenryen commentedComment #66
svenryen commentedComment #67
_vk_ commentedHi svenryen.
Regarding some testing I have done to the updated code with the patch applied I have to mention 2 issues:
Line 374, from:
to:
and in line 378, from:
to:
I hope I explained it clearly.
Comment #68
_vk_ commentedHi svenryen.
Regarding some testing I have done to the updated code with the patch applied I have to mention 2 issues:
Line 374, from:
to:
and in line 378, from:
to:
I hope I explained it clearly.
Comment #69
frouco commentedUse the colon to separate the category and path to the scripts (category:path/to/the/script.js), give an error with the absolute URLs returning http(s) as the path to the script.
This patch will solve these cases.
Comment #71
frouco commentedComment #73
tunicTestbot report test fail because there are no tests. Moving back to Needs Review.
Comment #74
svenryen commentedThanks for the additional patch. I ported it to D7. This went under my radar, so unfortunately the patch from #71 wasn't in the tagged release that contained the new feature. I'm also not sure how the issue credit system works when there's already a committed patch previously in the issue, hopefully you guys get your credits for this work.
Comment #75
bramvandenbulcke commentedI'm testing with the 8.x-1.6 version in combination with the categories. The new functionality is great! And also thanks for all the hard work put into this module!
But there is one thing that seems to be missing: the possibility to change the preferences, per category, after a first save. Can you add this option? Or is this option already present?
See https://www.drupal.org/project/eu_cookie_compliance/issues/2989038#comme...
I can't find this setting. I can enable a "privacy settings" floating tray but there is only the option to "withdraw consent".
Comment #80
jan@sevendays commentedI have the same question as #75
How can someone change their preferences after a first save? i can only choose "withdraw consent"?
I'm testing with the 8.x-1.9 version in combination with the categories.
Comment #81
svenryen commentedjan@sevendays there will be a new feature in 1.10 that lets the user change their preferences at any time.