This module allows your website to comply with the Dutch law on the use of cookies. By Dutch law the visitor must consent with placing cookies on your client to gather visits or other information about the visitor. This module uses the javascript solution from the Dutch government as a library and adds the ability to prevent modules from placing tracking cookies on your client. The main module offers the basic functionality like showing and configuring the cookie-bar. To exclude certain functionalities, submodules are used. Currently there is a submodule for Google analytics, Piwik and Webtrends. This module is the only module that actually makes sure their javascripts are not being executed, and their cookies are not being set, when the visitor has not agreed.

Project page: http://drupal.org/sandbox/beljaako/1862782
Git: git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/beljaako/1862782.git opt_in_cookie_consent

Further reviews of other projects
https://drupal.org/node/2086333#comment-7849677
https://drupal.org/comment/8278775#comment-8278775
https://drupal.org/comment/8282249#comment-8282249

Comments

Anonymous’s picture

Hi

I really like seeing this issue being implemented as a module!

Here are a few tips/warnings/errors that I found while scanning your code/module:

  • This module might come in handy for non-Dutch websites as well, so I'd rename the module to something more generic (e.g Cookie Consent)
  • in rijksoverheid_cookie_consent.install line 14: a typo (repsonses instead of responses)
  • in rijksoverheid_cookie_consent.module line 84: to filter out admin pages, it's better to use the the built-in admin path check:
    if (path_is_admin(current_path())) {
      // Some code
    }
  • Omit Dutch strings in your module files. You should use the t() function containing their English equivalents.
  • PHP returns a fatal error:
    PHP Fatal error: Can't use function return value in write context in ./rijksoverheid_cookie_consent.module on line 161
    Errors parsing ./rijksoverheid_cookie_consent.module

Keep up the good work!

ankitchauhan’s picture

Status: Needs review » Needs work
beljaako’s picture

Title: Rijksoverheid Cookie Consent » Opt-in Cookie Consent
Status: Needs work » Needs review

I've changed the name to "Opt-in Cookie Consent", so it's more general. Fixed the other issues too.

klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

http://drupal.org/project/cookiecontrol
http://drupal.org/project/eu-cookie-compliance

This sounds like a feature that should live in the existing cookiecontrol project. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the cookiecontrol issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.

If that fails for whatever reason please get back to us and set this back to "needs review".

beljaako’s picture

Status: Postponed (maintainer needs more info) » Needs review

Hi Klausi,

I am aware of the existence of these modules. The Dutch law is much stricter on the use of cookies and on the use of client side scripts than any other EU country. The modules above do not comply with the Dutch law. A specific script provided by the government must be used to ask for permission. You can check out any Dutch government website, they all use it. I don't see any option to comply on all these guidelines using the modules above. I would need to override almost everything in those modules and therefore would be pointless. That is also the reason I called it 'Rijksoverheid Cookie Consent'. (Rijksoverheid is Dutch for government), because it is specific for Dutch law.

beljaako’s picture

Issue summary: View changes

Adding review bonus program

nickgundry’s picture

Status: Needs review » Needs work

@beljaako

I like the module. I'm new to the module review process but I did a review using codesniffer and it cam back great. In a manual review of the code I didn't see anything that stood out to me. The only thing that I think could be changed is the process of notifiying the admin of the required JS libraries. It's clear in the README that those need downloaded, but if they haven't even anonymous visitors are getting the error message. "The Rijksoverheid Cookie Opt-in library library cannot be loaded. Please make sure that it exists before using this module."

Maybe look at not allowing the module to be configured unless those JS files are correctly installed. That way the admin has to install the JS before being able to enable any features.

Otherwise this looks good, a very useful module for EU and Dutch privacy laws.

nickgundry’s picture

Issue summary: View changes

changing name

beljaako’s picture

Issue summary: View changes

adding bonus program

beljaako’s picture

Issue summary: View changes

adding bonus program

beljaako’s picture

Issue summary: View changes

adding bonus program

beljaako’s picture

Issue summary: View changes

Adding bonus program

beljaako’s picture

Status: Needs work » Fixed

Hi Nickgundry,

Thanks for your comment. I have changed the process. You cannot enable the module anymore if you haven't installed the library. That way the administrator will allways see the warning and not the visitor of your website.

klausi’s picture

Status: Fixed » Needs review

This application is not fixed? See http://drupal.org/node/532400

beljaako’s picture

Ok, sorry about that.

beljaako’s picture

Issue summary: View changes

Adding review bonus

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

nieuwkar’s picture

Status: Needs review » Reviewed & tested by the community

I have implemented this module successfully in one of my projects. Two small remarks though:
- it was not clear to me whether I should rename the library folder, turned out I had to but the README.txt wasn't clear on that
- I couldn't find the settings page 'admin/config/system/cookie-consent' anywhere in the admin navigation. I would expect it to be somewhere under 'settings/config' and I would also expect a link to the settings page on the module page 'admin/modules'

beljaako’s picture

Issue tags: +PAreview: review bonus

Thanks Nieuwkar,

I've updated the readme, to make it more clear. The admin page should be /admin/config/system/cookie-consent. Maybe a cache issue? It could be it was located at another place in previous versions.

klausi’s picture

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

manual review:

  1. please add a list of similar modules to your project page and describe the differences.
  2. opt_in_cookie_consent.module: why do you include the log.inc file in the global module context? It does not contain hooks? You should only include files when actually need them in function bodies, or if they include hooks the must be loaded on every single page request.
  3. opt_in_cookie_consent_node_view(): all user facing text must run through t() for translation, the variable defualt value too.
  4. opt_in_cookie_consent_node_view(): why do you check_plain() the variable? You are not printing it to the user later anywhere? Make sure to read http://drupal.org/node/28984 again.
  5. opt_in_cookie_consent_node_view(): What is going on here? On what special node is that added and why? Please add a comment.
  6. "'#default_value' => filter_xss(variable_get('opt_in_cookie_consent_close', 'Close this menu bar')),": no need to filter_xss() here since #default_value will be sanitized by the form API for you. Again, please read the docs about user provided text filtering.
  7. opt_in_cookie_consent_init(): no need to check_plain() $cookie_name as it is not printed to the user?
  8. opt_in_cookie_consent_js_alter(): why do you call your own hook there without any modification? So hook_opt_in_cookie_consent_scripts_alter() is the same as hook_js_alter()? Hooks that are provided by a module should be documented in MODULENAME.api.php, see http://drupal.org/node/161085#api_php
  9. opt_in_cookie_consent_modify_cookies(): same here, please document your hooks.

Setting back to "needs work", you need to know where to sanitize text and where not. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

dbazuin’s picture

There is a module that performce the same task.
ro_cookie_opt_in
So why build a other one?

regards
Dirk

beljaako’s picture

Because above module doesn't actually do anything with cookies, nor does it prevent cookies being set.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

Changing "Reviews of other projects"

beljaako’s picture

Issue summary: View changes

adding review of other project

beljaako’s picture

Issue summary: View changes
beljaako’s picture

Issue summary: View changes

Adding review of project

beljaako’s picture

Issue tags: +PAreview: review bonus

Hi Klausi,

I've read http://drupal.org/node/28984 again, and changed accordingly and I've reviewed 3 other projects. Can you please check again?

Thank you.

beljaako’s picture

Status: Closed (won't fix) » Reviewed & tested by the community
beljaako’s picture

Issue summary: View changes
beljaako’s picture

Status: Reviewed & tested by the community » Needs review
klausi’s picture

Status: Needs review » Postponed (maintainer needs more info)

Sounds like you should collaborate with ro_cookie_opt_in then?

Can open an issue and/or contact the maintainer(s) to discuss what you need in addition?

dbazuin’s picture

Sounds like a good idea klausi.

beljaako’s picture

Status: Postponed (maintainer needs more info) » Needs review

Well, I actually already did a couple of months ago. The problem here is this module aims at building submodules for existing drupal.org modules and include functionalities to comply to the dutch cookie law. The ro_cookie_opt_in module aims at providing a framework to build your own functionality. Furthermore I am working on a new branch that completely changes how it works, because the Dutch law will probably change soon to opt-out, with some special requirements. I discussed with the ro_cookie_opt_in maintainers, but I guess it's best to let these modules live next to each other.

marty2081’s picture

I am the maintainer of the beforementioned 'ro_cookie_opt_in' module that integrates the exact same JS library from the Dutch government. If I am correct the current code under review is a fork of an early version of my code (I see a big resemblance in code).

If I remember correctly beljaako contacted me months ago to see if I would handover the maintainership to him completely and I suggested that he could become co-maintainer to add the additional functionality that he has been working on. Actually I suggested that we could create options for his sub-modules to hook into so that he would still have his own projects on drupal.org that extend the ro_cookie_opt_in module.

After that I didn't get any response anymore. There has been no recent contact.

As soon as the Dutch government releases a functioning version of their opt-out JS library I will create a version of the ro_cookie_opt_in module that integrates that library in a new branch.

I see no reason not to combine the two modules.

tallosoft’s picture

Status: Needs review » Needs work
tallosoft’s picture

I agree that there should be cooperation and not competition between two modules that are so closely related. You are both trying to solve the same problem, and one of the modules is already published, so I would think the author of the new project should work with the maintainer of the old project, and combine ideas and functionality to create one module that meets the needs.

beljaako’s picture

Status: Needs work » Needs review

Well, I didn't understand it that way, but anyway it seems a good idea to adjust your module so I can hook into it with submodules and add my functionality. We need 2 things for that to happen. 1) You need to make me co-maintainer, or make the necessary changes yourself. 2) I need to be able to create the projects for the submodules.

klausi’s picture

Status: Needs review » Needs work

You don't need to become a co-maintainer immediately, just provide a patch in the issue queue.

Then you should create a new sandbox that has the extension module(s). Please link that sandbox then in this application and change the sandbox link in the issue summary accordingly.

marty2081’s picture

@Beljaako As Klausi says: you can provide the necessary changes in a patch in one or more issues in the issue queue together with an explanation of the added/changed functionality that I can review and test and apply to the dev branch.

I'd be happy to implement any patches that improve the module. I will give you all credits for your contributions to the module of course. Your extensions can then go into separate modules.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.