Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The popup should not show for uid 1. Ever.
Comment | File | Size | Author |
---|---|---|---|
#14 | 1594604-14.eu-cookie-compliance.leave-uid-1-alone.patch | 926 bytes | undertext |
#4 | 1594604-2.eu-cookie-compliance.leave-uid-1-alone.patch | 894 bytes | joachim |
#2 | 1594604.eu-cookie-compliance.leave-uid-1-alone.patch | 684 bytes | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedI'd like to post a patch, but #1594602: confusing param and return documentation for eu_cookie_compliance_get_settings() is preventing me from figuring this out.
Comment #2
joachim CreditAttribution: joachim commentedI think this covers it.
Please do improve your code documentation though -- it really helps other people to help you.
Comment #3
joachim CreditAttribution: joachim commentedOh wait, that totally breaks the admin UI because the admin UI uses eu_cookie_compliance_get_settings() to get settings too.
Comment #4
joachim CreditAttribution: joachim commentedHere's another stab at it.
Still not sure this is right -- your eu_cookie_compliance_footer() and eu_cookie_compliance_init() do not document what they are doing, so it is hard to be sure.
Comment #5
Miszel CreditAttribution: Miszel commentedFirst of all, thank you for you input.
The popup appears for user 1 so that if you log in as user 1 and want to configure the popup, you can easily see what it looks like and adjust it without having to log out or open another browser.
Whether it is better to show the popup for user 1 or not is arguable but it is certainly not a bug. I am changing this issue to a feature request.
If there are other people who use this module and think that it is not a good idea to show the popup for user 1, I will incorporate your patch.
Comment #6
joachim CreditAttribution: joachim commented> without having to log out or open another browser
It's pretty common practice when working with Drupal to need another browser open to check what things look like for anon users anyway.
Comment #7
Miszel CreditAttribution: Miszel commentedYes it is true. It is common for developers but I am not so sure if it is so common for webmasters, administrators or web editors... I do not insist on this one. I would like to hear other opinions though.
Comment #8
Miszel CreditAttribution: Miszel commentedI am closing this issue as now you can decide what roles see the popup on the permissions page. Thank you for your effort.
Comment #9
joachim CreditAttribution: joachim commentedIf you only want anon users to see the notice, then it's fine, but if you need logged-in users to see it too, then I don't think there's a clean way to exclude uid 1.
Comment #10
Miszel CreditAttribution: Miszel commentedHi joachim
I do appreciate your input into this module and we are willing to make changes to the way the module functions if there is a number of people that want such a change and if there is a consensus among them in how this module should work. We won't however be implementing changes based on individual opinions that are not supported by others.
Besides, as for this issue, there is a workaround now. You can assign an admin role to your user 1 and set permissions to whatever you require. I know it is not exactly what you would like to see to be implemented but you can now make the module work as you want without forcing other people to use the module the way you want.
I am leaving this ticket open fur further discussion as you clearly want me to do so.
Comment #11
joachim CreditAttribution: joachim commented> You can assign an admin role to your user 1
That's a silly waste of a role.
> We won't however be implementing changes based on individual opinions that are not supported by others.
I'm not talking about my individual opinions; I am talking about what I consider to be a pattern that is seen throughout Drupal core and contrib.
Comment #12
achtonThinking about this, I can see pros/cons with both solutions. Having worked with the module for a while now, however, I favor the current approach. Here's why:
Permissions for seeing the pop-up are not set automatically upon install (obviously). Thus, the only user who can actually see it after the module has been enabled and configured, is user 1. If we remove that option, site builders could be led to believe that the module isn't working simply because they have not set permissions. This way, there is at least some chance that an admin can confirm that it works.
Also, I agree with the arguments in #5.
Apart from that, the "pestering" is only very brief, until the admin has accepted the popup. It only occurs once per install (per browser), which is not overwhelming, I think.
joachim, unless you have further arguments towards your opinion on the matter, I propose that we close this issue for now.
Comment #13
achtonAs per #12.
Comment #14
undertext CreditAttribution: undertext commentedJust need patch. Putting it here. In future I will add a checkbox "Display for admin" on configuration form, and post the patch.
Comment #15
Miszel CreditAttribution: Miszel commentedThanks for your effort but this issue had been closed. I really don't see a point in adding this patch espeacially in D7 because this is already handled by the permissions system. You just need to go to the permissions page and make sure that that the checkbox next 'Display EU Cookie Compliance popup' is not checked for the administator role.
Comment #16
MiroslavBanov CreditAttribution: MiroslavBanov commentedI want to mention that this problem was never handled by the permissions system. User id 1 would always have permission to "display EU Cookie Compliance popup", no matter what roles the uid:1 has, and what permissions are set on these roles. The reason is that
user_access()
works like that and will always return TRUE for uid:1.Comment #17
doitDave CreditAttribution: doitDave commentedWhy not simply invert the permission (this of course needs a new major branch) to "bypass cookie nagging"? User 1 would have that permission anyway (good!), and any other user could be given that privilege. It would also improve initial behaviour, because (at least as for me) it took some time to figure that "see nag screen" is considered a permission (which, IMO, breaks intuitive behaviour).
Just my 2 cents, and I don't even have time to provide a patch suggestion. Sorry for that!
Comment #18
dddbbb CreditAttribution: dddbbb commentedI think we need this.
I have permissions set so that only anonymous users are nagged by the cookie popup until they consent. I then actually wasted some dev time verifying what roles see what & when as a result of that permissions config seemingly having no effect (logged in as user 1, still saw popup despite not being anonymous).
I understand why (see #16) but I did have to stop & think, do some tests to confirm and search the issue queue to be sure - all wasted time.
Adding a simple checkbox to the module admin page would be clear & helpful IMHO.
Comment #19
svenryen CreditAttribution: svenryen commented@danbohea - yes, I think it makes perfect sense to add a checkbox to the module admin page for this. It will be included in the next release.
Comment #20
svenryen CreditAttribution: svenryen commentedComment #21
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedI'm adding a checkbox for this feature to -dev.
Comment #23
svenryen CreditAttribution: svenryen at Ramsalt Lab commentedComment #24
svenryen CreditAttribution: svenryen at Ramsalt Lab commented