Problem/Motivation
1.x shipped its own gtag_domain condition plugin for the Domain module. 2.x doesn't have it anymore, and GoogleTagUpgradeManager::convertConditions() (called from google_tag_update_8201()) silently drops every condition whose plugin doesn't exist. Only gtag_language gets converted.
So on multi-domain sites every container ends up on every domain after the upgrade. We noticed it on a site with 27 containers.
The Domain module (2.x/3.x) already provides a domain condition plugin, and the 2.x container form and resolver work with it fine.
Steps to reproduce
- On 1.x with Domain, add a container limited to one or more domains.
- Update to 2.x and run
drush updb. - The container has no domain condition anymore and loads on all domains.
Proposed resolution
Convert gtag_domain into the Domain module's domain condition in convertConditions() when that plugin exists, the same way gtag_language is converted to language. Unchecked domains (0 values) are filtered out, and exclude listed becomes negate: true.
The MR adds this plus test coverage in TagContainerUpdateTest, with drupal/domain added to require-dev.
Remaining tasks
Review.
User interface changes
None.
API changes
None.
Data model changes
None.
Related: #3618459: Upgrade path is broken, different symptom.
AI-Generated: Yes (Claude Code was used to draft this issue. I reviewed it.)
Issue fork google_tag-3636693
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
Comment #3
bceyssensMR !153 is ready. The pipeline fails at the composer jobs, same as on 2.0.x: ORCA installs Drupal 10.3.x-dev, which composer blocks because of a security advisory. Locally the Migrate kernel tests pass (Drupal 11.4, domain 3.0.2), and the new assertion fails without the fix.
AI-Generated: Yes (Claude Code was used to draft this comment. I reviewed it.)
Comment #4
bceyssensFixed in 2.1.0 by #3575350, which does the same conversion. Upgraded 1.x containers with gtag_domain conditions to 2.1.0: the domain conditions come through intact. Closing as a duplicate, and !153 can be closed too.
AI-Generated: Yes (Claude Code was used to draft this comment. I reviewed it.)