Create two captcha fields in the same page through a form with type="captcha" (I use different "namespace" for each field)
Two captcha in the same page.
Error: reCAPTCHA plugin needs a site key to be set in its parameters. Please contact a site administrator.
Joomla 3.4.1
The fist time the captcha plugin is loaded, the _load function in the captcha library convert the plugin params from string to a Registry object, this is correct, but the second time the plugin is loaded, the library put the already converted params inside a new Registry object and the plugin params can't be used anymore.
File: libraries/cms/captcha/captcha.php
Line: 233
This issue can be fixed by checking if the plugin params is already a JRegistry object.
if (!($plugin->params instanceof JRegistry))
{
$params = new Registry($plugin->params);
$plugin->params = $params;
}
Please note. With the current version of Recaptcha (reCAPTCHA API version 2.0), you can have multiple recaptchas on one page, and this is the first step to achieve this feature.
Labels |
Removed:
?
|
Labels |
Added:
?
|
Good morning. I'm afraid I didn't write this plugin :( The plugin was written by @nonumber. It eventually became out of sync with the Joomla! development branch because it took too long to be merged. Since Peter had no time to make the code mergeable, the deadline for the release was looming and I had half a day to spare I stepped in and made the barely minimum changes to make the reCAPTCHA plugin mergeable into the staging branch. I have no idea how the plugin really works.
ah - my memory failed me @nikosdion
@nonumber any thoughts on this issue?
@mepsteinj Since you already have a code proposed, do you want to create a PR so your suggestion can be tested?
See https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests for how to do it using the GitHub UI.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-19 19:50:43 |
Closed_By | ⇒ | zero-24 | |
Build | master | ⇒ | staging |
@nikosdion any thoughts on this
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6674.