Third party Error in displaying the AddThis Share This page

Stemis

Active member
There is an error in displaying the AddThis on permalink.
When you click on first time on any post in the topic Addthis is showing well.
1.webp
But, when you click on any other post permalink in the topic Addthis is not showing.
2.webp
 
I just tested it using Waterfox. The first time you click the post number it displays the list of icons, the next post you click, only a small white square is shown. When you go to a new thread, the first permalink you click works correctly, the next does not. It may be a browser issue, but this happens in both Chrome and Waterfox.

Edit: Same results in latest version of IE.
 
But it doesn't happen for Chrome for me... There must be some other forces at play here...

Is anything logged in the console?
 
Confirmed

Code:
Google Chrome    25.0.1364.97 (Official Build 183676) m
OS    Windows
WebKit    537.22 (@143379)
JavaScript    V8 3.15.11.15
Flash    11.6.602.171
User Agent    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22
 
Although it was working fine for me earlier, this has now started happening...

So, confirmed.

Seems like this could be a recent thing as I don't recall seeing it before.

Maybe AddThis changed some of their javascript stuff. Might explain why it was working fine for me. Perhaps a good version was cached for me.
 
Annoyingly, this looks to be an AddThis bug. It basically just falls over if you call the init() function twice and I haven't managed to get their toolbox() method to work at all either. Not sure I can really do much about this unfortunately.
 
This happened to one of our clients as well. We tracked it down to (a ridiculous amount of) global namespace pollution. Since there isn't a destruct function, step one is to manually remove all of those global variables so AddThis thinks this is the first time it's running again:
Code:
var addthis_variables = [ "_atr", "_atrc", "_euc", "_duc", "_atc", "addthis", "_ate", "_adr", "addthis_open", "addthis_close", "addthis_sendto", "addthis_share", "addthis_ssh", "_atw", "addthis_send", "addthis_language", "addthis_localize", "addthis_feed", "addthis_wpl", "addthis_caption_email", "addthis_caption", "addthis_use_addressbook", "addthis_do_ab", "addthis_product", "addthis_popup", "addthis_popup_mode", "addthis_url", "addthis_append_data", "addthis_brand", "addthis_title", "addthis_content", "addthis_email_note", "addthis_email_from", "addthis_email_to", "addthis_use_personalization", "addthis_options_default", "addthis_options_rank", "addthis_options", "addthis_exclude", "addthis_logo", "addthis_logo_background", "addthis_logo_color", "addthis_header_background", "addthis_header_color", "addthis_caption_share", "addthis_caption_feed", "addthis_hide_embed" ];

for ( var i = 0; i < addthis_variables.length; i++ ) {
  if ( eval( "window." + addthis_variables[ i ] + " != undefined" ) ) {
    try {
      eval( "delete window." + addthis_variables[ i ] );
    } catch( e ) {
      window[ addthis_variables[ i ] ] = undefined;
      try {
        delete window[ addthis_variables[ i ] ];
      } catch( e ) {}
    }
  }
}

But wait, there's more! Now the second time the user hovers over the share link, a weird AddThis popup is displayed and somewhere an infinite loop starts up which crashes the browser in about five seconds. Step two is to remove this window before it can even be displayed. The div id is "at20mc", you can remove it however is convenient for you. Since we're using jQuery, we ran
Code:
$('#at20mc').remove();
 
Back
Top Bottom