Hi:
I have a production site which partially stopped working today. All the content types that load the Sharethis button load as normal but after a couple of seconds (when the share this js attempts to load), the page turns white. Looking at the error console in Firefox I get the following error.
"Sharethis is not defined"
The error points to the following line of code:
Drupal.behaviors.extlink=function(context){extlinkAttach(context);}})(jQuery);;(function(jQuery){jQuery.sharethisQueue=[];jQuery.sharethisUrl="http://w.sharethis.com/button/sharethis.js#ref=jquery";jQuery.fn.sharethis=function(sharethisUrl){jQuery.sharethisQueue=jQuery.sharethisQueue.concat(this);if(jQuery.fn.sharethis.loaded||true){jQuery.fn.sharethis.loaded=false;jQuery.sharethisUrl=sharethisUrl||jQuery.sharethisUrl;jQuery.ajax({type:'GET',url:jQuery.sharethisUrl+'&button=false',dataType:'script',cache:true,success:function(){SHARETHIS.toolbar=true;SHARETHIS.onReady();jQuery.fn.sharethis.loadedShareThis=true;jQuery.shareThis();}});}
I disabled the Sharethis for my site and everything went back to normal.
Not sure if the problem is that the js cannot be loaded properly from the sharthis servers and this causes the problem, but in case this is the issue, the module should catch the error or something, so instead of getting a white page, you just get a page without the sharethis button working properly.
After the page goes blank, I cannot access the source code through the browser. This happened in Firefox, Safari seemed to work fine.
Thanks
Comments
Comment #1
andrea.corelli commentedSame here. It killed 2 out of 2 production sites I had the module running in.
Comment #2
gradynoonen commentedHaving the same problem. Terrible timing too.
Comment #3
richard.c.allen2386 commentedThis issue isn't a module issue, it's the entire service, killed our site today too. Disabling the module fixes the issue, until Sharethis responds on their forums.
http://forums.sharethis.com/topic.php?id=2803
Comment #4
anea02 commentedAm seeing the same thing as of 30 minutes ago. Disabled sharethis, all came back to life (after a bit of stressful investigaton!). Only saw the issue in Firefox (using 3.6.3). IE 8, Opera appeared to be fine (at the time), btw.
What is VERY BAD, IMHO, is that an external service going down can render our sites unusuable. Think a 'fatter' client is needed that checks for service availability (or something like that).
richard.c.allen2386 - nice link spotting. I think sharethis.com should have a message on their homepage letting people know. I bet their site is getting a few hits today
Comment #5
anea02 commentedLet me re-phrase part of that:
What is VERY BAD, IMHO, is that an external service going down can render our sites unusable when client is using FF (and IE 7 reading the sharethis link above).
Comment #6
John Carbone commentedHaving the same problem. Screenshots from multiple browsers show white screen for some with the module turned on. Also had white screens attempting to get to the settings page once I added the script (if I could access the site in that browser at all). It was partially working in some browsers, with the link appearing but no popup. If I had both the block and content types enabled, I got a popup in the block when hovering on the link in the content but nothing happened when hovering on the block. Very, very weird.
I disagree that the service is causing the issue though. Adding the script directly to my template.php eliminates all these problems. Screenshot tests run fine and hovering works as expected. From everything I've seen, I believe the module is at the root of the problem, not the service. No offense to the module's maintainers.
Here is my (module-less) solution for adding ShareThis to a block. I did it in code rather than in the block body because I don't want the script to appear when editing the block settings. I suppose I could have defined the block in code as well, but then I'd need to add a hook_block and spend even more time on this:
Created a dummy block. And added some text "Do not delete! See template.php" Then in my template.php I added:
Works great. No whitescreens, screenshots run fine in all browsers, all weirdness eliminated. Hope this saves someone some time.
EDIT: Are comments being moderated in this queue or something? I can't see this comment logged out of D.O...
Comment #7
anea02 commentedJohn
>"I disagree that the service is causing the issue though. Adding the script directly to my template.php eliminates all these problems."
fyi
I had added the following line of code to my tpl.php files previously:
echo theme('sharethis', $title = NULL, $url = NULL);"As well as that I was using the normal settings page (from sharethis module) in order to include it on various content types. Neither was working after today. You could be right based on your logic above. I will re-read your suggestion above and have a try (assuming 6 month old baby lets me ;-) )
Comment #8
next2manu commentedI apologize about the problem you guys are seeing.
Can someone provide me a link where I can see this problem occur. I will try and get a fix out ASAP, the problem is that we did not create this Drupal plug-in but I think that we can fix the problem...
-Manu
manu (at) sharethis dot com
UPDATE:
I have a url which I am using to figure out whats going on...
-Manu
Comment #9
John Carbone commentedIn thinking about it some more and seeing posts talking about several sites going down at once, I got to wondering if a recent update on the ShareThis site is causing what worked when the module was released to suddenly stop working now. Just a thought. :)
Comment #10
nickbert commentedCan you all share the urls where we can see the problem?
Comment #11
SyntaxJO commentedwww.breaking-down.com/blog
Comment #12
next2manu commentedWe pushed a build out last night that fixes this issue, if at first it does not work for you please clear your cache and try again.
-Manu
Comment #13
bartclarkson commentedMy talent for missing the obvious aside, it isn't clear to me where the June 11 build described is located, next2manu. Where's the fix? Alternatively, what's the fix? Thanks!
-- EDIT: Oh, I get it. Manu is on the ShareThis side. Cool. In theory I don't need to do anything... I'll try that.
-- EDIT: I don't think this is fixed. I get a mega-whitepage of death. I had to turn off JavaScript just to get at my block admin page.
Comment #14
avpaderno