Testing 3.5.0 beta,
in 3.4.8 we can get params via
public function onContentBeforeDisplay($context, $article, $params ){
$show_vote = $params->get('show_vote');
print_r($show_vote);
}
in 3.5.0 beta I get
Fatal error: Call to a member function get()....
@ggppdk Thnx for the reply
it is core , and joomla article category or item view, any content plugin that is requesting params in
onContentBeforeDisplay
is failing ,
params are there ,
http://prntscr.com/9tkg41
the thing is that
$params->get
does not function on 3.5 as in prev version, looks like the params are empty before the plugin is requesting them.
I have 3 content plugins and they all have same issue.
I can "fix " my plugins by doing
if ( empty($params) ){
return;
}
in my functions but thing is that this worked without any issues before.
In current staging the events are triggered twice:
https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/view/category.php#L161-L168
the empty parameters are coming from the 1st triggering, which should be easy to fix by replacing ->core_params with ->params
about double event triggering i don't know
Thnx for the info , I will keep an eye on that thread.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-23 13:10:22 |
Closed_By | ⇒ | danyj |
Labels |
Added:
?
|
This is not controlled by the CMS itself
Thus unless it is a CORE component that is passing empty params, this is not a CMS bug of J3.5.0 beta
For start more specific information is needed. You need to find the component or extension that is passing empty parameters and the exact place that this is happening. Edit your plugin method onContentBeforeDisplay, and add to it: