Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    I just discovered this same issue on one of my site. For now I have gone into WP Super Cache and told it not to cache any pages that have a form install on it and it appears to have clear getting the error and forms are now being successfully submitted. Is the problem with Contact 7 or is it with WP Super Cache?

    These are two of the most widely used plugins and they need to play well together I hope someone addresses this quickly.

    Is this problem solved until now?

    Odd, this was brought up on my blog earlier.

    The problem is that Contact Form 7 uses a secret key that changes to make sure the user submitting the form is real. WP Super Cache is caching that value and it goes out of date. Contact Form 7 needs to define the constant DONOTCACHEPAGE which will stop Supercache (and W3 Total Cache too) from caching the page.

    You could also try entering the url of the pages with your contact form in the exclude list on the supercache settings page but having Contact Form 7 do it with the constant is a better way.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Hello Donncha. Thank you for WP Super Cache. I use it on contactform7.com.

    Contact Form 7 uses WP nonce as secret key. As nonce life is 24 hours by default, if cache clears less than 24 hours, the two plugins should work without problem, even if the page is cached.

    I recommend in FAQ that users do garbage collection frequently.

    I think that there should be clear instructions in FAQ about how to handle this with the most common cache plugins (WP Total/Cuper Cache). If there is somehow possible it would be best to disable the caching with DONOTCACHEPAGE like Donncha mentioned.

    Im quite sure that there are a lot of people that are not aware of this problem and their client emails are not getting delivered. I use the plugin for purchase requests on one of our real estate stites (brunarice.org) and we lost a quite a bit in sales before one of our clients reported this(i took 1-2 months to realize this).

    Takayuki – it might be worth adding a checkbox to the contact form settings page that disables caching on the form page. It would just set the DONOTCACHEPAGE constant and then WP Super Cache and W3 Total Cache will not cache that page.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Actually, it’s difficult for Contact Form 7 to know which page contains contact forms. You can place contact forms in post/page contents, text widget contents, directly in the theme’s template, or anywhere you like. So I’m thinking of writing FAQ how users can set DONOTCACHEPAGE to exclude pages from cache, or making nonce-checking off by default in the next release of Contact Form 7.

    It’s simpler than that! If the option was set on the settings page you just set that constant whenever you display the contact form. Your plugin doesn’t need to know where it is shown!

    Caching is done at the end of the request so the plugin disables caching when that constant is defined.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Contact Form 7] Forms not sending with Super Cache enabled?’ is closed to new replies.