Bug in Opengraph Plugin

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Jun 25, 2013 1:25 pm
Reply with quote
Report this post
I was trying to use the plug-in DJ-Mediatools to handle a video library on my site and no matter what I did the display of the gallery was mangled. Even if I set a Joomla Default Template for that page. I submitted the issue to the author and he was able to locate the problem. I have disabled the plugin per his suggestion and it does indeed solve the problem.

This is a bug in 'System - GK Open Graph Article Parameters' plugin. It can't add custom tags for raw document.

Fatal error: Call to undefined method JDocumentRaw::addCustomTag() in /opt/bitnami/apps/joomla/htdocs/plugins/system/plg_gk_opengraph/plg_gk_opengraph.php on line 62


1) Is it possible to get the plugin corrected?

2) What functionality have I lost by disabling it?
User avatar
Fresh Boarder

GK User
Sat Jun 29, 2013 6:47 am
Reply with quote
Report this post
Please change the following code in the plg_gk_opengraph.php file:

Code: Select all
$doc->addCustomTag('<meta property="og:title" content="'.$this->_params->get('og:title').'" />');
   $doc->addCustomTag('<meta property="og:type" content="'.$this->_params->get('og:type').'" />');
   $doc->addCustomTag('<meta property="og:image" content="'.$uri->root().$this->_params->get('og:image').'" />');
   $doc->addCustomTag('<meta property="og:site_name" content="'.$this->_params->get('og:site_name').'" />');
   $doc->addCustomTag('<meta property="og:description" content="'.$this->_params->get('og:description').'" />');


to:

Code: Select all
if(method_exists($doc, 'addCustomTag')) {
   $doc->addCustomTag('<meta property="og:title" content="'.$this->_params->get('og:title').'" />');
   $doc->addCustomTag('<meta property="og:type" content="'.$this->_params->get('og:type').'" />');
   $doc->addCustomTag('<meta property="og:image" content="'.$uri->root().$this->_params->get('og:image').'" />');
   $doc->addCustomTag('<meta property="og:site_name" content="'.$this->_params->get('og:site_name').'" />');
   $doc->addCustomTag('<meta property="og:description" content="'.$this->_params->get('og:description').'" />');
}


it should solve your problems.
User avatar
Administrator


cron