Hi,

While loading any page on my website I get an error while the page is trying to retrieve
GET http://w.sharethis.com/share4x/js/local/en/message.js

I checked directly in the browser the above path and it's not available.
I also checked in the module folder of sharethis on my drupal, and there is no message.js script there...

Am I doing something wrong?

Many thanks for looking into this

Comments

pureh2o created an issue. See original summary.

gcalex5’s picture

Version: 7.x-2.13 » 7.x-2.x-dev

I was getting the same error as you, and it looks like my issue was that the 'button.js' isn't being loaded at the right time in the header. So, weighting it to be towards the end of my list seems to of resolved this for me.

TL;DR: Added this to hook_preprocess_html() and the issue is gone

  drupal_add_js('https://ws.sharethis.com/button/buttons.js', [
    'type' => 'file',
    'scope' => 'header',
    'weight' => 5,
  ]);
pureh2o’s picture

Thank you gcalex5,

I applied the following change in the sharethis.module at line 439 and it solved the error:
// drupal_add_js($external, 'external');
drupal_add_js($external,
array(
'type' => 'file',
'scope' => 'header',
'weight' => 5,
));

Could this be added as a fix of the module?