Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Installed version - 7.x-1.2-rc1+6-dev
After inserting the google code id in the form of GTM-XXXXXXX (7 characters) I get an error message:
A valid environment ID is case sensitive and formatted like env-x.
Can not use the module
Comments
Comment #3
solotandem CreditAttribution: solotandem commentedThanks for reporting this. Grab the dev release tomorrow or pull the commit today, and try it.
BTW, the error is not about the container ID, but the environment ID (advanced tab, visible after checking 'Include an environment'). If you are not on a production site, then check the box and enter a value. You may also need to declare the environment in your GTM settings.
Comment #4
solotandem CreditAttribution: solotandem commentedThis is an rc2 issue (which is same as rc1+6-dev, but less clear).
Comment #5
solotandem CreditAttribution: solotandem commentedComment #6
taitai CreditAttribution: taitai commentedI have tried your latest version 7.x-1.2-rc2+1-dev
You can now enter the google code id
However, the code id is not showing in the page source
src="//www.googletagmanager.com/ns.html?id="
I don't know if this required a new issue
Comment #7
taitai CreditAttribution: taitai commentedComment #8
solotandem CreditAttribution: solotandem commentedThis issue is done; please create another issue for your current topic. Please mark it a support request unless you can prove the cause being a bug in this module, as I cannot reproduce what you report.
Comment #9
davon97 CreditAttribution: davon97 commentedThis appears to still be an issue as of the latest downloadable release (google_tag 7.x-1.2-rc2). I am getting the same error as described in this ticket and am unable to use the module as well.
Comment #10
solotandem CreditAttribution: solotandem commentedPlease provide some details to support your claims; otherwise this is in a 'cannot reproduce' state. Is a new issue more appropriate?
Comment #11
davon97 CreditAttribution: davon97 commentedFYI, for anyone following along. The issue above has been resolved in the latest commit. To grab the latest commit I ran the following:
git clone git://git.drupal.org/project/google_tag.git
This code is working for me now.
Comment #12
asauterChicago CreditAttribution: asauterChicago commentedCan confirm this issue still persist in the latest 7.x-1.2-rc2+1-dev version.
Steps to reproduce:
1. Install module.
2. Go to admin/config/system/google_tag
3. Attempt to save your GTM container id.
4. Get error: "A valid environment ID is case sensitive and formatted like env-x."
This module is unusable for now.
Edit: Please note the stable 7x-1.1 version works just fine.
Comment #13
asauterChicago CreditAttribution: asauterChicago commentedComment #14
solotandem CreditAttribution: solotandem commentedPlease review the code on your site (confirm it has the revision you mention) and provide some evidence for your claim (e.g. where is the code failing, what 'relevant' modules [not all of them please] you have enabled and which release); i am in agreement with davon97 that this is fixed; i.e. cannot reproduce.
Comment #15
asauterChicago CreditAttribution: asauterChicago commented> where is the code failing, what 'relevant' modules [not all of them please] you have enabled and which release)
I'm not sure what you mean. Your code is failing in your form validation somewhere. I'm not setting an environmental variable in any other place The only other google contrib module I have enabled is google analytics, which also does not set a $values['google_tag_include_environment'].
However, if you wish, I can open an xdebug console and debug some breakpoints. I'll paste my findings back here.
Comment #16
solotandem CreditAttribution: solotandem commentedDo you have enabled variable or variable_realm, i18n, etc?
Comment #17
solotandem CreditAttribution: solotandem commentedI suspect you are running 1.2-rc2 not 1.2-rc2+1 as claimed.
By evidence, I am asking you to back up your claim that the "code is failing in your form validation somewhere." Where, under what conditions, etc.? The error message you refer to is wrapped in a conditional that requires "$include_environment" to be set before the message could possibly be displayed. Based on what you have reported, my guess would be that you checked this box and submitted the form, in the absence of any evidence to the contrary.
I just tested the settings form again with and without modules like variable_realm being enabled; it works fine. If you desire to continue this discussion, please start a new issue and tag it a 'support request' unless you can provide evidence for your claim of a bug.
Comment #18
Chris Burge CreditAttribution: Chris Burge commentedI can confirm that the error exists in 7.x-1.2-rc2 but is resolved in 7.x-1.2-rc2+1.
Comment #19
intrafusionThis issue may be fixed, but please do something about the homepage:
Prefer the 1.2-rc2 release over the 1.1 release as it fixes some bugs in the 1.1 release and adds features. It is not shown below due to 'stable' releases being preferred over 'unstable' releases.
Please roll a 1.2-rc3 release and update the project homepage.
Comment #20
solotandem CreditAttribution: solotandem commentedI agree with you about making an rc3 release, but was deferring until more commits and/or user feedback. At this point, am waiting for feedback on #2848738: Enhance support for stream wrappers.
For anyone reading this issue and using the 7.x-1.2-rc2 release, contrary to the claim in comment 12 that "this module is unusable for now," simply do the following (to workaround the bug documented in this issue):
Comment #22
solotandem CreditAttribution: solotandem commentedComment #23
solotandem CreditAttribution: solotandem commentedComment #24
icf-vpathak CreditAttribution: icf-vpathak commentedI was facing the same issue. The process mentioned in comment number 20 helped.
Thanks, Solotandem!