Warning: Undefined array key "negate" when saving GTM settings

Created on 27 November 2023, about 1 year ago
Updated 8 August 2024, 5 months ago

Problem/Motivation

When saving the GTP page, a warning is displayed:

Steps to reproduce

I'm not sure if any of this is a contributing factor, but here's how I got to this error:

  • Upgrade to D10 from D9.
  • Enable the Advanced -> Allow multiple Tag Containers setting.
  • Delete the old container from the Additional Tags tab.
  • Disable the Advanced -> Allow multiple Tag Containers setting.
  • Populate the Tag Settings tab with appropriate values.
  • Click "Save" to get the error.

With version 2.0.2 installed and a breakpoint set on line 598 of TagContainerForm.php, I see the following on the first run through this loop:

Proposed resolution

Check for the existence of the 'negate' key before trying to use it.

Remaining tasks

Integrate the attached `fix-negate-key-warning-2.0.x-1.patch` patch to the code base; the `fix-negate-key-warning-2.0.2-1.patch` applies to the current production release cleanly.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States emanaton

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024