[2.x] EU Cookie Compliance GTM

Created on 28 March 2023, over 1 year ago
Updated 19 April 2023, over 1 year ago

This is a complementary module for the EU Cookie Compliance (GDPR Compliance) โ†’ module, which integrates it with GoogleTagManager โ†’ module.

Firstly, it extends the cookie category admin UI by adding a field to store arbitrary data in JSON format for each category.

Secondly, it exposes that data in drupalSettings.

Finally, it pushes that data to dataLayer by hooking into events triggered by the main module on user interaction.

Manual reviews of other projects

Project link

https://www.drupal.org/project/eu_cookie_compliance_gtm โ†’

๐Ÿ“Œ Task
Status

Fixed

Component

module

Created by

๐Ÿ‡ท๐Ÿ‡ดRomania reszli Tรขrgu Mureศ™

Live updates comments and jobs are added and updated live.
  • PAreview: review bonus

    This issue tag is used in the "Drupal.org security advisory coverage applications" queue for applications that follow the review bonus program.

Sign in to follow issues

Comments & Activities

  • Issue created by @reszli
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai

    Thank you for applying! Reviewers will review the project files, describing what needs to be changed.

    Please read Review process for security advisory coverage: What to expect โ†’ for more details and Security advisory coverage application checklist โ†’ to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

    To reviewers: Please read How to review security advisory coverage applications โ†’ , What to cover in an application review โ†’ , and Drupal.org security advisory coverage application workflow โ†’ .

    While this application is open, only the user who opened the application can make commits to the project used for the application.

    Reviewers only describe what needs to be changed; they don't provide patches to fix what reported in a review.

  • Status changed to RTBC over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Since these applications are for giving a Drupal role to users who apply, the fact the project is already covered by the security advisory is irrelevant.

    What we need is a project where the user who applies has done commit in at least a branch, and those commits must be the only ones done, or the majority. In this case, there are some commits by other users, but the majority is done by reszli.

    The application follows the usual path.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal.kadam Mumbai

    Fix PHPCS issues.

    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml eu_cookie_compliance_gtm/
    
    FILE: eu_cookie_compliance_gtm/eu_cookie_compliance_gtm.info.yml
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     8 | WARNING | All dependencies must be prefixed with the project name, for     
       |         | example "drupal:"
     9 | WARNING | All dependencies must be prefixed with the project name, for     
       |         | example "drupal:"
    --------------------------------------------------------------------------------
    
    
    FILE: eu_cookie_compliance_gtm/eu_cookie_compliance_gtm.module
    --------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
    --------------------------------------------------------------------------------
     50 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced   
        |         |     with use statements
     53 | ERROR   | [x] Short array syntax must be used to define arrays
     61 | WARNING | [x] A comma should follow the last multiline array item. Found: 
        |         |     '{"analytics": "@status", "functional":
        |         |     "@functional_status"}'
     65 | WARNING | [x] A comma should follow the last multiline array item. Found: 
        |         |     ]
     71 | ERROR   | [x] Missing function doc comment
     74 | ERROR   | [x] Whitespace found at end of line
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    
    FILE: eu_cookie_compliance_gtm/README.md        
    ------------------------------------------------------------------------        
    FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
    ------------------------------------------------------------------------        
      4 | WARNING | [ ] Line exceeds 80 characters; contains 124 characters
      6 | WARNING | [ ] Line exceeds 80 characters; contains 114 characters
     18 | WARNING | [ ] Line exceeds 80 characters; contains 116 characters
     23 | WARNING | [ ] Line exceeds 80 characters; contains 146 characters
     28 | ERROR   | [x] Expected 1 newline at end of file; 0 found
    ------------------------------------------------------------------------        
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------
    
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rassoni Bangalore

    PHPSTAN issues:

    php vendor/bin/phpstan analyse modules/contrib/eu_cookie_compliance_gtm

     2/2 [โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“] 100%
    
     ------ -------------------------------------------------------------------------------------------------------------------------------------------------- 
      Line   eu_cookie_compliance_gtm.module                                                                                                                   
     ------ -----------------------------------------------------
      87     Parameter $menu of function eu_cookie_compliance_gtm_category_form_builder() has invalid type Drupal\eu_cookie_compliance\Entity\CookieCategory.  
     ------ ----------------------------------------------------
    
     ------ ------------------------------------------------------
      Line   tests/src/Functional/LoadTest.php                                                                                                                   
     ------ ------------------------------------------------------
      13     Drupal\Tests\BrowserTestBase::$defaultTheme is required. See https://www.drupal.org/node/3083055, which includes recommendations on which theme to  
             use.                                                                                                                                                
      32     Return type mixed of method Drupal\Tests\eu_cookie_compliance_gtm\Functional\LoadTest::setUp() is not covariant with return type void of method     
             PHPUnit\Framework\TestCase::setUp().                                                                                                                
     ------ ---------------------------------------------
    
    
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine HitchShock Ukraine

    Automated Review

    [Best practice issues identified by pareview.sh / drupalcs / coder. Please don't copy/paste all of the results unless they are short. If there are a lot, then post a link to the automated review and mention that problems should be addressed.]

    Note that perfect adherence to Drupal Coding Standard โ†’ is a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.

    Manual Review

  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ท๐Ÿ‡ดRomania reszli Tรขrgu Mureศ™

    I have fixed the PHPCS, PHPstan and licensing issues mentioned above in branch 2.x

    regarding the PHPstan error about the invalid type CookieCategory: I guess that is a false-positve when not tested in proper context
    however, I did rename the variable from $menu to $category which is more relevant

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    As a side note, Application checklist โ†’ has a point about license files.

    Ensure the top directory of the repository does not contain a LICENSE.txt (or similar) file

    Do not include a LICENSE.txt file in the top directory of your repository. Drupal.org will add the appropriate version automatically during packaging.

    It is incorrect to say a license file must be present. Projects hosted on drupal.org are not allowed to be licensed under a license that is different from the one used by Drupal. That would be possible, eventually, for projects containing only assets file.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Thank you for your contribution! I am going to update your account.

    These are some recommended readings to help with excellent maintainership:

    You can find more contributors chatting on the Slack โ†’ #contribute channel. So, come hang out and stay involved โ†’ .
    Thank you, also, for your patience with the review process.
    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.

    I thank all the reviewers.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Assigned to apaderno
  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024