Opengraph plugin showing the wrong og:title and og:description

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
User avatar
formfranska
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 20 Nov 2018, 00:25

Opengraph plugin showing the wrong og:title and og:description

Post by formfranska »

I've just downloaded and installed the Phoca Open Graph Plugin and the Phoca Site Plugin. The problem I have is that the wrong og:title and og:description is fetched by Facebook.
I'm using YOOtheme PRO template and Joomla 3.9.
(I'm aware that these are free plugins and if I should pay for support just let me know how and I will 😊)

Here is one example page (but this happens on every page)
https://www.formfranska.com/tjaenster/d ... isk-design

Here is the part of the page code where the og:title and og:description occur:
----------------
<meta property="og:title" content="Grafisk design" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://www.formfranska.com/images/desi ... ksaker.jpg" />
<meta property="og:url" content="https://www.formfranska.com/tjaenster/d ... isk-design" />
<meta property="og:site_name" content="formfranska.com" />
<meta property="og:description" content="Grafisk design, översikt" />

<meta property="og:title" content="Irnell psykologmottagning &amp; konsult" />
<meta property="og:image" content="https://www.formfranska.com/images/test ... _0.75x.png" />
<meta property="og:description" content="Så här tycker Sofia Irnell om samarbetet med formfranska." />
----------------
As you can see there are 2 og:titles and og:descriptions. The first one is the correct one from the article. The second one is from a module (newsflash) at the bottom of the page.

So Facebook is fetching the second one from the module and not the first one from the article.

Would you please know what is wrong and how I can fix this, please?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Opengraph plugin showing the wrong og:title and og:description

Post by Jan »

Hi, you need to prevent from running more parts on your site which create the open graph meta tags. So if you e.g. run the system and content plugin together, you need to define where to not run the system plugin.

Jan
If you find Phoca extensions useful, please support the project
User avatar
formfranska
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 20 Nov 2018, 00:25

Re: Opengraph plugin showing the wrong og:title and og:description

Post by formfranska »

Hi Jan, thank you so much for this info. I was suspecting this so I tried to look at the docs and the settings but I wasn't able to understand how to do it.
From your reply I understand I should install Phoca Open Graph System Plugin as well then, correct?
So is it possible to prevent all Newsflash from from getting og-tagged then? Would you be able to explain the setting for this, please?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Opengraph plugin showing the wrong og:title and og:description

Post by Jan »

Hi, I think, when you run the module on every page, you need to skip using the system plugin and use only content plugin - or reverse way - use system plugin for whole site. The problem is, content plugin works only in content component and system plugin works for whole site. So you can skip running the system plugin on content pages - this solves the conflict between content and system plugin - between articles and other parts of the website - but unfortunately, module does not identify itself, it runs on whole page where e.g. the content is set or other part than content:

so if there is article and module - the site identifies as article (content plugin should run)
if there is e.g. gallery and module - the site indentifies as gallery (only system plugin should run)

but thanks to this module it can be in conflict. :-( :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
formfranska
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 20 Nov 2018, 00:25

Re: Opengraph plugin showing the wrong og:title and og:description

Post by formfranska »

Hi Jan,

I'm so sorry, I've read your reply multiple times now but I'm unable to understand how to solve my problem...
I only have Phoca Open Graph Plugin and the Phoca Site Plugin installed so far.

There is no problem on my gallery page. The problem with double og:titles and og:descriptions occour on pages with an article + the module (newsflash) which is almost every page on the site. I use this module at the bottom of every page to display client testimonials randomly.

When you say
but thanks to this module it can be in conflict.
Do you mean that my issue is impossible to solve? That Phoca Open Graph Plugin and the Phoca Site Plugin won't work on sites that have a newsflash module published? I'm quite confused so please bear with me if I've misunderstood 🤔😊
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Opengraph plugin showing the wrong og:title and og:description

Post by Jan »

Hi, first of all, I need to know which plugin do you run?

"Phoca Open Graph Plugin" ... could be Phoca Open Graph content plugin but even Phoca Open Graph system plugin ... Both are indepent to Phoca Site Plugin..

System plugin can influence whole site
Content plugin only the site where the article is displayed.

Jan
If you find Phoca extensions useful, please support the project
User avatar
formfranska
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 20 Nov 2018, 00:25

Re: Opengraph plugin showing the wrong og:title and og:description

Post by formfranska »

Thank you Jan,
These are the 2 plugins I have installed:
plg_content_phocaopengraph_v3.1.2
plg_system_phocasite_v3.0.2

In plg_content_phocaopengraph_v3.1.2, under Common Options tab, there are 2 settings that I can't figure out (I'm not a dev 😉 so I have no idea what they mean)
They are:
Disable in views
Disable in options
Could any of the above settings be used to exclude og:tags from newsflash?

/Anna
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Opengraph plugin showing the wrong og:title and og:description

Post by Jan »

Hi, no, newsflash is a module, it is displayed in some view.

So, mostly if you run the system plugin for whole site and content for content (articles) only, you need to disable such views in system plugin:

views: article,featured,category,categories
option: com_content

Jan
If you find Phoca extensions useful, please support the project
User avatar
formfranska
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 20 Nov 2018, 00:25

Re: Opengraph plugin showing the wrong og:title and og:description

Post by formfranska »

Hi Jan,

I give up. I can't make it work. Thank you for trying to help.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Opengraph plugin showing the wrong og:title and og:description

Post by Jan »

Ok :-(
If you find Phoca extensions useful, please support the project
Post Reply