Two issues with Open Graph plugin

Phoca modules - support for all Phoca modules except Phoca Gallery modules
oorzaak
Phoca Member
Phoca Member
Posts: 47
Joined: 11 Dec 2008, 00:37

Two issues with Open Graph plugin

Post by oorzaak »

Hi,

I ran into two issues with the Phoca Open Graph plugin. The first one seems similar to this forum topic:

viewtopic.php?f=33&t=17403

On my page I have an article (a plain single article from com_content component) and a Joomla core news module which shows the intro of one other article. The plugin creates og meta tags for both articles and by doing so, creates duplicate tags. For instance I have two 'og:title' tags, two 'og:description' tags etcetera. Would there be a way to use only the content of the "main" article and not of the article in the module?


The second issue may be due to Facebook but I'll mention it anyway. For testing og functionality I always use the Facebook Object debugger, because it cleans up the Facebook caching:

https://developers.facebook.com/tools/debug/og/object

When testing with the same site, I get this error: The 'og:title' is missing. Yet in the page source code I see that this tag is present and it's syntax is correct. For example:

Code: Select all

<meta property="og:title" content="Producten">

I hope that you can help me,

Kind regards, Frits


Edit: The second issue was tested with the news module disabled, so the first issue was not present while testing for the second one.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two issues with Open Graph plugin

Post by Jan »

Hi,

1) I will take a look at it, I think adding parameter which will allow only one instance of the adding tags

2) if the tag is there in source code and someone says it is not, then I think you need to ask him (in this case facebook developers) why they don't see it :idea:
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two issues with Open Graph plugin

Post by Jan »

Hi, 1) can I see the site where this occurs, the plugin has numbering and it only can run once, when there is a second calling, it will not run the plugin:

Code: Select all

if ((int)$this->pluginNr > 0) { return; } 
:idea:

Jan
If you find Phoca extensions useful, please support the project
oorzaak
Phoca Member
Phoca Member
Posts: 47
Joined: 11 Dec 2008, 00:37

Re: Two issues with Open Graph plugin

Post by oorzaak »

Hi Jan,

I'm sorry that it took so long to answer you.

I stopped using the Phoca OG plugin on this website because I also ran into a conflict with an other plugin. The conflicting plugin is of the system type and by using a different OG plugin that is also of the system type I was able to change the order, which solved the conflict. With Phoca OG plugin being a content plugin I was not able to manipulate the order of the plugins.

1) Because of this I cannot show you the issue on a live site anymore. If in a future project I would run into this issue again, I will show you.

2) I found out that the other issue was caused by the gzip page compression (System > Global configuration > Server > Gzip Page Compression). Disabling this option solved the issue. Which is not a real solution in my opinion but it seems to be the only way to make sure that Facebook can 'scrape' the page successfully.


Kind regards, Frits
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two issues with Open Graph plugin

Post by Jan »

Hi
to solve all these problems follow these steps:

1) Disable different OG plugin (system)

2) Install Phoca Open Graph Content Plugin version 3.0.6 ( https://www.phoca.cz/phoca-open-graph-plugin )
3) Install Phoca Open Graph System Plugin version 3.0.0 ( https://www.phoca.cz/phoca-open-graph-system-plugin ) It will be not in conflict with the content plugin - it is addon for cotent plugin to display OG on other than com_content pages

4) GZIP - yes, for example Facebook and LinkedIn do have problems reading OG when the page is rendered with help of GZIP. The solution is very easy - install this plugin: http://extensions.joomla.org/extension/facebookfix which will prevent from "gzipping" the site when e.g. Facebook or LinkedIn reads your site.

Just test it with e.g. Facebook debugger, after making all the steps ( 1) - 4) ) Facebook is able to read the OG correctly and displays the OG data in right format.

Jan
If you find Phoca extensions useful, please support the project
oorzaak
Phoca Member
Phoca Member
Posts: 47
Joined: 11 Dec 2008, 00:37

Re: Two issues with Open Graph plugin

Post by oorzaak »

Hi Jan,

I only tested nr. 4) so far, this solution is excellent! Thanks for your advice.


Frits
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two issues with Open Graph plugin

Post by Jan »

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