• Caching CF7 JavaScript can break the functionality of the form, animations and other things site wide.

    I’m using theme Enfold v5.8 and CF7 5.4 and WP-Rocket v3.8.5 for caching. – all the latest versions.

    In WP-Rocket under FILE OPTIMIZATIONS I had to disable the following options:

    1. Combine JavaScript files
    2. Load JavaScript deferred

    I assume similar settings in other caching programs will resolve the issue.

    I can exclude CF7 files from being combined or deferred but I don’t know which files those are. Could you tell me what CF7 JavaSCript files to exclude?

    • This topic was modified 3 years, 9 months ago by pca2014.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Have the same issue with custom theme.
    Reverted Contact Form for older version and now it works fine for us.

    I try to “Excluded JavaScript Files” for contact form – but it doesn’t help me.

    I had the same issue. Using WP-Rocket and Oshin Theme. Downgraded to WPCF7 version 5.3 and now the forms are working again.

    This is a common issue, many posts about it, cant see a statement from the team yet.

    I tried excluding the files from minification/concatenation in WP Rocket and it didn’t work. I looked at the un-optimised site when logged in as admin, found all the CF7 JS files and inline script, added those to be excluded, and still did not work. Either I missed some files, or it wont work anyway.

    Eitherway, its not best practice to exclude optimising files, so CF7 team need to fix this.

    In the meantime the only solution I found is rollback to 5.3.2. Unoptimised was not a solution for us.

    • This reply was modified 3 years, 9 months ago by amityweb.
    Thread Starter pca2014

    (@pca2014)

    I didn’t exclude anything. I simply disabled these options and everything works. I did NOT disable minification. The one thing you didn’t mention is “Load JavaScript deferred”. Did you also try disabling that?

    In WP-Rocket under FILE OPTIMIZATIONS I had to disable the following options:

    1. “Combine JavaScript files”
    2. “Load JavaScript deferred”

    I’m not saying this is a solution, just a workaround until it’s fixed.

    • This reply was modified 3 years, 9 months ago by pca2014.

    Hi,
    I am having similar issues with W3-Total-Cache and CloudFlare (with Automatic Platform Optimization for WordPress enabled).

    In my case, the forms stop to sending emails and the temporary solution is to clean all caches (page cache in W3TC and purge cache in CloudFlare). Then, the forms work again.

    However, after a few hours the forms stop again. I am assuming the js scripts cannot be cached in version 5.4.

    After downgrade to version 5.3.2, the forms are working again.

    Any advice to prevent this issue would be very appreciated.

    Thread Starter pca2014

    (@pca2014)

    @billbordallo

    However, after a few hours the forms stop again. I am assuming the js scripts cannot be cached in version 5.4.

    I don’t think that’s the problem. It may have something to do with the use of “nonces”, which the CF7 author mentioned on their support forums. The problem with using “nonces” to enhance security is that the page will have to be re-chached every 12hours or so; I read that in my WP-Rocket documentation. Obviously that will heavily degrade the value of caching and the CF APO, which I am also using.

    FYI: Mine also broke after 12-hours because this, so I’m rolling back now. It’s not worth the performance burn.

    https://codex.www.ads-software.com/WordPress_Nonces

    • This reply was modified 3 years, 8 months ago by pca2014.
    Thread Starter pca2014

    (@pca2014)

    @takayukister

    1. CF7 5.4 is incompatible with caching, specifically combining and deferring JavaScript files, which will cause a performance hit.

    2. The use of “nonces” means a website has to be re-caches every 12 or 24-hours, I think? This will obviously cause a performance hit when using CloudFlare since all of the files have to be re-cache and with something like CloudFlare ARGO where the cache is distributed almost all of the benefit will be lost.

    The bottomline is that this is a hassle and bad for performance.

    Please make “nonces” optional and find a way to make CF7 compatible with caching.

    I have already rolled back to the previous version.

    Thanks!

    @pca2014

    I don’t think that’s the problem. It may have something to do with the use of “nonces”, which the CF7 author mentioned on their support forums. The problem with using “nonces” to enhance security is that the page will have to be re-chached every 12hours or so; I read that in my WP-Rocket documentation. Obviously that will heavily degrade the value of caching and the CF APO, which I am also using.

    FYI: Mine also broke after 12-hours because this, so I’m rolling back now. It’s not worth the performance burn.

    Thanks for the information. I hope that the CF7 plugin developer fixes this issue soon.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CF7 5.4 errors when using cache plugin’ is closed to new replies.