Open Graph Plugin Using module title not article title

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
Essentee
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 22 Jun 2016, 02:24

Open Graph Plugin Using module title not article title

Post by Essentee »

Hiya

Have installed Open Graph plugin on a site, but am having issues.

It is displaying the info correctly - sort of.

I have a page that is a single article, but also has a module in the footer that is displaying an article.

The plugin is choosing to use the module-displayed article instead of the main content article.

The source looks like this:

<meta property="og:title" content="PageTitle" />
<meta property="og:type" content="article" />
<meta property="og:url" content="http://sitename.net/this-is-the-page/fullurl" />
<meta property="og:site_name" content="sitename" />

<meta property="og:title" content="articlefromthemodule" />

So, if this page is shared using FB, it picks up the second title tag - which I don't want.

I have installed and enabled the site plugin to put the xmlns attributes in as described. The module and the articles are dated earlier than the article.

I've seen feedback from people who make the same comment but can't find the solution.

Cheers

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

Re: Open Graph Plugin Using module title not article title

Post by Jan »

Hi, I am testing now without any problems, when module and article is set on the site, it takes the info from module.

Try to download newest version 3.0.5, I have released it today (but there are no changes regarding this). Try to install it and let me know if you get the same problem :idea:
https://www.phoca.cz/download/category/6 ... aph-plugin
Thank you, Jan
If you find Phoca extensions useful, please support the project
Essentee
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 22 Jun 2016, 02:24

Re: Open Graph Plugin Using module title not article title

Post by Essentee »

Sorry, I should have clarified - yes, it takes the title from the module, but I want it to use the title from the article as this is the most important content on the page, not the module.

Make sense?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph Plugin Using module title not article title

Post by Jan »

Hi, I understand, the problem is, I am testing it and get no such problem. Which version of Joomla! you exactly use? Which module do you use for displaying the articles (news) in module position?

Did you test it with version 3.0.5?

Jan
If you find Phoca extensions useful, please support the project
Alex W
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 01 Mar 2017, 20:32

Re: Open Graph Plugin Using module title not article title

Post by Alex W »

I am having the same problem. You can see it on my site here: http://wilhelmraceworks.com/

The home page consists of an article, with a "load position" module embedded in it to load the blog post intro.

If you look at the source, you can see it is generating duplicates of og:title, og:description, and og:image. One for the main home page article, and another for the embedded blog intro.

Is there a way to stop it from running on this embedded article, and just generating tags for the main article? So-far the best solution I have found is to simply disable it on the home page and let it run on the rest of the site, but this is of course not ideal either.

I am running Phoca Open Graph v3.0.8 and Joomla v3.6.5.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph Plugin Using module title not article title

Post by Jan »

Hi, there is an option for System plugin (there are two plugins - content and system which can work together)

In system plugin you can specify article where it will be forced to run
In content plugin you have the following three options:


Disable In Menu Items
Disable In Views
Disable In Options

where you can disable running the code.

So the question is, if with these three rules we can stop it or there must be done other rule for module. And the next question is how to identificate module output :idea:

I will take a look at it for the next version.

Jan
If you find Phoca extensions useful, please support the project
Alex W
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 01 Mar 2017, 20:32

Re: Open Graph Plugin Using module title not article title

Post by Alex W »

I played around a little with the disable options, but I'm not exactly sure how they are supposed to work. I can disable it on the entire home page by using the home page menu ID in the "disable in menu" field, but I'm not sure what the others are looking for. What does it mean by "views" and "options".

The embedded module has an ID number of course, but entering that in either of those fields had no effect.

An automatic implementation would be nice, but personally I would be happy with a field similar to the "disable in menu items" field where you can manually specify module numbers that it will not run on.
Alex W
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 01 Mar 2017, 20:32

Re: Open Graph Plugin Using module title not article title

Post by Alex W »

OK, I just went back and re-read what you said about the system plugin vs the content plugin, and I found the solution to my problem.

I installed the system plugin, and enabled it to run only on the main article on the home page.
Then I disabled the content plugin on the home page menu item. Works perfectly now, thanks!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph Plugin Using module title not article title

Post by Jan »

Hi, great to hear it.

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