User tests: Successful: Unsuccessful:
When loaded both captcha and editor plugins on same page, onDisplay function on both plugins conflict with each other as they have different number of parameters.
Pull Request for Issue #23322 .
Added a new proxy function for b/w compatibility and renamed the onDisplay function to onDisplayCaptcha
On any form page where the editor loaded, add 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] : '';
Captcha loaded fine and editor works fine.
Need to update the documentation with the renamed onDisplayCaptcha function name.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Labels |
Added:
?
|
@corejoomla every PR needs minimum2 successfully Tests by other Volunteers..
The captcha and the editor plugins are a bit special, they do not use onInit
/onDisplay
as event, but as "callback".
Look for example Captcha::display, and similar thing is for the editor.
And how it used in the captcha field
And there a reasons for it.
So the fix are not correct.
Here actually nothing to fix, you just need to use Editor/Captcha correctly.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-03-20 17:45:28 |
Closed_By | ⇒ | corejoomla |
Can this PR merged or have any issues?