Page 1 of 1

[my SOLVED or Improvement] Error Phoca Gallery Plug

Posted: 17 Nov 2010, 08:34
by dr.archik
The error arises in the module of news (inmod_news_pro_gk4), at processing com_content containing an insert (categories) Phoca Gallery Plug
Fatal error: Call to a member function get() on a non-object in X:\home\lulu\www\plugins\content\phocagallery.php on line 798

SOLVED:
file www\plugins\content\phocagallery.php

on line 797 and 812 this

Code: Select all

class="category'.$params->get( 'pageclass_sfx' ).'">
replace to

Code: Select all

class="category'.$pageclass.'">
on line 785 under //Output insert code

Code: Select all

$plg = JPluginHelper::getPlugin('content','phocagallery');
   $params = new JParameter($plg->params);
   $pageclass= $params->get('pageclass_sfx');

Re: [my SOLVED or Improvement] Error Phoca Gallery Plug

Posted: 22 Nov 2010, 19:37
by Jan
Hi,

thank you for the improvement,

1) it is a little bit fun to call plugin parameters as "external" inside the plugin code but seems this is only one solution if the plugin then is run in other than content area :-(

2) maybe the

Code: Select all

$plg = JPluginHelper::getPlugin('content','phocagallery');
   $params = new JParameter($plg->params);
   $pageclass= $params->get('pageclass_sfx');
should be placed before the foreach (to not load it everytime the foreach item is loaded)

Anyway thank you for the solution.

Jan