Hi James (@james-feaver),
Thanks for reaching out and reporting the issue.
It sounds like you’re looking to resolve the “Attempt to submit corrupted post data” error that is occurring across your forms, even after following our standard troubleshooting steps.
I was able to reproduce the error on your site at your page. After looking at the browser’s developer tools, I noticed that the WPForms JavaScript assets are being merged into a single file by PageSpeed (screenshot). Here’s the link of the merged file:
https://www.englishtruffles.co.uk/wp-content/plugins/wpforms-lite/assets/js/share,_utils.min.js,qver==1.9.8.7+frontend,_wpforms.min.js,qver==1.9.8.7+frontend,_wpforms-modern.min.js,qver==1.9.8.7.pagespeed.jc.BMgPtBbO3e.js
However, after receiving the “Attempt to submit corrupted post data” error when trying to submit the form, the WPForms assets are no longer merged (screenshot). This is likely why the form submitted on the second attempt.
This merging or “minification” process often interferes with a successful form submission. When you have a chance, please try disabling the “merge JavaScript files” feature in PageSpeed, or create an exception for all WPForms assets within that service. Once that is done, please clear your site cache and let me know if the issue continues or if you have any additional questions.
Thanks!
Thread Starter
James
(@james-feaver)
Hi Ralden (@rsouzaam),
Thanks for looking into this so quickly. I have turned off minification of all JavaScripts, cleared the cache and the forms all work as expected now. I’ll keep an eye on the error log for a while in case but think we’re sorted.
Thank you for your help.
James
-
This reply was modified 4 months, 3 weeks ago by
James.
Thread Starter
James
(@james-feaver)
Hi Ralden (@rsouzaam),
I have been watching the log since yesterday and even after the change (turning minification off / clearing the cache), I can see two reports of “Attempt to submit corrupted post data.” One was spam but one was genuine. The pages were:
https://www.englishtruffles.co.uk/contact-us/
https://www.englishtruffles.co.uk/truffle-hunting-booking-details/
After my previous post, I tried to Enable Google v3 reCAPTCHA and all forms gave the error.
I just retried the second link above and on load got a console error “Uncaught Reference Error: wpforms_settings is not defined”. On submit I got the “Attempt to submit corrupted post data.”
Thanks,
James
Hi James,
Thank you for providing those specific page links and the console error details.
I took a look at the second link you shared in an incognito window, and it appears that JavaScript files are still being merged by PageSpeed. You can see this in my screenshot here.
Also, I did not see that “Uncaught Reference Error: wpforms_settings is not defined.”
Since you previously mentioned that the forms worked as expected after turning off minification, the issue is likely due to cache. I noticed that your JavaScript files are being cached and served through a CDN service — screenshot.
To resolve this, I recommend purging both your site cache and your CDN cache entirely.
Once the caches are cleared, if the merging feature remains disabled in PageSpeed, the WPForms scripts should load individually and in the correct order, which should resolve the issue.
Please let me know if the issue persists after you have purged the caches, or if you have any questions.
Thread Starter
James
(@james-feaver)
Hi Ralden,
Thanks for your latest response.
The first screenshot showed me that in addition to minifying scripts, I needed to turn off combining them. I have turned both of these off and refreshed both site cache and CDN cache.
I can still see that .min.js scripts are being used. I see from a fresh copy of the plugin that it comes with both versions. Minifying is definitely off.
In the console I can see:
wpforms_settings is not defined
at Object.loadValidation (wpforms.min.js?ver=1.9.8.7:5:916)
at HTMLDocument.ready (wpforms.min.js?ver=1.9.8.7:1:358)
at e (jquery.min.js?ver=3.7.1:2:27028)
at t (jquery.min.js?ver=3.7.1:2:27330)
Thanks,
James
Thread Starter
James
(@james-feaver)
Hi Ralden,
Googling “wpforms_settings is not defined” found:
When we see “wpforms_settings is not defined”, this error can happen when there’s an issue with properly loading the required assets.
I found another cache option about deferring scripts, tried that and, I think, all is now good.
Thanks,
James
Hi @james-feaver,
I’m so glad to hear everything seems to be working now! Thanks for letting me know.
It looks like you’ve marked this post as resolved. If you’d like more help with using WPForms Lite, please feel free to reach out.
Thanks!