Still not working with WP Fastest Cache
-
Hi there!
My client is running the latest version 3.7.2 and legitimate submissions are marked as spam with reason “Honeypot detected stale day hash (cached page).”
They are using WP Fastest Cache and Autoptimize. Do I need to exclude a specific JS file from the optimization? There seems to be something broken in this combination …
Any help is much appreciated! Thanks in advance.
All the best
Torsten
-
Hello @zodiac1978 ,
Thank you for reaching out. We’re sorry you’re experiencing this issue with legitimate submissions being flagged as spam.
To help us investigate the “Honeypot detected stale day hash (cached page)” message, could you please share the following details?
- WordPress version
- PHP version
- The versions of WP Fastest Cache and Autoptimize
If possible, please also share screenshots or a short video of the relevant WP Fastest Cache and Autoptimize settings.
Thank You
here are the version numbers:
WordPress version: 7.0.4
PHP version: 8.4
WP Fastest Cache: 1.5.0
Autoptimize: 3.1.15.1
I set up WP Fastest Cache to purge the cache every 10 hours and on Plugin/Theme updates. But the problem remained.Then I disabled the Javascript optimization in Autoptimize and so far the problem has not appeared again. Looks like one of the JS optimizations in Autoptimize is the reason for this.
If you can confirm this as the culprit here, you can use this HTML comment to automatically opt-out of the JS optimization, so that you don’t need to hope the user is setting this up correctly:
https://wordpress.org/plugins/autoptimize/#what%20is%20noptimize%3FAll the best
TorstenI think, I found the real culprit here. You are using jQuery, but you are not declaring this dependency correctly.
https://plugins.svn.wordpress.org/contact-form-7-honeypot/tags/3.7.2/legacy-honeypot/includes/honeypot4cf7.phpwp_enqueue_script( 'cf7apps-honeypot-refill', CF7APPS_PLUGIN_DIR_URL . '/legacy-honeypot/includes/js/honeypot-refill.js', array( 'contact-form-7' ), CF7APPS_VERSION, true );The file
honeypot-refill.jsis using jQuery, but the only dependency is “contact-form-7”. Other plugins are using the dependency information. For example if they decide, if a script can be deferred or not.The Divi theme is doing this for example. If the jQuery optimization in the Divi theme is enabled I get this error:
Uncaught TypeError: jQuery(...).on is not a function
cf7appsBindPopupMakerCompatibility https://example.org/wp-content/plugins/contact-form-7-honeypot/legacy-honeypot/includes/js/honeypot-refill.js?ver=3.7.1:35
<anonymous> https://example.org/wp-content/plugins/contact-form-7-honeypot/legacy-honeypot/includes/js/honeypot-refill.js?ver=3.7.1:44
<anonymous> https://example.org/wp-content/plugins/contact-form-7-honeypot/legacy-honeypot/includes/js/honeypot-refill.js?ver=3.7.1:222
honeypot-refill.js:35:22
cf7appsBindPopupMakerCompatibility https://example.org/wp-content/plugins/contact-form-7-honeypot/legacy-honeypot/includes/js/honeypot-refill.js?ver=3.7.1:35
<anonym> https://example.org/wp-content/plugins/contact-form-7-honeypot/legacy-honeypot/includes/js/honeypot-refill.js?ver=3.7.1:44
<anonym> https://example.org/wp-content/plugins/contact-form-7-honeypot/legacy-honeypot/includes/js/honeypot-refill.js?ver=3.7.1:222After disabling this setting in the Divi theme the error is gone.
I think Autoptimize is doing something similar. As the script is not declaring dependency, it is okay for them to defer jQuery in the footer, but your code is still in the header, not executed correctly and therefore failing to refill the token.
Alll the best
TorstenHello @zodiac1978 ,
Thank you for sharing the detailed information and the steps you took to resolve the issue. We’re glad to hear that you were able to get it working again.
I’ve shared the details, including your observations, with our technical team for further review. They’ll investigate the reported behavior from their end.
Thank You
Hello @zodiac1978 ,
Our team has made some changes to address the issue. Kindly review the changes on your site and let us know if you still encounter any issues.
Please make sure to clear all site/server caches after installing and then check whether the error still occurs.
If the issue persists after clearing the caches, please let us know so we can investigate further.
@mubashirbutt It works; I can confirm that the JavaScript error is gone with the new version without any changes in Divi itself.
Hi @zodiac1978 ,
We’re glad to hear that the issue has been resolved.
We would really appreciate it if you could take a moment to leave us a review and share your experience. Your feedback means a lot to us and helps our team continue improving our products and support.
You must be logged in to reply to this topic.