Closed (fixed)
Project:
Google Analytics Counter
Version:
7.x-1.0
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2011 at 03:27 UTC
Updated:
21 May 2012 at 22:20 UTC
I get the following error when creating a new page. The error stops once GA has registered a visit. It is only where the page has the provided block on it (views works OK.)
Notice: Undefined variable: debuggeron in google_analytics_counter_construct_content() (line 604 of /public_html/sites/all/modules/google_analytics_counter/google_analytics_counter.module).
(Deleting 'AND $debuggeron <> 1' from line 604 makes the error message go away - but I'm probably breaking something else!)
Comments
Comment #1
moltra commentedI am getting the same error on my site. It usually happens the first time a site is visited.
Notice: Undefined variable: debuggeron in google_analytics_counter_construct_content() (line 604 of /home/content/20/8959120/html/sites/all/modules/google_analytics_counter/google_analytics_counter.module).
You can see it yourself the 1st time you go to. www.serviidb.com
Comment #2
b.one commentedI had the same probleme.
I solved it by replacing this :
(on line 604)
by this
to explain :
-I added the variable "$debuggeron" at the beginning
-I set the variable "$result" to "0" (at line 608) so that the counter displays "0" when there is still no counts (facultative)
Comment #3
nothinghere commentedHave same problem, installed 7.x-1.0 yesterday.
Solution #2 works fine ! Add it to stable release !
Comment #4
vacilando commentedThanks for the comments! Fixed the notice and created 7.x-1.1.