[1.0.x] GDPR & CCPA Cookie Consent

Created on 17 May 2022, over 2 years ago
Updated 7 May 2023, over 1 year ago

Our module shows GDPR consent banner which registers a user on seersco.com, where they alter banner settings like text colour and text modifications.

We are using now tags to show versions like 1.0.2, 1.03, 1.0.4 etc. Where as it is same we push and pull changes to branch 1.0.* and then merge this branch to master branch.

Project link

https://www.drupal.org/project/gdpr_ccpa_cookie_consent_seers

📌 Task
Status

Closed: won't fix

Component

module

Created by

🇬🇧United Kingdom nickspencer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I am closing this application, since there haven't been replies in more than six months and the application has been created eight months ago or more.
    Feel free to re-open it, once the project has been changed basing on what reported in the last review.

  • Assigned to nickspencer
  • Status changed to Needs review about 1 month ago
  • 🇬🇧United Kingdom nickspencer

    I am going to fix the above points and please can you review it again I am fixing these point to late but is there any way that my module will become covered by Drupal again.

  • 🇮🇳India rushiraval

    "master" & "Revert 2.0.x are a wrong branch names, as branch names end with the literal .x. Those branch needs to be removed.

    Also specify for which branch name is application for review i.e. 1.0.x or 2.0.x

  • 🇬🇧United Kingdom nickspencer
    $user = \Drupal::currentUser();
        $form['consent_url'] = [
          '#type' => 'textfield',
          '#title' =>  $this->t('URL'),
          '#maxlength' => 200,
          '#size' => 64,
          '#default_value' => (($config->get('consent_url')) ? $config->get('consent_url') : $GLOBALS['base_url'] ),
          '#attributes' => array('readonly' => 'readonly')
        ];
    

    Every dependency must be injected using the DI container, in the create() method.
    Cannot undersant what is dependency I use
    \Drupal::
    it must not use like this?
    I have to use namespace?

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇬🇧United Kingdom nickspencer

    now I have done the changes suggested by tickets above please verify those changes it is in branch
    3.0.x

  • 🇬🇧United Kingdom nickspencer

    Please review my changes in branch 3.0.x

  • 🇮🇳India vishal.kadam Mumbai

    @nickspencer: Please avoid adding comments in the issue tags. Simply update the status to "Needs review" after you've made the necessary changes.

  • 🇮🇳India vishal.kadam Mumbai

    1. Fix phps issues.

    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml gdpr_ccpa_cookie_consent_seers/
    
    FILE: gdpr_ccpa_cookie_consent_seers/gdpr_ccpa_cookie_consent_seers.routing.yml
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     7 | WARNING | The administration page callback should probably use "administer site configuration" - which implies the user can change something - rather than "access
       |         | administration pages" which is about viewing but not changing configurations.
    --------------------------------------------------------------------------------
    
    FILE: gdpr_ccpa_cookie_consent_seers/gdpr_ccpa_cookie_consent_seers.info.yml
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
    --------------------------------------------------------------------------------
    
    FILE: gdpr_ccpa_cookie_consent_seers/gdpr_ccpa_cookie_consent_seers.install
    --------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------
      1 | ERROR | [x] Missing file doc comment
      7 | ERROR | [x] Opening brace should be on the same line as the declaration
     18 | ERROR | [x] Opening brace should be on the same line as the declaration
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    FILE: gdpr_ccpa_cookie_consent_seers/gdpr_ccpa_cookie_consent_seers.module
    --------------------------------------------------------------------------------
    FOUND 8 ERRORS AND 3 WARNINGS AFFECTING 10 LINES
    --------------------------------------------------------------------------------
      6 | ERROR   | [x] There must be exactly one blank line after the file comment
     12 | ERROR   | [x] Expected 1 blank line before function; 2 found
     13 | ERROR   | [x] Opening brace should be on the same line as the declaration
     23 | ERROR   | [x] Opening brace should be on the same line as the declaration
     25 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
     46 | WARNING | [x] A comma should follow the last multiline array item. Found: false
     46 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
     51 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
     52 | WARNING | [x] A comma should follow the last multiline array item. Found: 'seers cookie consent'
     61 | ERROR   | [x] Opening brace should be on the same line as the declaration
     64 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    FILE: gdpr_ccpa_cookie_consent_seers/src/Form/SeerCookieConsentForm.php
    --------------------------------------------------------------------------------
    FOUND 70 ERRORS AND 14 WARNINGS AFFECTING 59 LINES
    --------------------------------------------------------------------------------
      11 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
      13 | ERROR   | [x] Opening brace should be on the same line as the declaration
      15 | ERROR   | [ ] Missing member variable doc comment
      16 | ERROR   | [ ] Missing member variable doc comment
      22 | ERROR   | [x] Opening brace should be on the same line as the declaration
      32 | ERROR   | [x] Opening brace should be on the same line as the declaration
      40 | ERROR   | [x] Opening brace should be on the same line as the declaration
      42 | ERROR   | [x] Concat operator must be surrounded by a single space
      42 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
      46 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
      49 | ERROR   | [x] Expected 1 space after "=>"; 2 found
      52 | ERROR   | [x] There should be no white space before a closing ")"
      53 | ERROR   | [x] Short array syntax must be used to define arrays
      53 | WARNING | [x] A comma should follow the last multiline array item. Found: )
      57 | ERROR   | [x] Expected 1 space after "=>"; 2 found
      60 | ERROR   | [x] There should be no white space before a closing ")"
      61 | WARNING | [x] A comma should follow the last multiline array item. Found: true
      61 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
      65 | ERROR   | [x] Expected 1 space after "=>"; 2 found
      66 | ERROR   | [x] There should be no white space before a closing ")"
      67 | WARNING | [x] A comma should follow the last multiline array item. Found: true
      67 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
      71 | ERROR   | [x] Expected 1 space after "=>"; 2 found
      72 | ERROR   | [x] There should be no white space before a closing ")"
      73 | WARNING | [x] A comma should follow the last multiline array item. Found: true
      73 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
      75 | ERROR   | [x] Whitespace found at end of line
      78 | ERROR   | [x] Expected 1 space after "=>"; 2 found
      82 | ERROR   | [x] Short array syntax must be used to define arrays
      82 | WARNING | [x] A comma should follow the last multiline array item. Found: )
      91 | ERROR   | [x] Opening brace should be on the same line as the declaration
      94 | ERROR   | [x] No space found before comment text; expected "// if the checkboxes are checked" but found "//if the checkboxes are checked"
      94 | ERROR   | [x] Inline comments must start with a capital letter
      94 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
      99 | WARNING | [ ] Unused variable $termsandcondition.
     100 | WARNING | [ ] Unused variable $termsandcondurl.
     104 | ERROR   | [x] Expected 1 space before "=>"; 0 found
     104 | ERROR   | [x] Expected 1 space after "=>"; 0 found
     105 | ERROR   | [x] Expected 1 space before "=>"; 0 found
     105 | ERROR   | [x] Expected 1 space after "=>"; 0 found
     106 | ERROR   | [x] Expected 1 space before "=>"; 0 found
     106 | ERROR   | [x] Expected 1 space after "=>"; 0 found
     107 | ERROR   | [x] Expected 1 space before "=>"; 0 found
     107 | ERROR   | [x] Expected 1 space after "=>"; 0 found
     108 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     108 | WARNING | [x] A comma should follow the last multiline array item. Found: )
     110 | ERROR   | [x] Whitespace found at end of line
     113 | WARNING | [x] A comma should follow the last multiline array item. Found: $baseurl
     115 | ERROR   | [x] Whitespace found at end of line
     118 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
     118 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
     119 | ERROR   | [x] Whitespace found at end of line
     120 | ERROR   | [x] Equals sign not aligned correctly; expected 1 space but found 2 spaces
     120 | ERROR   | [x] Expected one space after the comma, 0 found
     120 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
     122 | ERROR   | [x] There should be no white space after an opening "("
     122 | ERROR   | [x] There should be no white space before a closing ")"
     127 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     127 | ERROR   | [x] Object operator not indented correctly; expected 10 spaces but found 8
     128 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     129 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     130 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     130 | ERROR   | [x] There should be no white space before a closing ")"
     131 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     131 | ERROR   | [x] There should be no white space before a closing ")"
     132 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     132 | ERROR   | [x] There should be no white space before a closing ")"
     133 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     134 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     135 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     137 | ERROR   | [x] Expected newline after closing brace
     137 | ERROR   | [x] Use "elseif" in place of "else if"
     137 | ERROR   | [x] There should be no white space after an opening "("
     137 | ERROR   | [x] There should be no white space before a closing ")"
     139 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     139 | ERROR   | [x] Object operator not indented correctly; expected 10 spaces but found 8
     140 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     141 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     142 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     143 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     144 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     145 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     146 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
     147 | ERROR   | [x] Line indented incorrectly; expected 10 spaces, found 8
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 75 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    FILE: gdpr_ccpa_cookie_consent_seers/src/Service/CustomFunctions.php
    --------------------------------------------------------------------------------
    FOUND 38 ERRORS AND 9 WARNINGS AFFECTING 34 LINES
    --------------------------------------------------------------------------------
       3 | ERROR   | [ ] Namespaced classes, interfaces and traits should not begin with a file doc comment
       7 | WARNING | [x] Unused use statement
       7 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Http\ClientFactory.
      15 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
      15 | ERROR   | [ ] Missing member variable doc comment
      16 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
      16 | ERROR   | [ ] Missing member variable doc comment
      19 | WARNING | [ ] Line exceeds 80 characters; contains 146 characters
      22 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
      22 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
      24 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
      25 | ERROR   | [x] Whitespace found at end of line
      29 | ERROR   | [x] Incorrect spacing between argument "$modulename" and equals sign; expected 1 but found 0
      29 | ERROR   | [x] Incorrect spacing between default value and equals sign for argument "$modulename"; expected 1 but found 0
      30 | ERROR   | [x] Concat operator must be surrounded by a single space
      30 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
      35 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
      39 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
      42 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
      43 | ERROR   | [x] Array indentation error, expected 6 spaces but found 8
      43 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
      48 | ERROR   | [x] Whitespace found at end of line
      49 | ERROR   | [x] Expected 1 space after "="; 0 found
      52 | ERROR   | [x] Whitespace found at end of line
      55 | ERROR   | [ ] Parameter $isjson is not described in comment
      57 | ERROR   | [x] Whitespace found at end of line
      59 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
      59 | ERROR   | [ ] Parameter comment must start with a capital letter
      59 | ERROR   | [x] Parameter comment must end with a full stop
      61 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
      63 | ERROR   | [x] Parameter comment indentation must be 3 spaces, found 4 spaces
      63 | ERROR   | [ ] Parameter comment must start with a capital letter
      64 | ERROR   | [x] Whitespace found at end of line
      68 | ERROR   | [ ] Public method name "CustomFunctions::make_request_with_http_client" is not in lowerCamel format
      68 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
      70 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
      76 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
      76 | WARNING | [ ] Line exceeds 80 characters; contains 115 characters
      76 | ERROR   | [x] Comments may not appear after statements
      77 | ERROR   | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
      78 | ERROR   | [x] No space found before comment text; expected "// 'debug' => true" but found "//'debug' => true"
      83 | ERROR   | [x] Expected newline after closing brace
      88 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 3 empty lines
      89 | ERROR   | [x] Whitespace found at end of line
      93 | ERROR   | [x] Whitespace found at end of line
      96 | ERROR   | [x] Expected newline after closing brace
     102 | ERROR   | [x] Expected 1 newline at end of file; 0 found
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 33 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    FILE: gdpr_ccpa_cookie_consent_seers/css/cookie-style.css
    --------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
     1 | ERROR | [x] Additional whitespace found at start of file
     5 | ERROR | [x] Multiple selectors should each be on a single line
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------

    2. FILE: gdpr_ccpa_cookie_consent_seers.info.yml

    package: 'Custom'

    This line is used by custom modules created for specific sites. It is not a package name used for projects hosted on drupal.org.

    3. FILE: gdpr_ccpa_cookie_consent_seers.libraries.yml

    version: VERSION

    VERSION is only used by Drupal core modules. Contributed modules should use a literal string that does not change with the Drupal core version a site is using.

    4. FILE: gdpr_ccpa_cookie_consent_seers.module

    /**
     * @file
     * Contains gdpr_ccpa_cookie_consent_seers.module.
     */

    The usual description for a .module file is Hook implementations for the [module name] module. where [module name] is the module name given in the .info.yml file.

Production build 0.71.5 2024