Was just reading the other thread about JS errors being thrown with 1.6 and then the patch implemented and just released to 1.7

Updated about an hour ago, and on hover the following error is tossed in firebug (no popup shown)

shareel is null
http://w.sharethis.com/button/sharethis.js
Line 1

Check it out here, on out production site:

http://www.cartermuseum.org/blog/notes-from-underground/photo-of-the-wee...

Looking at the html it looks like the span is being setup right as that was the issue i presume for the 1.7 release.

CommentFileSizeAuthor
#6 jquery.sharethis.js_.patch669 bytesshawngo

Comments

devkinetic’s picture

I should add that a few months ago our sharethis button stopped working randomly, like everyone elses.

cbrody’s picture

Same problem - subscribing

poronga’s picture

same problem - subscribing... eww

joecanti’s picture

Getting the same problem - anybody found a solution?

Mac Clemmens’s picture

Yes, I am having the same problem. Had to just go to sharethis, signup, and put the code in a block for now.

shawngo’s picture

StatusFileSize
new669 bytes

I'm getting what appears to be a one-off error in the sharethis/sharethis/jquery.sharethis.js file (Ver 6.x-1.7).

Line 88:
var wrapper = jQuery('<span></span>').attr('id', 'sharethis_'+i);

This is adding a span with id="sharethis_0" but the sharethis.com js starts by looking for sharethis_1.

I came to this conclusion by adding the sharethis.com js to the FireBug console:

var id=SHARETHIS.curr_id;
var shareel=SHARETHIS.current_element;
alert(id); // results in sharethis_0

if(shareel==null){
  shareel=document.getElementById(SHARETHIS.curr_id);
  // shareel will be result in null because there is no element with id shareel_0
}

The solution I found was to increment i before creating the span in sharethis/sharethis/jquery.sharethis.js (see patch).

I haven't tested this in a list environment where there are multiple ShareThis links on a page, only on an individual basis.

Shawn

shawngo’s picture

Above patch fixes my production site but dev still relies on i variable to start at 1. Still troubleshooting.

shawngo’s picture

Status: Active » Closed (duplicate)