Title: [Plugin: MailChimp Widget] After second wrong email submit it gets stuck
Last modified: August 20, 2016

---

# [Plugin: MailChimp Widget] After second wrong email submit it gets stuck

 *  Resolved [Jan Zikmund](https://wordpress.org/support/users/verify/)
 * (@verify)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-mailchimp-widget-after-second-wrong-email-submit-it-gets-stuck/)
 * 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
 * [http://wordpress.org/extend/plugins/mailchimp-widget/](http://wordpress.org/extend/plugins/mailchimp-widget/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [jameslafferty](https://wordpress.org/support/users/jameslafferty/)
 * (@jameslafferty)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-mailchimp-widget-after-second-wrong-email-submit-it-gets-stuck/#post-2431737)
 * This is a bug, verify. I’ll try and get a quick fix into the code and committed
   later today. Thanks for catching it!
 *  Thread Starter [Jan Zikmund](https://wordpress.org/support/users/verify/)
 * (@verify)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-mailchimp-widget-after-second-wrong-email-submit-it-gets-stuck/#post-2431738)
 * Thanks for fast reply. Please just write here when it is fixed so I can mark 
   this [resolved] and update it on my site.
 *  Plugin Author [jameslafferty](https://wordpress.org/support/users/jameslafferty/)
 * (@jameslafferty)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-mailchimp-widget-after-second-wrong-email-submit-it-gets-stuck/#post-2432080)
 * Just committed your fix, which seems to be working well where I’ve tested it.
   Thanks so much!
 *  Thread Starter [Jan Zikmund](https://wordpress.org/support/users/verify/)
 * (@verify)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-mailchimp-widget-after-second-wrong-email-submit-it-gets-stuck/#post-2432090)
 * You’re welcome, thanks also for a quick fix and good communication 😉

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.

 * ![](https://s.w.org/plugins/geopattern-icon/mailchimp-widget.svg)
 * [MailChimp Widget](https://wordpress.org/plugins/mailchimp-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-widget/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Jan Zikmund](https://wordpress.org/support/users/verify/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-mailchimp-widget-after-second-wrong-email-submit-it-gets-stuck/#post-2432090)
 * Status: resolved