Fixing False Positives in the CleanTalk Anti-Spam while using cache plugins
Sometimes website visitors may be blocked when they submit their data via your website forms on WordPress. One of the reasons is the invalid value of the parameter "nonce" of the cached page where the form is located. This problem can occur in rare cases when using caching plugins, when caching is set for a very long time. There are 2 ways to solve this issue:
1. Change your cache plugin settings so your website pages will be cached for 12 hours or less. That means your cache will be refreshed twice a day.
2. Use the hook "nonce_life" to extend the lifespan of the parameter "nonce" to a really long time period like 1 year or more.
You can write this code into the functions.php file to change the lifespan to one year:
add_filter( 'nonce_life', function () { return 1 * YEAR_IN_SECONDS; } );
It's your choice what approach to pick. Any of these two ways fix the issue of false positives on the website forms.
If you're not sure why you're getting false positives, please contact our support team so we can investigate this issue.
It would also be interesting
- How to fix a visible number field on a formHow to fix a visible number field on a form Have you noticed a visible number field on your WordPress...
- Setting Up the Anti-Spam by CleanTalk and WP RocketHow to Set Up the Anti-Spam by CleanTalk and WP Rocket Using caching plugins is a popular way...
- How do I report a missed spam bot or incorrect filter?Description of the process for sending a report about a missed spam bot or an incorrect filter If you...