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.

 

Was this information helpful?

It would also be interesting

Copied to clipboard