Title: bug http error 302 after submit
Last modified: January 29, 2019

---

# bug http error 302 after submit

 *  Resolved [zetoun17](https://wordpress.org/support/users/zetoun17/)
 * (@zetoun17)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bug-http-error-302-after-submit/)
 * this error is displayed when i submit the form in the first step
    <div class=”
   ajax-error”>Unexpected token < in JSON at position 0</div>
 * this is the request response in devtools
    /wp-json/contact-form-7/v1/contact-
   forms/2479/feedback header : Status Code: 302
 * responde header :
    location: [https://www.example.com/form-2-5/](https://www.example.com/form-2-5/)
 * Solution :
    in file cf7msm.php search function cf7msm_mail_sent() replace if (!
   wpcf7_load_js() || !(defined( ‘REST_REQUEST’ ) && REST_REQUEST) && !(defined(‘
   DOING_AJAX’ ) && DOING_AJAX) ) with if ( !wpcf7_load_js() && !(defined( ‘REST_REQUEST’)&&
   REST_REQUEST) && !(defined( ‘DOING_AJAX’ ) && DOING_AJAX) )
 * I hope this bug will be fixed in the next update

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

 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bug-http-error-302-after-submit/#post-11145343)
 * Hi,
 * This is a common error found with the core CF7 plugin. The usual cause is a plugin
   conflict. Here are a few links that all found out it was something outside of
   the CF7 plugin:
 * [https://stackoverflow.com/questions/43683683/ajax-error-unexpected-token-in-json-at-position-0-on-wordpress-contact-form-7](https://stackoverflow.com/questions/43683683/ajax-error-unexpected-token-in-json-at-position-0-on-wordpress-contact-form-7)
   
   [https://theme.co/apex/forums/topic/contact-form-7-unexpected-token/](https://theme.co/apex/forums/topic/contact-form-7-unexpected-token/)
   [https://github.com/bmarshall511/wordpress-zero-spam/issues/118](https://github.com/bmarshall511/wordpress-zero-spam/issues/118)
 * If you still believe this plugin may have an error, please let me know if you
   have AJAX enabled, the WP REST API enabled, and if you are forcing CF7 javascript
   to only load on certain pages.
 *  Thread Starter [zetoun17](https://wordpress.org/support/users/zetoun17/)
 * (@zetoun17)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bug-http-error-302-after-submit/#post-11147710)
 * AJAX enabled : yes
    WP REST API enabled : yes forcing CF7 javascript to only 
   load on certain pages : yes and wpcf7_load_js() return false
 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/bug-http-error-302-after-submit/#post-11149882)
 * ok thanks. I think maybe the wpcf7_load_js() check may not even be needed then.

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

The topic ‘bug http error 302 after submit’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7-multi-step-module/assets/icon-256x256.png?
   rev=1793363)
 * [Contact Form 7 Multi-Step Forms](https://wordpress.org/plugins/contact-form-7-multi-step-module/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-multi-step-module/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/bug-http-error-302-after-submit/#post-11149882)
 * Status: resolved