Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

I'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.

joachim’s picture

Status: Active » Needs review
FileSize
684 bytes

I think this covers it.

Please do improve your code documentation though -- it really helps other people to help you.

joachim’s picture

Status: Needs review » Needs work

Oh wait, that totally breaks the admin UI because the admin UI uses eu_cookie_compliance_get_settings() to get settings too.

joachim’s picture

Status: Needs work » Needs review
FileSize
894 bytes

Here'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.

Miszel’s picture

Category: bug » feature
Status: Needs review » Postponed

First 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.

joachim’s picture

> 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.

Miszel’s picture

Yes 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.

Miszel’s picture

Status: Postponed » Closed (won't fix)

I am closing this issue as now you can decide what roles see the popup on the permissions page. Thank you for your effort.

joachim’s picture

Status: Closed (won't fix) » Active

If 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.

Miszel’s picture

Hi 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.

joachim’s picture

> 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.

achton’s picture

Thinking 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.

achton’s picture

Status: Active » Closed (won't fix)

As per #12.

undertext’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Closed (won't fix) » Active
FileSize
926 bytes

Just need patch. Putting it here. In future I will add a checkbox "Display for admin" on configuration form, and post the patch.

Miszel’s picture

Status: Active » Closed (won't fix)

Thanks 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.

MiroslavBanov’s picture

Issue summary: View changes
Priority: Normal » Minor
Status: Closed (won't fix) » Active

I 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.

doitDave’s picture

Why 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!

dddbbb’s picture

I 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.

svenryen’s picture

Assigned: Unassigned » svenryen

@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.

svenryen’s picture

Status: Active » Needs review
svenryen’s picture

I'm adding a checkbox for this feature to -dev.

  • svenryen committed 2c15d0c on 7.x-1.x
    Issue #1594604 by joachim, undertext, Marcin Pajdzik, svenryen: don't...
svenryen’s picture

Status: Needs review » Fixed
svenryen’s picture

Status: Fixed » Closed (fixed)