PhocaOpenGraph Content Plugin sets wrong og:title etc. when used with latest articles module
Posted: 10 Jun 2020, 15:46
Hi!
I've noticed the problem that PhocaOpenGraph shows wrong og:description, og:title, etc. when the latest articles module is used on the same page as content. See the screenshot below:
https://i.imgur.com/r6oTwV5.png
This happens because PhocaOpenGraph Content Plugin takes the information from the module articles, not from the main article.
As the temporary solution, I have modified the file plugins\content\phocaopengraph\phocaopengraph.php file and added:
if you have a better solution, please let me know.
I've noticed the problem that PhocaOpenGraph shows wrong og:description, og:title, etc. when the latest articles module is used on the same page as content. See the screenshot below:
https://i.imgur.com/r6oTwV5.png
This happens because PhocaOpenGraph Content Plugin takes the information from the module articles, not from the main article.
As the temporary solution, I have modified the file plugins\content\phocaopengraph\phocaopengraph.php file and added:
Code: Select all
public function onContentAfterDisplay($context, &$row, &$params, $page=0) {
//add this
if ($params->get('article_layout', null) == null)
return;
$app = JFactory::getApplication();