after recently installing SC on a live site, i noticed that it broke my custom, home made theme. disabling SC rectified the problem.
the script seems to hide itself in my left sidebar, under the radar. i have included screenshots of my theme affected by it, as well as a screenshot of the script where i noted that it was the culprit in breaking my theme. i also have linked to a forum thread here on drupal where myself and 2 comrades attempted to solve the theme problem before i realized it was caused by SC.
what the page *should* look like,
http://120178.tk/should_look.jpg
what the page looks like with the script implemented,
http://120178.tk/should_not.jpg
"inspect element," results showing statcounter in the left hand sidebar,
http://120178.tk/script.jpg
thread where we put our heads together to try to make sense of why my theme was broken, also notes my Eureka! moment.
http://drupal.org/node/1311134
Comments
Comment #1
awesome_cricket commentedbump.
Comment #2
kdebaas commentedFirst of all: sorry for responding so late. It appears that as one of the maintainers, I have forgotten to subscribe myself to the issues of this module.
The statcounter script attempts to insert itself into the footer region, unless another region is specified in the settings (only available when choosing for a visible tracker).
If you don't override any regions in your custom theme, the footer region will be predefined for you by Drupal. If you do override regions, please output the $footer content in your page template and include the footer region in your .info file.
Support for the footer region is just suggested but not required by Drupal. However, it seems you have run into Statcounter's limitation, in that things go wrong when there is no footer region present. If you would like to solve your issue in a quick and simple way, I suggest you either:
* rename your "art-footer" region into "footer"
* add a "footer" region by adding the following lines to the *.info file of your theme:
For now, I will add to the homepage of this module that it requires the presence of the footer region. Hopefully, in the longer term, and when I have time to work on it, the Statcounter module won't have to rely on its presence.
Sorry for the confusion.
Klaas
Comment #3
kdebaas commentedComment #4
awesome_cricket commentedthanks for your update, don't worry about the response time as for me this wasn't critical. :)
yes, i have been figuring that renaming something soemwhere would move it elsewhere. i will work with what you sggest and reply back with my results. i should have you know however that my theme does in fact have a footer region.
http://www.olliesworld.tk/ is my url in question. urrently at the time of me writing this reply, there is still no statcount enabled.
Comment #5
awesome_cricket commented*i have appended my theme /info file with "regions[footer] = Footer" and the site still displays "broken," on pages such as guestbook, etc.
i will leave the site as is for now as you may wish to examine it yourself.
Comment #6
kdebaas commentedHi,
in the page source of your home page, I see a div that is called art-footer. But I do not see a footer region.
After adding the "regions[footer] = Footer" to your info file, you may need to add the following lines to your page.tpl.php:
Don't forget to flush your cache! And let me know if it worked out.
Cheers
Klaas
Comment #7
tchurch commentedI suddenly started having these problems on 3 Drupal 7 sites (but not a fourth) and there was no differences in configuration or theme design.
I'm not going to mess around with the code of my themes to get it to work.
I did, however notice that if I unticked "no counter or button", saved and then re-ticked it again, it started to work.
I think it's because the variable "statcounter_js_scope" was not set (so the code defaulted it to "footer"). Not it displays it in the region I had saved previously.
This should be changed. You should always be able to say which region to place the code in, so that any region names can be catered for.
I have changed the category of this from feature to bug.