WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Not compatible with W3 Total Cache (13 posts)

  1. Foreverbarcelona
    Member
    Posted 1 year ago #

    Hi!
    When I have W3 Total Cache activated, the spinning arrow of Contact Form 7 keeps indefinitely spinning: the form is delivered but the user doesn't know it's been sent.

    When I deactivate W3 Total Cache, the form works fine again.
    I tried not caching the page, and it didn't work. But I'm a newbie, so I might not have done it correctly. Here is what I did:

    Performance > Page Cache > Advanced > Never cache the following pages:
    contact-form

    (the page url is http://www.foreverbarcelona.com/contact-form.htm)

    Any ideas how to solve that? Thank you so much in advance!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    As far as I know, W3 Total Cache has no problem with Contact Form 7. Have you checked other plugins or theme yet?

  3. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    I guess you'll be able to find some clues if you can check PHP error logs.

  4. Foreverbarcelona
    Member
    Posted 1 year ago #

    Where do I check the PHP error logs?

  5. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    It depends on the server. Consult your host support.

  6. David
    Member
    Posted 1 year ago #

    I have the same problem and have tried just about every configuration option imaginable. If page caching is disabled in W3TC, the form submission works fine. If page caching is enabled, the spinner doesn't stop. The contact form is in the footer and even if the page itself is not getting cached, the form submission still doesn't work. As noted above, the email does send, but I'm using an on_sent_ok setting to open a confirmation modal, which never shows.

    If I use WP Super Cache, it works fine. If I use every other option in W3TC, it works fine. The problem is simply when page caching in W3TC is activated. I have tried deactivating all of the options on the page caching settings page, and I have added footer.php to the ignore list, all to no avail. Thanks for any insight you have on this.

  7. toddviau
    Member
    Posted 1 year ago #

    I have the same issue. As soon as I turn on Page Caching I just get the spinning arrow from Contact Form 7.

  8. normadize
    Member
    Posted 1 year ago #

    Yes, same issue here as well. Turning on Page Cache in W3TC prevent WPCF7 from working ...

    Even when logged in and with the option "don't cache pages for logged in users" enabled. I also disabled the option "Cache URIs with query string variables" which should do the trick since WPCF7 uses Ajax with a GET query string.

    Any clues?

  9. normadize
    Member
    Posted 1 year ago #

    Got it ... at least in my case.

    Is by any chance the "debug" mode enabled for page cache (or others?) If yes, then that's it.

    I observed the Ajax JSON return value and, to my horror, I noticed that after the JSON object returned for WPCF7 there was a nasty HTML comment added by W3TC with debug information (I had debug enabled).

    This is actually a (fairly nasty) bug in W3TC. It should not add debug information for application/json content type (actually no other types except html and friends).

  10. toddviau
    Member
    Posted 1 year ago #

    Yes. That was it. Thank you very much.

  11. Foreverbarcelona
    Member
    Posted 1 year ago #

    Worked like charm! Thank you so much normadize!

  12. fenexpert
    Member
    Posted 1 year ago #

    Just like normadize said :
    Turning on Page Cache in W3TC prevent WPCF7 from working ...

    TURN OFF PAGE CACHE FIXES THE PROBLEM !
    that worked for me too.... owe you bigtime normadize :)
    http://www.fenexpert.ro

  13. johnmontfx
    Member
    Posted 1 year ago #

    Thanks so much -- that worked brilliantly for me as well

    I had added the following to the "never cache" area, but that didn't work, which surprised me. I guess it was because it was still adding the comment:

    .*contact.*
    /wp-content\/plugins\/contact-form-7\/.*

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic