• Resolved Jan Zikmund

    (@verify)


    Hello,

    today I installed your plugin and I experienced a strange behavior, when I enter incorrect email twice. If I enter ‘aaa’ as email and submit, I correctly get error message. But when I enter it again and submit, I just get a neverending loader. I was debugging the mailchimp-widget.js and found the problem on the very last lines – there is a condition, that if there is no error container, it is correctly created. But if it is already there, nothing happens.. while instead the loader should be hidden and fields shown again.

    Here is the part of code that is in plugin and didn’t work for me:

    if (0 === error_container.length) {
      ajax_loader.remove();
      eL.children().show();
      error_container = jQuery('<div class="error"></div>');
      error_container.prependTo(eL);
    }
    error_container.html(data.error);

    Here is how I changed it to be correct (and so it works for me):

    if (0 === error_container.length) {
      ajax_loader.remove();
      eL.children().show();
      error_container = jQuery('<div class="error"></div>');
      error_container.prependTo(eL);
    } else {
      ajax_loader.remove();
      eL.children().show();
    }
    error_container.html(data.error);

    I was just wondering – is this a bug and I am the only one experiencing this, or am I missing something ?

    Thank you

    https://www.ads-software.com/extend/plugins/mailchimp-widget/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: MailChimp Widget] After second wrong email submit it gets stuck’ is closed to new replies.