The module needs to make the pages not cacheable when displaying captcha elements. This is done in captcha_element_process() using:
global $conf;
$conf['cache'] = FALSE;
This is not the correct way to do this. It will disable caching for everything. That's not the purpose.
So it needs to be replaced by:
drupal_page_is_cacheable(FALSE);
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | captcha-page-not-cacheable-2465073-1.patch | 625 bytes | mfernea |
Comments
Comment #1
mfernea commentedHere is the patch.
Comment #2
mfernea commentedComment #3
mcdruid commented+1
I spent a while today trying to work out what was disabling page cache on a site, and it's much easier to do so when modules use API functions like drupal_page_is_cacheable rather than overriding the global $conf.
Comment #4
mcdruid commentedTested this patch on a vanilla D7 install and it works as intended.
Comment #5
geerlingguy commentedOn a separate note, the D8 version of the module already seems to be using the proper API usage for disabling the cache, so this patch will not need to be forward-ported.
Comment #6
wundo commentedComment #7
wundo commentedCommitted, thanks! :)