Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Having Modal forms & Image CAPTCHA Refresh installed can cause problems if you set the contact form to open in a modal windows and you are not authenticated. It just try to load the new windows but it won't load.
Comment | File | Size | Author |
---|---|---|---|
#6 | active_modules.xls | 126.5 KB | warmth |
Comments
Comment #1
nagdebangshu CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: warmth commentedAttaching active modules list
Comment #6
warmth CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: ddrozdik commentedComment #9
Martin Mayer CreditAttribution: Martin Mayer as a volunteer 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 CreditAttribution: Martin Mayer as a volunteer commentedComment #11
ddrozdik CreditAttribution: ddrozdik as a volunteer commentedHi Martin,
Are you sure that you do not have js errors? Did you check your browser console?