Sharethis plugin does not work with https: //

I changed the domain of my domain from http:// to https:// , and I added the sharethis plugin on my site.

It worked great with http:// , but now there are no buttons to share this display when I try to access my site using https:// .

Below is the URL of my site:

https://www.placementbooster.ch/

I changed http://w.sharethis.com/button/buttons.js to https://ws.sharethis.com/button/buttons.js and http://s.sharethis.com/loader.js to https://s.sharethis.com/loader.js .

But still it shows an error:

ReferenceError: sharethis not defined

+5
source share
3 answers

Adapted from the documents:

https://support.sharethis.com/hc/en-us/articles/217916188-Moving-from-HTTP-to-HTTPS-SSL-Support

Normal ShareThis Script

 <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript" src="http://s.sharethis.com/loader.js"></script> <script type="text/javascript"> stLight.options({ publisher:'12345', }); </script> 

Secure ShareThis Script

 <script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script> <script type="text/javascript" src="https://ss.sharethis.com/loader.js"></script> <script type="text/javascript"> stLight.options({ publisher:'12345', }); </script> 

I use this ant code, it loads correctly without any mixed content issues

+8
source

I get "stLight" is undefined and found a message about switching to HTTPS. Basically, he talks about changing " http: // w " to " https: // ws " and then solved this problem. The message has a link with https: // ss "in it. Perhaps you need to change" https: // s "to" https: // ss "?

+5
source

When it comes to switching from HTTP to HTTP, you will need to implement our HTS-compatible JS file.

You currently have:

 src="http://w.sharethis.com/button/buttons.js" 

For HTTP users, you need to use the following:

 src="https://ws.sharethis.com/button/buttons.js" 

For more information about the support article, see https://www.sharethis.com/support/legacy/moving-from-http-to-https-ssl-support/

-1
source

Source: https://habr.com/ru/post/1206775/


All Articles