Closed (fixed)
Project:
EU Cookie Compliance (GDPR Compliance)
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2021 at 17:51 UTC
Updated:
7 May 2022 at 13:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
svenryen commentedTurns out this is "by design". We now have a banner that stays "hidden" on all pages, including admin pages.
Note that the banner won't open, you'll just see a "Privacy settings" tab when the features to exclude admin pages or uid 1 are enabled.
I added some description to clarify this behavior.
Comment #4
svenryen commentedComment #5
svenryen commentedComment #8
neslee canil pintoComment #10
endrukk commentedI think we need to reopen this.
When Include minimal CSS, I want to style the banner in the theme CSS. is enabled and the banner is positioned on top it interferes with the admin theme and makes admin experience experience pretty poor.
Can we actually not render the markup on admin pages?
Comment #11
svenryen commentedThe whole point of Include minimal CSS, I want to style the banner in the theme CSS is that you should style the banner by yourself, and we can't do anything about that feature as many sites rely on it.
If you want to not render the markup on admin pages, have a look under Advanced settings, there's an option to Exclude admin pages, as well as Exclude paths which allows you to enter values such as "/admin" and "/admin/*" should you wish to manually exclude any pages.
These feature are available both in d7 and d8/9.
Furthermore, admin pages are excluded by the default settings of the Drupal 8 module.
Comment #12
ambient.impactI'm a bit confused by this: is it necessary to show on admin pages even if that's checked to exclude admin pages when "withdraw consent" is available due to legal reasons, or is this an unintended bug?
Comment #13
tancI've also noticed this weird unstyled tab and form hanging around on admin pages. I've stepped through the code and the only thing the exclude paths and exclude from admin theme do is set
open_by_defaultto false, which as far as I can tell stops the banner from being open but doesn't stop the code from being included. I guess I'll open a new issue as this is closed.Comment #14
svenryen commentedComment #15
svenryen commented@tanc, did you open a new issue?
Comment #17
svenryen commented@tanc , @Ambient.Impact , can you take a look at the patch in the new MR (https://git.drupalcode.org/project/eu-cookie-compliance/-/merge_requests...) and check if it resolves the problem you're experiencing?
It currently hides the banner entirely if there's a match from the excluded paths, the user is admin and the corresponding setting is set, or the admin theme is active and the corresponding setting is set.
Comment #18
kevinquillen commentedIt still appears in an entity browser modal, despite having this setting set. How do we prevent it from rendering period for UID 1 and administrator roles?
Comment #19
svenryen commented@kevinquillen, did you enable the
Don't show the banner for site administrators (including UID 1).underAdvanced, and do you still see the banner or tab with this patch applied?Comment #20
kevinquillen commentedYes, even with the patch it shows up. Even with a path set, it shows up.
The uid1 check is odd to me, if the role is administrator isn't that good enough?
Anyway, here I am as user 1 WITH the box checked:
Path match and admin route match and admin theme match are all true (uid1 isnt, for some reason). hide_the_banner is true, and here it is right in the entity browser:
Doing some debugging I made this change:
Sure enough, it is now gone from the entity browser:
But the banner shows on the front of the site for anonymous users, which is what I want.
Can execution or attaching just quit out like this if its been determined that it should not show?
Comment #21
svenryen commentedThanks for the detailed report. I'll take another look.
The code dates back to #1594604: don't pester uid 1 from 2017. I don't recall the details why there's a check for UID 1. It could have been necessary for Drupal 7?
Comment #22
svenryen commentedComment #23
kevinquillen commentedA day later and with no further changes, it stops showing up on both my local and in the cloud. I do not know why. I did not dismiss it nor do I have any cookies.
Comment #24
svenryen commentedCould it have been cache that got cleared?
Are you using the patch and does it behave properly now?
Comment #26
svenryen commented