Active
Project:
Image CAPTCHA Refresh
Version:
7.x-1.5
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
21 Dec 2012 at 21:48 UTC
Updated:
30 Jul 2016 at 19:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nagdebangshu commentedIts not working if its present in a lightbox/facebox etc. The following error message is showing
{"status":1, "message":"", "data":{"url":"\u002Ffolder_name\u002Fimage_captcha\u002F1858?sid=1858\u0026ts=1356339745", "token":"c3731989553deef13d50cd8d3d5ea62f", "sid":"1858"}}
Comment #2
ddrozdik commentedHi,
Thanks for your issue.
This problem was described earlier in the issue http://drupal.org/node/1795280 , on that moment module wasn't published. I will try investigate this problem and fix it, if it's possible.
Thanks,
Dima.
Comment #3
nagdebangshu commentedHey DmitryDrozdik
I could solve the problem by changing the code little bit. I am giving the code below.
Code for image image_captcha_refresh.js
jQuery(document).ready(function(){
jQuery(".reload-captcha-wrapper").html("Generate a new captcha");
jQuery('#reload_id').live('click',function(){
jQuery.ajax({
type:'POST',
async:true,
url:Drupal.settings.basePath+'captcha/refresh',
success:function(response){
jQuery('.captcha').find('img').attr('src', response.data.url);
jQuery('input[name=captcha_sid]').val(response.data.sid);
jQuery('input[name=captcha_token]').val(response.data.token);
}
});
});
});
Add the following at image_captcha_refresh.module:
function image_captcha_refresh_init()
{
drupal_add_js(drupal_get_path('module','image_captcha_refresh').'/image_captcha_refresh.js');
}
Thanks :)
Comment #4
ddrozdik commentedHi all!
Method described in comment #3 is wrong, don't use it.
I have tried to find your problem with module Modal forms and I didn't find any problems. I used 7.x-1.2 version of module and it works well for me.
This result "{"status":1, "message":"", "data":{"url":"\u002Ffolder_name\u002Fimage_captcha\u002F1858?sid=1858\u0026ts=1356339745", "token":"c3731989553deef13d50cd8d3d5ea62f", "sid":"1858"}}" your can see only if file image_captcha_refresh.js wasn't added to page. Please check this.
Please give me more information about your problems, maybe you use another modules which breaks something.
Thanks,
Dmitry.
Comment #5
warmth commentedAttaching active modules list
Comment #6
warmth commentedAs mentioned in my last edited post.
Note: the same bug appears when using LoginToboggan to show registration form and login form on the same page. The second "tab" never shows the reCAPTCHA.
Comment #7
ddrozdik commentedCan you check your console via firebug for firefox of via console in google chrome, maybe it has error messages? I can expect only that exist error in javascript.
I see in your list of modules "JQuery Update", which version of jQuery enabled with this module? Can you check how to works without "JQuery Update"(just disable it)?
Comment #8
ddrozdik commentedComment #9
martin mayer commentedI got the same problem on the /user/register page. I am using Image Captcha refresh 7.x-1.6 with CAPTCHA 7.x-1.3. I am not using Modal Form or jQuery update.
When the refresh link is clicked an otherwise empty page appears with the message:
{"status":1,"message":"","data":{"url":"\/image_captcha\/384482?sid=384482\u0026ts=1459163549","token":"7bd69219af5ea02f3e251751418e2de1","sid":"384482"}}
It seems a JSON message is displayed instead of the registration page with a new Image Captcha. Is there anything I can do to help you reproduce that bug?
Comment #10
martin mayer commentedComment #11
ddrozdik commentedHi Martin,
Are you sure that you do not have js errors? Did you check your browser console?