Closed (fixed)
Project:
ShareThis
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Aug 2008 at 21:28 UTC
Updated:
30 Dec 2008 at 22:30 UTC
Before you set up ShareThis!, it will print out a '0' at the very top of the page. This is because of a slight error in line 6 of the module. The fix is very simple, so I didn't roll a patch.
Line 6 should be changed from:
if(drupal_set_html_head(variable_get('sharethis_sharethis_this_code', 0)) != 0) {
to
if(variable_get('sharethis_sharethis_this_code', 0) != 0) {
That clears up the issue.
Comments
Comment #1
himerus commentedOkay, this is fixed in 1.3-3. http://drupal.org/node/302414
It was a dumb mistake... and I changed the condition to actually read the on/off switch in the module as the determination if to display the ShareThis code or not.
This means that the code should be inserted at the same time as when enabling the on/off switch.
I think this issue may fix the errors with duplicating shareThis items as well... it wasn't happening the first few times I tried it after upgrade.
Comment #2
himerus commentedComment #3
ica commentedOh.. thanks for the bugfix.. i was wondering where and how this "0" popped in the HEAD of the site and what caused it.. sharethis! "0" :)
Comment #4
Steven Merrill commentedThanks for the prompt response - I'll download 1.3-3 now.
Comment #5
Steven Merrill commentedI'm afraid the same thing still happens before configuring the module when using 6-1.3-3.
Comment #6
himerus commentedCrap... I'll take a look... I may need to physically uninstall the module for the test to properly work rather than just turning it off/on
Comment #7
fertoif commentedThis worked for me, but obviously it does not solve the issue, only prevents the zero from messing up the head section.
Comment #8
greenskin commentedthe variable_get('sharethis_sharethis_this_code', 0) should probably be changed to variable_get('sharethis_sharethis_this_code', '').
Comment #9
whitesun commentedI found that version 6.x-1.3-3 is also leading to the same problem. Disabling the module clears the '0' from the left top corner of the page. Otherwise this zero is very persistent. When the page is refreshed or a new link is clicked the zero persists.
This is very annoying and I hope a solution is posted soon.
Thanks
Comment #10
dave reidMarked #333189: "0" in top of every page, can't control $head variable in page.tpl as a duplicate of this issue.
Comment #11
dave reidMarking issue for 6.x-1.x since this is still not fixed in 6.x-1.3-1 and up.
Comment #12
robloachChecking if it's !empty() before printing it: http://drupal.org/cvs?commit=159316