?
avatar corejoomla
corejoomla
23 Dec 2018

Steps to reproduce the issue

In any component form page, load the editor using below code
<?php echo $form->getInput('description'); ?>

and load recaptcha plugin with below code

JPluginHelper::importPlugin('captcha');
$app->triggerEvent('onInit', array(null, 'ca_captcha'));
$recaptcha = $app->triggerEvent('onDisplay', array(null, 'ca_captcha', 'class=""'));
echo (isset($recaptcha[0])) ? $recaptcha[0] : '';

Expected result

Both editor and recaptcha loaded

Actual result

throws error and it shows below error in stacktrace
Too few arguments to function PlgEditorTinymce::onDisplay(), 3 passed in D:\xampp\htdocs\j4\libraries\src\Plugin\CMSPlugin.php on line 287 and at least 6 expected

System information (as much as possible)

Joomla 4, XAMPP, PHP 7.2

Additional comments

Both captcha and editor plugins are using same onInit and onDisplay functions which may be the reason for the issue.

avatar corejoomla corejoomla - open - 23 Dec 2018
avatar joomla-cms-bot joomla-cms-bot - change - 23 Dec 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Dec 2018
avatar corejoomla corejoomla - change - 23 Dec 2018
The description was changed
avatar corejoomla corejoomla - edited - 23 Dec 2018
avatar Quy Quy - change - 28 Dec 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-12-28 11:57:37
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 28 Dec 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-12-28 11:57:37
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 28 Dec 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 28 Dec 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23322

avatar Quy
Quy - comment - 28 Dec 2018

See PR #23331


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23322.

Add a Comment

Login with GitHub to post a comment