Page 4 of 4

Re: PhocaGallery vs Sourcerer error

Posted: 08 Aug 2013, 13:06
by purtov
I have the same problem
Fatal error: Call to a member function get() on a non-object in S:\home\localhost\www\tl32\plugins\system\sourcerer\helper.php on line 68

I am new in php and Joomla, so excuse my stupid question:
Could that be due to the use of function with the same name in phoca and sourcerer:

phocagallery.php:
public function onContentPrepare($context, &$article, &$params, $page = 0)

helper.php:
function onContentPrepare(&$article, $params = '')

Re: PhocaGallery vs Sourcerer error

Posted: 08 Aug 2013, 17:48
by purtov
Perhaps I found solution

In sourcerer helper.php code

if ($params && $params->get('nn_search')) {
$this->src_params->debug_php_article = 0;
}

estimates term $params->get('nn_search') even if $params==null

So I replaced code above on
if(!is_null($param)) {
if (!is_null($param->get('nn_search'))) {
$this->src_params->debug_php_article = 0;
}
}

and it works.