Title: WPForms &#8211; Failed to parse response JSON
Last modified: December 16, 2020

---

# WPForms – Failed to parse response JSON

 *  Resolved [Jan Pencik](https://wordpress.org/support/users/janpencik/)
 * (@janpencik)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/)
 * Dear support,
 * I am having problems implementing WPForms with the newest version of AMP plugin.
   In the version 2.0.0 and newer, submit button gets stuck on Sending… and I receive
   this error in the console:
 * [amp-form] Failed to parse response JSON: SyntaxError: JSON.parse: unexpected
   character at line 1 column 1 of the JSON data
 * Email is delivered but it’s not very user friendly to not display any feedback
   of message being sent to the user so I am trying to fix it.
 * With the 1.5.5 version, success/error notification is normally shown under the
   form after submitting the form.
 * Do you have any idea where this may come from? I tried to test it both on localhost
   and testing environment and got the same error.
 * Thanks for any help!
    -  This topic was modified 5 years, 5 months ago by [Jan Pencik](https://wordpress.org/support/users/janpencik/).
      Reason: adding URL
    -  This topic was modified 5 years, 5 months ago by [Jan Pencik](https://wordpress.org/support/users/janpencik/).
    -  This topic was modified 5 years, 5 months ago by [Jan Pencik](https://wordpress.org/support/users/janpencik/).
      Reason: Editing of the title
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwpforms-failed-to-parse-response-json%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Jan Pencik](https://wordpress.org/support/users/janpencik/)
 * (@janpencik)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13799055)
 * Oh, forgot to include URL. Edited previous post. The form is on the bottom of
   the page.
    -  This reply was modified 5 years, 5 months ago by [Jan Pencik](https://wordpress.org/support/users/janpencik/).
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13799673)
 * [@janpencik](https://wordpress.org/support/users/janpencik/) thanks for reaching
   out! When I test WP Forms on an AMP page on my test site, I’m not getting the
   error. Some items to help troubleshoot:
 * 1) Could you check for any validation errors on the page under _AMP > Validated
   URLs_?
 * 2) Are you able to temporarily switch to [Transitional Mode](https://amp-wp.org/documentation/getting-started/transitional/)
   and attempt the using the form on the non-AMP version of the page to ensure it
   works there?
 *  Thread Starter [Jan Pencik](https://wordpress.org/support/users/janpencik/)
 * (@janpencik)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13799786)
 * Hi Renee, thanks for your reply. No validation errors on those pages. Setting
   website to Transitional Mode solves the issue, but is not a solution for me. 
   I need to run all pages in standard AMP mode.
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13799938)
 * [@janpencik](https://wordpress.org/support/users/janpencik/) thanks for the update!
 * > Setting website to Transitional Mode solves the issue, but is not a solution
   > for me.
 * Yes, this was a troubleshooting step. To confirm: the form works on both the 
   AMP version and non-AMP version in this mode (or just the non-AMP version)?
 * Do you have any security measures applied on the site either by a plugin or your
   host (such as ModSecurity)? Something may be interfering with the form request/
   response on the site.
 *  Thread Starter [Jan Pencik](https://wordpress.org/support/users/janpencik/)
 * (@janpencik)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13800283)
 * Well, I managed to fix the issue. You won’t believe me what was causing the problem
   😀
 * So first of all I found out that the theme is the problem. I created fresh WP
   installation and added both plugins there to test it out. Everything was working
   with default Twenty Twenty-One theme. My custom theme wasn’t.
 * I tried to copy things from default theme to my theme to figure out if I am not
   missing any needed feature. I copied every extra feature from functions, header
   and footer but it was still not working. So I tried opposite approach… I started
   to delete everything from Twenty Twenty-One theme until I had super bare bones
   skeleton of basic HTML tags, blank functions.php and the form was still working
   on default theme. When I copied the same skeleton to my custom theme, it wasn`
   t working.
 * And now comes the workaround. I found out that the form is working only if I 
   rename my theme to the same name as one of the default themes has. This includes
   theme folder + Theme Name and Text Domain in style.css – then it’s working without
   any issues. I tested both on localhost and testing server for Twenty Nineteen
   and Twenty Twenty-One and both names were working. On the other side I tried 
   different other names of the theme (one word, two words) to mimic the name of
   default WP themes and wasn’t successful.
 * Thanks, Renee, for your help – I think I am fine with this workaround for now
   🙂
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13800432)
 * [@janpencik](https://wordpress.org/support/users/janpencik/) nice troubleshooting
   and that’s super interesting!
 * Do you mind sharing the name of your theme (you can provide it through [this form](https://forms.gle/S4NZXsqy57nD6DE56)
   if preferred)? Did it have any special characters? It would be interesting to
   see if we can reproduce this on our side.
 *  [Max](https://wordpress.org/support/users/max2k/)
 * (@max2k)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13801865)
 * Maybe this helps … I observed the same issue and posted a topic one week ago 
   on the wpforms plugin page [https://wordpress.org/support/topic/amp-issue-16/](https://wordpress.org/support/topic/amp-issue-16/)
 * In my case the theme is OceanWP.
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13804254)
 * [@max2k](https://wordpress.org/support/users/max2k/) thanks so much for the tip!
 *  [Hazel Z.](https://wordpress.org/support/users/cadencehart/)
 * (@cadencehart)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13834106)
 * I am having this same issue. I am using a Genesis child theme.
 * I tried activating the bare Genesis Sample theme… got the same error. Also tried
   activating the Genesis Parent theme… got the same error.
 *  [Hazel Z.](https://wordpress.org/support/users/cadencehart/)
 * (@cadencehart)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13834334)
 * I reached out to Studiopress and they gave me a fix. I’m adding the solution 
   here in case someone else gets the same issue.
 * You just have to add this to functions.php:
 * `add_filter( 'wpforms_is_amp', '__return_true' );`
 * Studiopress said that the case could be that WP Forms isn’t detecting that Genesis
   themes are AMP compatible. Adding that filter to functions.php fixes it.
    -  This reply was modified 5 years, 5 months ago by [Hazel Z.](https://wordpress.org/support/users/cadencehart/).
    -  This reply was modified 5 years, 5 months ago by [Hazel Z.](https://wordpress.org/support/users/cadencehart/).
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13840984)
 * [@cadencehart](https://wordpress.org/support/users/cadencehart/) thanks for sharing
   your experience and this solution!

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

The topic ‘WPForms – Failed to parse response JSON’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [form](https://wordpress.org/support/topic-tag/form/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [json](https://wordpress.org/support/topic-tag/json/)

 * 11 replies
 * 4 participants
 * Last reply from: [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/wpforms-failed-to-parse-response-json/#post-13840984)
 * Status: resolved