Closed (works as designed)
Project:
reCAPTCHA
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2012 at 16:31 UTC
Updated:
15 Mar 2013 at 14:29 UTC
I have an item in a form that is ajax enabled and the ajax callback returns the whole form. When for form is re-drawn on the page, the HTML wrapper for ReCaptcha is there but the JavaScript call to place the elements in the wrapper are not. If I refresh the page, the element reappears. I'm not sure how image_captcha_refresh does this differently, but that one works fine in the place of ReCaptcha.
Comments
Comment #1
liam morlandAre you using the Ajax API setting in the reCAPTCHA configuration?
This might be a duplicate of one of these:
#1349850: drupal_get_form() doesn't render recaptcha
#1119086: reCaptcha form not display in Colorbox iframe
Comment #2
epiphanydigital commentedI get the same results whether the Ajax box is checked or not. I have not tried the development version of the module.
This is probably the same issue as drupal_get_form() as along with drupal_render($form) since the HTML will continue to be generated but the JavaScript isn't called a second time to repopulate the wrapper.
Comment #3
liam morlandYou could try the development version. It may be that you need to manually trigger the JS.
Comment #4
liam morlandTry the development version. If you are still having problems, please reopen and provide details.
Comment #5
mortona2k commentedI'm having the same problem with both 7.x-1.x-dev (2/12/13) and 7.x-1.9, both with and without using reCaptcha's ajax api.
My ajax is a hierarchical select on a profile2 form, using profile2_regpath. The select list only returns a second select list is returned, instead of the whole form like epiphanydigital does.
With the ajax api setting on, the captcha disappears, and with it off, it throws the reuse attack error.
With it on, here is the error in my console:
Uncaught TypeError: Cannot call method 'call' of undefined
Comment #6
liam morlandIs this helped at all by #918856: CAPTCHA Session Reuse message on webforms ?
Comment #7
liam morlandComment #8
liam morlandTry the latest development version of both reCAPTCHA and CAPTCHA, and the patch in #918856: CAPTCHA Session Reuse message on webforms . If you are still having problems, please reopen and provide details.