Problem/Motivation

I was having trouble with the tag not firing upon install / upgrade *after* saving the configuration form. For some reason, the Group module's GroupType plugin was saving itself into this module's configuration, even though no group types or negation was selected. After looking at what was saved to the tag container entity's conditions, the group type negation was different than all the rest. It was stored as an integer instead of a boolean. This broken configuration was not allowing the tag to fire anywhere.

It seems there's some strict type checking on the negation of any given condition. According to Core config schema, the 'negate' value must be a boolean.

https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/config/sche...

Steps to reproduce

Have the Group module installed.
Upgrade this module to 2.x.
Save the config form.
No dataLayer.

Proposed resolution

Cast all negation values on condition configuration to a boolean during condition save.

Remaining tasks

See MR.

User interface changes

None.

API changes

None.

Data model changes

Prior configurations may be updated from integer to boolean, which is the Core data type. This is the way.

Issue fork google_tag-3357493

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexandersluiter created an issue. See original summary.

mglaman’s picture

Status: Active » Needs review

japerry made their first commit to this issue’s fork.

japerry’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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