Page 1 of 1

Open Graph plugin uses wrong url

Posted: 28 Nov 2017, 11:06
by bekh6ex
I've noticed an issue with og:url. (At least I think it is an issue)

As you know, in Joomla, if you have an article with ID=2, you can open it with url "/article/2-some-alias" or "/something/else/2-what-ever". Both URLs lead to the same content.
Currenlty, Open Graph Plugin will put two different URLs in "og:url" in this case, but semantically, I believe, "og:ulr" should be the same in both cases as soon as the content is the same.
This becomes a problem if you, for example, add Facebook comment widget tho the page. Widget will treat these articles as different (this is what I got from documentation, didn't check yet), and there will be two different comment lists.

If you think that current behavior is correct, I would suggest to at least add a plugin setting. That would work for me.

Anyway, thanks for the plugin - it does it's job! :)

Re: Open Graph plugin uses wrong url

Posted: 30 Nov 2017, 20:31
by Jan
Hi, the url is taken from current page:

Code: Select all

$uri 	= JFactory::getURI();
$this->renderTag('og:url', $uri->toString(), $type);
So the plugin does not create any specific URL it just get the one where the article is located :idea: