?
Referenced as Pull Request for: # 6235
avatar thekrotek
thekrotek
28 Feb 2015

Steps to reproduce the issue

Just use recaptcha plugin with version 2.0 and error reporting on maximum. Or try to submit rcaptcha using AJAX.

Expected result

Successfully submitted form.

Actual result

I submit form using AJAX and due to this error I akways get the same response:

Notice: Undefined variable: challenge in /mysite/plugins/captcha/recaptcha/recaptcha.php on line 158

This message will also pop, when error reporting is set to maximum.

System information (as much as possible)

Joomla 3.4, custom form.

Additional comments

Fix is very simple: $challenge variable should be defined any possible way. For example, you may add this line for version 2.0:

$challenge = $input->get('g-recaptcha-response', '', 'string');

avatar thekrotek thekrotek - open - 28 Feb 2015
avatar brianteeman
brianteeman - comment - 28 Feb 2015

As you have identified an issue and a solution please can you submit a Pull Request so that it can be tested and merged.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6227.
avatar thekrotek
thekrotek - comment - 28 Feb 2015

You mean Github? Honestly, I never did a single pull request in my life and not sure, how to properly do this...


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6227.
avatar brianteeman
brianteeman - comment - 28 Feb 2015

It is very simple especially for a single file change
https://docs.joomla.org/Filing_bugs_and_issues#Issue_a_pull_request_directly_on_Joomla.21.27s_GitHub_repository

As a developer you really should find it very easy indeed


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6227.
avatar Bakual
Bakual - comment - 28 Feb 2015

Simplest way (I think) is explained here: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

avatar brianteeman brianteeman - change - 28 Feb 2015
Labels Added: ?
avatar PhilETaylor
PhilETaylor - comment - 28 Feb 2015

Confused, as the proposed line is already in the Joomla source code:

https://github.com/joomla/joomla-cms/blob/staging/plugins/captcha/recaptcha/recaptcha.php#L129

avatar PhilETaylor
PhilETaylor - comment - 28 Feb 2015

Ah I get it now... PR #6235 ready for testing

avatar brianteeman brianteeman - change - 1 Mar 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-03-01 10:49:05
Closed_By brianteeman
avatar brianteeman brianteeman - close - 1 Mar 2015
avatar brianteeman brianteeman - close - 1 Mar 2015
avatar thekrotek
thekrotek - comment - 1 Mar 2015

Thank you! Will try to create PR next time :-)

Add a Comment

Login with GitHub to post a comment