• With WordPress 3.8.1, jQuery 1.10.2, plugin 3.7.1 and IE7 only one single POST-param is sent to server:

    _wpcf7_is_ajax_call=1

    This causes a PHP notice on server:

    PHP Notice: Undefined variable: items in /../wp-content/plugins/contact-form-7/includes/controller.php on line 91

    Because $_POST['_wpcf7'] is not set, $items won’t be set and so

    $echo = json_encode( $items );

    gets null as result and this string is sent as (invalid) JSON back to client.

    The spinner starts to spin (and continues forever), so beforeSubmit seems to be called in IE7. Not sure why the other params are not added in IE7.

    IE8 works fine.

    Thanks for suggestions, I know IE7 is outdated, but client has IE7 and says it worked before.

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ov3rfly

    (@ov3rfly)

    Found the problem in recent jQuery Form Plugin fix.

    If this

    if (els && !/MSIE 8/.test(navigator.userAgent)) { // #390

    is replaced with this

    if (els && !/MSIE 7/.test(navigator.userAgent)) { // #390

    then all formdata is sent to server with IE7 (but not any more with IE8).

    After this find, I saw a similar problem and solution in jQuery Form Plugin #390 comments:

    https://github.com/malsup/form/issues/390#issuecomment-34775408

    if (els && !/MSIE [678]/.test(navigator.userAgent)) { // #390

    Too bad, that fix did not make it into the latest jQuery Form Plugin release.

    Suggestion to Contact Form 7 author: Add the fix from this comment to current plugin include files, then it will work again also with older IE.

    Thread Starter Ov3rfly

    (@ov3rfly)

    As a sidenote, $items in includes/controller.php should imho be set to a default error message at the beginning of wpcf7_ajax_json_echo(), this would probably help to solve some of these ‘endless spinning’ support questions.

    Edit: The author of jQuery Form Plugin added above MSIE [678] fix to a new version 3.50.0:

    https://github.com/malsup/form/commit/380288544da0e8f6970a974f535eb993724fc337

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sending formdata to server broken in IE7’ is closed to new replies.