Description

This module helps with making your website compliant with the EU Directive on Privacy and Electronic Communications that comes into effect in the UK on 26th May 2012.

This module is intended for use with Drupal 6 and it is similar to the Cookie Control module developed for Drupal 7. The Cookie Control user interface requires a minimum of jQuery 1.4.4 which is not supported for Drupal 6.

The module makes website visitors aware of the fact that cookies are being set by displaying a pop-up. The user may then give his/her consent or move to a page that provides more details.

The module provides a settings page where the pop-up can be customised and template files for the pop-up that can be overridden by your theme.

Project page

http://drupal.org/sandbox/marcin_pajdzik/1538032

Repository

git clone --branch 6.x-1.x marcin_pajdzik@git.drupal.org:sandbox/marcin_pajdzik/1538032.git eu_cookie_compliance

Reviews of other projects:

http://drupal.org/node/1503782#comment-5911112
http://drupal.org/node/1458858#comment-5910152
http://drupal.org/node/1310702#comment-5905992

CommentFileSizeAuthor
EU_Cookie_ Compliance_settings_form.png34.8 KBMiszel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome,

You are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

You have to remove the LICENSE file, it will be added automatically later, also all code hosted on drupal.org is under GPL automatically.

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow tips for a great project page. Also make sure your README.txt follows the guidelines for in-project documentation.

I've seen you were already working on the automated review, just ask if you got problems there
(http://ventral.org/pareview/httpgitdrupalorgsandboxmarcinpajdzik1538032git)

We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

regards

Miszel’s picture

Issue summary: View changes

Changing the repository branch from master to 6.x-1.x-dev

Miszel’s picture

Status: Needs work » Needs review

Thank you for your comments. I have now fixes all issues. Please review again.

scot.hubbard’s picture

I can confirm that the automated PAReview tool does not return any errors/warnings.

Reading through the code, it all seems to check out.

One recommendation that immediately springs to mind would be to use the '#format' key on the 'eu_cookie_compliance_popup_info' and 'eu_cookie_compliance_popup_agreed' keys on the admin form. Your install file creates these variables and puts HTML in them, so doing this would allow end users to select any input method available to them and therefore enter HTML via the WYSIWYG module (if available).

I would also suggest disabling the pop-up for user-1 (admin) and also for anyone logged in and using the admin pages (though they probably would have already agreed the popup before hitting the admin pages).

Like the way the user is presented with the acceptance though... nicely done.

scot.hubbard’s picture

Issue summary: View changes

Corrected repository branch

Heine’s picture

The name "EU cookie compliance" implicates that the module can be used EU-wide. This appears not to be the case, as it targets UK law. Wouldn't a better name be "UK EU cookie compliance"?

In addition, the site that demos the module sets 6 cookies before the user gives consent. As such, it is not compliant with UK law as far as I understand it, and should perhaps be renamed to something else.

Miszel’s picture

Thank you for your review, Heine.

The EU law will be enforced in all EU countries and hence the module can be used in all EU countries. I have amended the project description to include that information.

The module, as mentioned in the description, does neither do any cookie audit nor does it prevent cookies from being set. It does however provide a javascript function that can be used to conditionally set/unset cookies. As every website will be setting different cookies it is up to the website owner to audit the site, provide information to the user on what cookies his/her website uses and decide which cookies should be set after consent is given.

What is worth noting, however, is that simply installing and configuring the module shows the regulator that the website owner is visibly working towards compliance. That will buy the time required to perform a full audit and then to amend the way cookies are set.

Miszel’s picture

Scot, thank you for your suggestions. I have now added the '#format' key to the textareas. I reckon that this will be quite helpful.

I ma not sure about disabling the pop-up for admin users. If you go to the settings page and enable the module, you would do that as user-1. If I disable it for user-1, you will have to log out to see the pop-up and hence it will be more difficult to adjust settings such as height and width. (unless you use another browser to look at how the pop-up changes).

If I hear other voices saying that it should be disabled for admin users, I will disable it.

aiypz’s picture

Marcin,Just wanted to say thanks for getting the ball rolling on this for Drupal 6. It would be great if the cookies could be disabled until a user accepts via the popup. However, I understand how busy everyone is (everyone's probably got their heads down in spreadsheets making cookie audits for their sites :-) ). I agree that this at least shows that the website owner is working towards compliance.

Miszel’s picture

The problem is that cookies are specific to each website and hence without a proper cookie audit and without changing the application work-flow it seems to be impossible to fully comply with the regulation. I can't think of a way of doing that in a general way in a single module but I am, of course, open to any suggestions.

Expiring all cookies with javascript when a visitor arrives on a site does not seem to be an option because it is difficult to reliably clear all cookies that should not be there. Some cookies, even if they are set on the same domain, can be set on different paths. Third party cookies will be set on other domains. Cookies required for the site to function correctly, such as session cookies, are exempt from the regulation.

For the above reasons I think that each site will have to come up with a solution that will have to take into account its specifics. The aim of this module is to provide cookie notifications to the user and provide functions that can be used by developers to conditionally set cookies if necessary.

Miszel’s picture

Issue summary: View changes

Added review of other projects

Miszel’s picture

Issue summary: View changes

Added another project review

Miszel’s picture

Issue tags: +PAreview: review bonus

Added review bonus tag

luxpaparazzi’s picture

Assigned: Unassigned » luxpaparazzi

Review of the 6.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.


FILE: ...tes/all/modules/pareview_temp/test_candidate/js/eu_cookie_compliance.js
--------------------------------------------------------------------------------
FOUND 8 ERROR(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
 29 | ERROR | There should be no white space after an opening "{"
 29 | ERROR | There should be no white space before a closing "}"
 36 | ERROR | There should be no white space after an opening "{"
 36 | ERROR | There should be no white space before a closing "}"
 72 | ERROR | There should be no white space after an opening "{"
 72 | ERROR | There should be no white space before a closing "}"
 72 | ERROR | There should be no white space after an opening "{"
 72 | ERROR | There should be no white space before a closing "}"
--------------------------------------------------------------------------------
Miszel’s picture

The errors were not detected when I ran the code through http://ventral.org/pareview/httpgitdrupalorgsandboxmarcinpajdzik1538032g...

Anyway, it is corrected now. Thanks.

luxpaparazzi’s picture

Status: Needs review » Needs work

The code looks clean an nice to me, I would just recommand modifying the following:

Grammar in project application:
do not use any => does not use
is not supported for Drupal 6 => is not supported by Drupal 6

Project page:

I recommand revising this phrase:

From that date, if you are not compliant or visibly working towards compliance, you run the risk of enforcement action, which can include a fine of up to half a million pounds for a serious breach.

bottom of website => bottom of the website

Generally it would be advisable for rechecking grammar and phrasology...

Code:

1) I recommand putting the following code into theme functions or template files (.tpl):
'value' => '<h2>We use cookies on this site to enhance your user experience</h2><p>By clicking any link on this page you are giving your consent for us to set cookies.</p>',
'value' => '<h2>Thank you for accepting cookies</h2><p>You can now hide this message or find out more about cookies.</p>',

2) Pass text to t() function:

      <button type="button" class="hide-popup-button">Hide this message</button>
      <button type="button" class="find-more-button" >More information on cookies</button>
      <button type="button" class="agree-button">Yes, I agree</button>
      <button type="button" class="find-more-button">No, I want to find out more</button>
luxpaparazzi’s picture

Assigned: luxpaparazzi » Unassigned
luxpaparazzi’s picture

Issue summary: View changes

Adding link to a review of other project.

Miszel’s picture

Issue summary: View changes

Updated project page

Miszel’s picture

Status: Needs review » Needs work

I corrected the project application and project pages. Also, I added more details to the project page.

As for changes to the code:

ad 1) As the text appears in the install file to give initial values to drupal variables, I decided now to run the text through the st() function instead of creating a theme function or a template file. This way the administrator will have full control over the HTML through the module settings page

ad 2) I added the recommended t() functions

Miszel’s picture

Status: Needs work » Needs review
klausi’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

manual review:

  • eu_cookie_compliance_get_popup_content(): instead of using filter_xss_admin() you should use check_markup() to sanitize the message, as you also save the text format, right?

But otherwise this looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

mibfire’s picture

One more thing: The available variables($message and $link) should be listed in the template files and

 * agree-button      - agree to setting cookies
 * hide-popup-button - destroy the pop-up
 * find-more-button  - link to information page

is same in the two tpl files.

Apart from this it is RTBC for me too. I have tested and it works well, great module. The d5 backport is done and can be tested soon. Thx Marcin!

Miszel’s picture

Many thanks guys, I have updated the code with your suggested changes.

patrickd’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, and welcome to the community of project contributors on drupal.org!

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks, also, for your patience with the review process and for your help in the application queue. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Thanks to the dedicated reviewer(s) as well.

nnkaya’s picture

Hello,

Thank you for a nice and useful module.

I have tried this module on my website.

It is working OK when it is set to the default value. However, we I set the message to pop up at the top of the website, it is not completely working.

When I click "Yes I agree" the pup up "Hide this message" option doesn't appear. When I go the a different page on the website then "Hide this message" button appears.

I was wondering if there will be any solution for this.

Thanks

patrickd’s picture

@RezanShilan
this application issue is finished, please create a bug or support issue in the modules issue queue

Miszel’s picture

@RezanShilan

The problem is already reported here: http://drupal.org/node/1560624#comment-5954924

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated description