Problem/Motivation

Steps to reproduce:

  1. Go to the module configuration page
  2. Choose Consent by default method
  3. Uncheck Show "Cookie policy" and "More info" buttons field
  4. Save the configuration

You will see, that the configuration takes effect in the frontend. But when you have a look at the module configuration form again, you will see, that the Show "Cookie policy" and "More info" buttons field again is checked, no regard of the settings you have saved and are working in the frontend.

That leads to the situation, that with the Consent by default method, you could always accidentally overwrite the setting of the Show "Cookie policy" and "More info" buttons field.

The issue seems to be related to the core issue: #2477053: Default_value overridden by form #states at page load. So the Javascript #states handling is processing, no matter if there was a #default_value or not and therefore always take precedence.

Proposed resolution

Simply remove the #states automatic checking of the field. The benefit is less, than the side-effect it could cause.

User interface changes

The Show "Cookie policy" and "More info" buttons field will not by always checked anymore, when using the Consent by default option.

Comments

szeidler created an issue. See original summary.

szeidler’s picture

Status: Active » Needs review
StatusFileSize
new526 bytes

Here's a patch that solves the issue by removing the automatic checked #state.

svenryen’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
svenryen’s picture

  • svenryen committed 5541645 on 7.x-1.x authored by szeidler
    Issue #2983881 by szeidler: "Show 'Cookie policy' and 'More info'...

  • svenryen committed 9c4e34e on 8.x-1.x
    Issue #2983881 by svenryen: "Show 'Cookie policy' and 'More info'...
svenryen’s picture

Status: Needs review » Fixed

Fixed. Thanks!

  • svenryen committed 5541645 on 7.x-2.x authored by szeidler
    Issue #2983881 by szeidler: "Show 'Cookie policy' and 'More info'...
  • svenryen committed 884a355 on 7.x-2.x
    Merge branch '7.x-1.x' into 7.x-2.x
    
    * 7.x-1.x:
    Issue #2975382 by...

Status: Fixed » Closed (fixed)

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