Closed (fixed)
Project:
Cookie Control
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
13 Jul 2012 at 13:49 UTC
Updated:
8 Sep 2017 at 10:13 UTC
Jump to comment: Most recent file
Comments
Comment #1
Homotechsual commentedI agree that this is necessary, this should not be considered so much of a "feature request" as a bug report as there is no reason to display this to logged in users or administrators.
Comment #2
buddaNot displaying to logged in users could be a tricky situation -- as a user may already be logged in before this module is added, and thus would never see the pop-up and consent information provided.
Comment #3
buddaThere's already code in the module to not render the icon/pop-up on admin pages.
if (strpos(current_path(), 'admin') === FALSE) {Comment #4
buddaI have seen the problem with things like lightbox.
Not come up with a solution to that yet.
Comment #5
__cj commentedThe attached patch makes use of path_is_admin (http://api.drupal.org/api/drupal/includes%21path.inc/function/path_is_ad...), instead of checking if 'admin' is in the current path. This fixes the problem with it displaying on '/node/add' or '/node/edit/*', and other administration pages.
This doesn't solve the problem of it displaying in lightboxs though.
Chris.
Comment #6
__cj commentedThe attached patch builds on the previous patch.
It adds a field to the admin page - 'Exclude Paths', in which you can add a list of paths to hide the cookie control on.
My specific use case is the cookie control is displaying in the media module's dialog iframe, (the media module doesn't declare it as an admin page), but I'm sure there are other pages where you'd want to hide it (perhaps when using the print module).
Chris.
Comment #7
__cj commentedComment #8
peacog commentedI've applied #6 and it works for me. Thank you!
Comment #9
Homotechsual commentedConfirming number 6 works here too. On all 10 drupal sites, across 5 different servers, 3 different OS's and all with slightly different configs. :-p
Thanks for the patch! __cj :-)
Marking as RBTC for now.
Comment #10
buddaThanks __cj committed.
Comment #11
Homotechsual commentedBudda - any idea when we'll see a release with this patch included?
Comment #12
budda@MJCO - the 1.6 release which was rolled out on 25th feb included it.