I'm not sure if I should ask this here, being that it's someone else's (free) code, but here goes in case I can. (j3.8.8)

The following code is part of a plugin which displays joomla vote data in article pages. Unfortunately, running under php7.1.18 vote data (belonging to other articles) has started appearing also in category pages, where the article ID with vote data, matches the category ID number.

Any help to stop this appearing in category pages would be appreciated, thank you

function plgContentRichSnippetsVote(&$subject, $params) {

parent::__construct($subject, $params);

$mode = $this->params->def('mode', 1);
function rsvcode( $article, $params ){
global $mainframe;
$lang = JFactory::getLanguage();
$lang->load('plg_content_richsnippetsvote', JPATH_ADMINISTRATOR);

    $db = JFactory::getDBO();
        $query='SELECT * FROM #__content_rating WHERE content_id='. $article->id;
    catch (RuntimeException $e)
  • Are you sure you have the latest version of the plugin? global $mainframe; was from Joomla 1.5 if I rightly remember – Lodder Jun 25 '18 at 10:20
  • Question answered on Joomla! forum forum.joomla.org/viewtopic.php?f=715&t=963061#p3529637. – Sharky Jun 27 '18 at 12:05
  • Thank you for the help. Sharky helped me on another forum after I had posted this message. – John R Jun 28 '18 at 23:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.