• Resolved nicolas987

    (@nicolas987)


    Hi all! I’m struggling and I hope you can help me: I just installed WP Super Cache and ran into a serious problem with Contact Form 7: as soon as I activate caching, sending CF7 forms no longer works. Console shows the error “Object { code: “invalid_json”, message: “The response is not a valid JSON response.” }”. Checking the requests using the network inspector, the REST API from Contac Form 7 (/wp-json/contact-form-7/v1/contact-forms/190/feedback) is responding with the source code of the start page instead of the expected JSON. What I tried so far to resolve the issue:

    • adding “/wp-json/” to the “Rejected URL Strings” in advanced config
    • activating “late init” in advanced config
    • deactivating 304 caching in advanced config
    • disable dynamic caching in advanced config
    • deactivating potentially conflicting plugins (Autoptimize, WP-Optimize)

    None of that helped so far and I did not find a solution here, either. I hope you have any further ideas…

    Thank you!

Viewing 1 replies (of 1 total)
  • Do you have simple or expert cache enabled? I tested a form and it worked ok. I looked at the network tab and it shows the correct message returned but I’m using simple caching.

    You should also enable the debug log – limit it to your IP address and then test the contact form. You’ll have to uncheck the wp-json checkbox but it should show that it doesn’t cache POST requests.

Viewing 1 replies (of 1 total)

The topic ‘Contact Form 7: invalid_json error whith WP Super Cache enabled’ is closed to new replies.