Easy Forms for MailChimp
[resolved] Doesn't work in IE; why including jQuery? (4 posts)

  1. jamesvl
    Posted 3 years ago #

    On two different computers the plugin fails with IE9. Works fine under FF and Chrome. The JS or AJAX call fails and the success message is never shown.

    Also, per this comment, WP updates include the latest version of jQuery - shouldn't this plugin just follow best practices and reference that, instead of trying to include its own (outdated) version?


  2. jamesvl
    Posted 3 years ago #

    Correction: I see the plug-in doesn't actually include jQuery on its own, it just has the file in its repository. My mistake.

    Haven't delved into the code yet, but I guess you're including and using Prototype instead of jQuery?

  3. jamesvl
    Posted 3 years ago #


    The AJAX request was failing on IE because my WP site had its admin_ssl turned on.

    A visitor on the site using http would be given the MailChimp form and the AJAX call would go to the https version of the site.

    That cross-domain request (from http or https, even on the same domain) works in FF and Chrome, but fails in IE8 and IE9. (May not be an issue in IE10.)

    The Fix

    I had to adjust the call to admin_url() in the main plugin file, based on the server's port.

    This will let the script work on both http and https versions of the site, and falls back to the old behavior if you're running on a non-standard port.

    if(!defined('YKSEME_URL_WP_AJAX')) {
       if ($_SERVER['SERVER_PORT'] == 80)
           define('YKSEME_URL_WP_AJAX', admin_url('admin-ajax.php', 'http'));
       else if ($_SERVER['SERVER_PORT'] == 443)
          define('YKSEME_URL_WP_AJAX', admin_url('admin-ajax.php', 'https'));
          define('YKSEME_URL_WP_AJAX', admin_url('admin-ajax.php'));
  4. yikesinc
    Plugin Author

    Posted 3 years ago #

    Hi Jamessvl,

    Thanks so much for posting the fix. We will add it to our to-do list of the next release of the plugin.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Easy Forms for MailChimp
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic