Support Forum

Share plug-in weird url's when sharing?

JL jlinnation
jlinnation
Member

what the deal with the URL when we click the twitter share button?  Is the below normal?

 

26 Answers

New Answer

MP Mr Papa
Mr Papa
Member

no real clue – not normal and not something anyone else has reported…  that is url encoded, but not sure where its coming from…  that doesnt even look like our share this popup…  are you running share this wp plugin too?

does it work?  which share button? and is it doing it for all posts?

do you see similar here?  try in our non member forums…

JL jlinnation
jlinnation
Member

Mr Papa said
no real clue – not normal and not something anyone else has reported…  that is url encoded, but not sure where its coming from…  that doesnt even look like our share this popup…  are you running share this wp plugin too?

does it work?  which share button? and is it doing it for all posts?

do you see similar here?  try in our non member forums…

It shows up only when I enable the individual share buttons instead of using the Green Share button.

I disabled all the small icons for now and am using the Green Share button.  Seems to work better.

JL jlinnation
jlinnation
Member

Is there a way to make it so that the share button share the actual post? Instead of just the forum thread.

Like when they click on the link, it takes them to the exact post number we clicked the “share this button” on?

MP Mr Papa
Mr Papa
Member

where are you seeing this share button?  We provide multiple template tags for sharing the forum, topic and post…  so if you only want the one in posts, remove the other ones…

JL jlinnation
jlinnation
Member

Mr Papa said
where are you seeing this share button?  We provide multiple template tags for sharing the forum, topic and post…  so if you only want the one in posts, remove the other ones…

on the bottom of the post.  But instead of taking clicks to the shared post, it takes me to the top of the thread.

MP Mr Papa
Mr Papa
Member

I cannot replicate this… I get the post just fine…  did you look at the url in the popup box? does it now have a #pxxxx at the ned?

what kind of sharing are you doing?  that is, which 3rd party site/app?

JL jlinnation
jlinnation
Member

Hi, I am  using twitter.

When I click the share it button, and then click on the twitter button.  It creates a shortlink. 

The short link does have a post number on it ‘#66’.  But it doesn’t work.

 

For example: This is the link for a test post.  Which is the 2nd post in the thread.  It does not take me to the 2nd post. 

non-working link created via share button.

jlinnation.com/forum/lin-on-the-court/does-it-matter-if-jeremy-lin-starts-or-not/#p66#sthash.2e1TcHkS

 

However, if I copy and past the permalink it works just fine.  Seems like the sharing plugin adds a text after the link ‘#sthash’.

 

Working Peremalink

jlinnation.com/forum/lin-on-the-court/does-it-matter-if-jeremy-lin-starts-or-not/#p66#

JL jlinnation
jlinnation
Member

It doesn’t work either on your forum.

 

https://simple-press.com/support-forum/pre-membership-queries/a-few-important-pre-purchase-questions/

Clicking on on the share button on post 4, it takes me to the top of the post on the new window.

 

YS Yellow Swordfish
Yellow Swordfish
Member

I don’t believe I can replicate this on our site here but i am not the knowledgeable one on this plugin so I have asked @mr-papa to check this and respond. It will be later in the day however.

JL jlinnation
jlinnation
Member

Yellow Swordfish said
I don’t believe I can replicate this on our site here but i am not the knowledgeable one on this plugin so I have asked @mr-papa to check this and respond. It will be later in the day however.

Here is a video recording.  Clicking on both links and short codes does the same thing.  It doesn’t take me to the post. Instead. it just takes me to the top of the thread.

 

https://www.youtube.com/watch?v=20TgNAIufPA

MP Mr Papa
Mr Papa
Member

this looks like a recent change to the sharethis api…   they have provided a new argument to their js script to turn of the auto hashing that is corrupting the url…

I will try to get an update out to the plugin in the next few days, but in meantime, if you want, you can make the change yourself…  in sp-share-this-components.php, around line 90, replace:

        $script.= '
            <script type="text/javascript">
                stLight.options({
                    publisher: "'.$publisher.'",
                    shorten: '.$shorten.',
                    minorServices: '.$minor.',
                    onhover: '.$hover.',
                    theme: "'.$options['theme'].'",
                    newOrZero: "zero",
                });
            </script>';

with

        $script.= '
            <script type="text/javascript">
                stLight.options({
                    publisher: "'.$publisher.'",
                    shorten: '.$shorten.',
                    minorServices: '.$minor.',
                    onhover: '.$hover.',
                    theme: "'.$options['theme'].'",
                    newOrZero: "zero",
                    doNotHash: true,
                });
            </script>';

its just adding the doNotHash argument…

JL jlinnation
jlinnation
Member

Thanks!  That fixed it.

 

Any fix for the weird URL when enabling the social icons instead of the green share this? 

I still get that ugly url below when clicking on twitter icon.

YS Yellow Swordfish
Yellow Swordfish
Member

That’s standard URL encoding which allows a url to be copied, pasted etc., without corruption. Again I will pass this on to Mr Papa as I am not sure if this is avoidable but it is probably recommended.

JL jlinnation
jlinnation
Member

Yellow Swordfish said
That’s standard URL encoding which allows a url to be copied, pasted etc., without corruption. Again I will pass this on to Mr Papa as I am not sure if this is avoidable but it is probably recommended.

Yeah its taking up all the space.  Plus it looks like this on twitter.  Which looks like spam to me.

I’ll stick with using the “share it” green button for now.  Works much better now.