Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-25 22:28:54

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

aam_zcr_clearcache: Compatibility for asy_jpcache & zem_contact_reborn

This plugin helps two other plugins co-exist peacefully: the full-page caching of asy_jpcache and the powerful form processing of zem_contact_reborn (ZCR). These plugins usually clash due to the way ZCR fights spam.

About the Plugin

The anti-spam measures built into zem_contact_reborn can cause conflicts with the full-page caching plugin asy_jpcache. When a ZCR form is cached after submission, one person filling out a form can prevent another person from filling out the same form a few minutes later. Instead of a thank you message, everyone else who submits that form receives a “form already used” error until the cached version of the page expires. This error is caused by a conflict between the full-page caching of asy_jpcache and the hidden codes used by ZCR to fight spam.

The aam_zcr_clearcache plugin prevents “form already used” errors by making asy_jpcache treat ZCR forms the same as it treats comment forms: the cache gets cleared whenever a ZCR form is submitted. Basically, this plugin is a wrapper around the cache plugin’s asy_flushdir() function. For it to work, you need to be using asy_jpcache and have the asy_jpcache Textpattern plugin installed and active.

Important Note

This plugin only works to prevent “form already used” errors that occur when using zem_contact_reborn and asy_jpcache together.

For full compatibility between these two plugins, you’ll also need to set your jpcache expiration time to a value of less than 10 minutes (600 seconds). This is done by changing the value of the $JPCACHE_TIME variable in the jpcache-config.php file.

Taking this extra step will also eliminate the “form expired” errors that can crop up when these plugins are used together.

Usage

Just install and activate. No template tags are required for this plugin to work.

License

This plugin and its documentation are copyright © 2007 Adam Messinger, and are provided under the terms of the BSD license.

Download & Links

Offline

Board footer

Powered by FluxBB