We're having an issue with honeypot preventing the page from being cached even though it's enabled for all webforms only, and there are no webforms on the given page. We also use varnish, and the Cache-Control headers always say 'no-cache' when honeypot is enabled, even if webforms are not present on the page. After disabling the module cache is back to normal saying "public, max-age=3600"

I'm not sure if it's an issue with honeypot, or another module that interacts with honeypot. But honeypot_add_form_protection() is not being used on our site so it's not any custom form causing it at least.

Comments

nitesoul created an issue. See original summary.

pub497’s picture

Okay this is not honeypot, there is some ghost webform being called prior to page being loaded preventing caching...this is 2spooky4me. closing.

pub497’s picture

Status: Active » Closed (fixed)
geerlingguy’s picture

Whew! I'm glad it was a ghost and not Honeypot :)

Chris Matthews’s picture

@geerlingguy - First, thank you for your ongoing maintenance for Honeypot.

I'm running Drupal 7.56 / PHP 7.0.18 behind Pantheon's Global CDN that uses Varnish edge-cache. Like the original post, the cache-control headers (for any page) always say 'no-cache' when honeypot is enabled. After disabling the module, Varnish cache is back to normal.

/admin/config/content/honeypot says, "Page caching will be disabled if there is a form protected by time limit on the page."

However, when I enable Honeypot and set a time limit, page caching is disabled for ALL pages, not just for pages that have a time limit protected form.

If I set the Honeypot time limit to 0 Varnish works as expected, but having to set the time limit to 0 is not ideal.

Is there any additional information you need from me to consider re-opening this issue?

thanks,

geerlingguy’s picture

@Chris2 - I haven't had any issues on my Drupal 7 site with Varnish; Honeypot only causes the page cache to be disabled on the few pages where I have protected forms. Can you check and see if you either have Honeypot set to protect all forms on the site, or if there might be a form somewhere on every page (e.g. a block that's a view, with exposed filters) causing this to happen?

Chris Matthews’s picture

Appreciate the response.

Protect all forms with Honeypot is disabled

I do only have a few nodes on the site:

Home - Node with webform block
About - Node with same webform block as Home
Portfolio - View page with an exposed filter
Pricing - Node same webform block as Home
Contact - Core contact module

So, in order for Varnish to work on my site I need to set the Honeypot time limit to 0, correct?

If so, does disabling the Honeypot time limit increase the chance spam bots will be able to pass through the form?

thanks,

Chris Matthews’s picture

So, this is what's confusing me:
I have "Protect all forms with Honeypot" disabled.
I have the Honeypot time limit set to 5 seconds.
I understand that "Page caching will be disabled if there is a form protected by time limit on the page."
However, I created two new Basic page nodes that do not have a "General Form" or "Contact Form" displayed, but Varnish is not working for those two pages.

It appears that if is a time limit set, Honeypot disables site caching all together, regardless of whether or not there is a form protected by time limit on the page.

If I disable the time limit setting, Varnish starts working again on the two new nodes I created that do not have time protected forms.

Any ideas?