- Issue created by @xurizaemon
- Status changed to Needs review
about 1 year ago 9:33am 20 September 2023 - last update
about 1 year ago Patch Failed to Apply - Status changed to Needs work
11 months ago 11:39pm 15 December 2023 - ๐บ๐ธUnited States RichardDavies Portland, Oregon
I encountered the following error when attempting to upgrade from v1.6 to v2.0.2
Drupal\google_tag\Migration\GoogleTagMigrateBase::getRequestPathCondition(): Argument #1 ($request_paths) must be of type string, null given, called in /app/web/modules/contrib/google_tag/src/Migration/GoogleTagUpgradeManager.php on line 126
Although this patch allowed me to run the database update without error, it does not appear to have correctly/fully migrated my previous container settings. For example, here is my previous container YAML:
uuid: 0c9d3f73-ef36-48ab-9c86-28b4cc41bc2b langcode: en status: true dependencies: module: - webform id: employees_portland.gov label: 'Employees Portland.gov' weight: 0 container_id: GTM-[REDACTED] data_layer: dataLayer include_classes: false whitelist_classes: |- google nonGooglePixels nonGoogleScripts nonGoogleIframes blacklist_classes: |- customScripts customPixels include_environment: true environment_id: env-3 environment_token: [REDACTED] path_toggle: 'exclude listed' path_list: |- /admin* /batch* /clone/* /devel/* /node/add* /node/*/edit /node/*/delete /node/*/revisions /node/*/usage /user/*/edit* /user/*/cancel* /user/*/scheduled* /user/*/connected-accounts /user/*/submissions /group/*/edit /group/*/delete /group/*/content* /group/*/nodes /group/*/revisions /group/*/members /group/*/media* /group/*/usage /group/*/subgroups /group/*/create /media/*/edit /media/*/delete /media/*/usage /taxonomy/*/edit /taxonomy/*/delete /taxonomy/*/usage role_toggle: 'exclude listed' role_list: { } status_toggle: 'exclude listed' status_list: |- 403 404 conditions: { }
And here is the new YAML:
uuid: 0c9d3f73-ef36-48ab-9c86-28b4cc41bc2b langcode: en status: true dependencies: { } id: employees_portland.gov label: 'Employees Portland.gov' weight: 0 tag_container_ids: - null advanced_settings: gtm: data_layer: dataLayer include_classes: false allowlist_classes: '' blocklist_classes: '' include_environment: false environment_id: '' environment_token: '' dimensions_metrics: { } conditions: { } events: search: { } webform_purchase: { } login: method: CMS custom: { } generate_lead: value: '' currency: '' sign_up: method: CMS
As you can see, it didn't transfer the container ID, environment, or path exclusion settings.
- last update
10 months ago 54 pass - First commit to issue fork.
- ๐ฎ๐ณIndia rajeshreeputra Pune
@RichardDavies I am unable to see the issue described in #5 ๐ GoogleTagUpgradeManager may fail upgrade for some configurations Needs work . following step I took to verify:
- setup drupal 9 latest version codebase.
- require google_tag 1.6 version as mentioned in #5 ๐ GoogleTagUpgradeManager may fail upgrade for some configurations Needs work
- Install site with minimal profile
- install google_tag module
- configure google_tag module
- update/add environment info, path exclusion, other(as needed)
- update google_tag to 2.0.2
- run database update
- verify google_tag config, all available and upgrade is successful.
Let me know if I am missing something.