User tests: Successful: Unsuccessful:
Pull Request for Issue #17129
This PR adds a fourth argument to the dispatcher for the onContentBeforeDisplay
and onContentAfterDisplay
events. Without this argument the following error might occur if there is no fallback for this argument:
Too few arguments to function PlgContentVote::onContentBeforeDisplay(), 3 passed in /usr/local/apache2/htdocs/libraries/joomla/event/event.php on line 70 and exactly 4 expected
onContentBeforeDisplay
plugin event without a fallback variable for the $page
parameter. Like this:public function onContentBeforeDisplay($context, &$row, &$params, $page) {
}
You can also temporary remove the = 0
after the $page
for a existing plugin. For example the vote plugin on this line: https://github.com/joomla/joomla-cms/blob/staging/plugins/content/vote/vote.php#L62
2. Set the error reporting to maximum
3. Go to the media manager and notice the following error:
Too few arguments to function PlgContentVote::onContentBeforeDisplay(), 3 passed in /usr/local/apache2/htdocs/libraries/joomla/event/event.php on line 70 and exactly 4 expected
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_media Templates (admin) Front End Templates (site) |
Status | Pending | ⇒ | Needs Review |
Seriously, this is rather simple...
Status | Needs Review | ⇒ | Discussion |
I have tested this item
Code review since the repo is no longer available.
another task for @HLeithner
i was able to reproduce the error hacking the vote plugin as for test info
after apply pr the error is solved
I have tested this item
Status | Discussion | ⇒ | Ready to Commit |
Labels |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-05-12 06:59:20 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
Removed: J3 Issue |
Thx
Status is set on "Needs Review".