Share This Not Displayed

Dazed
Dazed
@dazed
9 years ago
1,022 posts
I am not sure when this happened but I made some changes to my site and switched it to SSL. This required me to change all of the js calls to https so the browsers would load the content. I am seeing the below from share this and I am not sure what caused this. I also added a new audio player so there could be some jquery collisions.

My publisher id is in the config although it does not match the key in the code below. (odd?)

I am seeing the below in the dev console and this is obviously not loading the sharethis code.

Any suggestions?

Uncaught ReferenceError: stLight is not defined
Uncaught ReferenceError: stButtons is not defined
Please specify a ShareThis Publisher Key
For help, contact support@sharethis.com

<script type="text/javascript">var switchTo5x = true;</script>
<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({ldelim}publisher:"my code her"{rdelim});</script>

updated by @dazed: 09/09/16 02:00:00AM
michael
@michael
9 years ago
7,768 posts
try:
<script type="text/javascript">var switchTo5x = true;</script>
<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({ publisher:"my code here" });</script>
Dazed
Dazed
@dazed
9 years ago
1,022 posts
Thanks Michael. It is kind of weird. If you have a moment take a look at https://www.mixposure.com/dazed/audio/853/instrumental-jam which is in my jrAudio_item_detail.tpl file. If you look at the console errors you see:

Uncaught ReferenceError: stLight is not defined

However that page has no reference to the share this app that I see. If I add the missing code in, the error goes away but no share links are displayed. So I am confused as to why the error is displayed if there is no call to share this. It seems like something else is going on. I looked at the PJ Demo page but it looks like share this is not enabled.

Thoughts?
michael
@michael
9 years ago
7,768 posts
First off, thanks for instructions I can follow to understand the problem. Thanks. :)

The problem as I see it is when I look at the source code for the code that your trying to get output there, I can't find it.

That seams to be the major problem.

I'd switch skins to a default one and see if that code you pasted comes out on that page. If it does then there is an issue with the skin files in that skin.

If it doesn't change anything then the issue is probably with the module or something overriding the module.
michael
@michael
9 years ago
7,768 posts
Or this could be the problem. Log in.

Looking at the code for the share this module it appears on the item_detail page when it is enabled in the "item detail features" section. If that page is blocking that section then the default code would not get out there and you'd need to re-add it back in if your planning on using the buttons.

If you've altered the item_detail.tpl file then make sure you have this line of code in there to bring in the item detail features provided by other modules.
        {* bring in module features *}
        {jrCore_item_detail_features module="jrAudio" item=$item}
Dazed
Dazed
@dazed
9 years ago
1,022 posts
Thanks Michael I will take a look tonight.