Problem/Motivation

The 'gtag_domain' plugin does not exist

Steps to reproduce

1. Upgrade google_tag from 1.x to 2.x
2. Run update.php

CommentFileSizeAuthor
#2 3575350.patch2.16 KBvishal.kadam

Issue fork google_tag-3575350

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

vishal.kadam created an issue. See original summary.

vishal.kadam’s picture

Status: Active » Needs review
StatusFileSize
new2.16 KB
vishal.kadam’s picture

Issue summary: View changes

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

japerry’s picture

Status: Needs review » Fixed

There are two problems here. The exception comes from disabled 1.x containers: google_tag_update_8201() only converts enabled ones, so the post update re-saves a container that still has gtag_domain. That part is fixed by #3498247: Only active tag containers are upgraded. On enabled containers, convertConditions() silently dropped gtag_domain, so the tag fired on every domain.

Patch #2 renames the condition to 'domain' but keeps the 1.x keys, so the converted condition has no domains and matches everywhere. I've replaced it with MR !154:

  • convertConditions() maps gtag_domain to the Domain module's condition: domain_list to domains, 'exclude listed' to negate, and the entity:domain context to domain.
  • An empty domain list, or a site without the Domain condition plugin, still drops the condition.
  • Added TagContainerUpdateTest cases for each, using a test module with a stand-in 'domain' condition.

#3636693: Upgrade from 1.x drops gtag_domain conditions, containers load on every domain / MR !153 does the same conversion; so I'll close that one.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • japerry committed a3c95682 on 2.0.x
    fix: #3575350 Convert the 1.x gtag_domain condition when upgrading...

Status: Fixed » Closed (fixed)

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