We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Incorrect Title and Description when social sharing is used in Sidebar - Social media sharing | Forum

Julien
Julien Aug 27 '16
Hi,

I noticed then when social sharing is also used in the side-bar, everytime when I use the share-button, it never loads the correct title and description. I found out that the title and description tags are always later in the HTML, thus gets overridden with the default site title and site description. I've implemented a short-workaround that relies on the normal HTML meta tags, which seems to work when sharing. This is as followed:

In \social_sharing\components\share_buttons.php

Update lines 209-219 to:

            if ( !empty( $this->description ) )
            {
                #$script .= " description: ". json_encode($this->description) .",";
                #OW::getDocument()->addMetaInfo('og:description', $this->description, 'property');
            }

            if ( !empty( $this->title ) )
            {
                #$script .= " title: ". json_encode($this->title) .",";
                #OW::getDocument()->addMetaInfo('og:title', $this->title, 'property');
            }


So actually removing the og: meta tags en script tags. The problem with these, is that they are added twice in the script, causing the last one, being the side-bar with no info at all.
The Forum post is edited by Julien Aug 27 '16
Oxwall Software
Oxwall Software Sep 1 '16
What is your software version Julien?
Julien
Julien Sep 1 '16
I am completely up to date: Platform versie 1.8.4 (build 10800)
Oxwall Software
Oxwall Software Sep 6 '16
This is a bug, we have already reported it to our devs. It will be fixed asap.
Julien
Julien Sep 7 '16
Ok thanks! Thought so it was a bug, so that is why I reported it.
You do not have permission to reply this topic