Problem

Form ceases to work when Joomla caching is turned on in the Global Config

Solution

With System caching set to Conservative and the Setting in your module set to No cache - the form was sent.

Discussion

Hi Doug
 
Many thanks for replying.
 
My installation of Simple Email Form ceases to work when Joomla caching is turned on in the Global Config. If I turn off global caching the module works again. I would like to be able to turn on global caching and still have Simple Email Form work. What changes do I need to make to the configuration or the code on the site to get to this situation?
 
Here are the details (some of which I left out last time):
 
Joomla version:   3.2.4
Module version: 1.8.5
 
What do I mean by global caching? go to System... Global Configuration... System tab . Set Cache to on (either progressive or conservative). 
 
The Joomla system plug-in for caching is not enabled and is not part of this.
 
What do I mean by 'work'? In the non-working case (caching turned on) the form displays fine but when the user presses submit there is no processing of data, no email is sent to the site owner and no 'Form successfully submitted" message is displayed. This appears to be because the request has been turned into a GET and not a POST. (See my first report below).
 
Settings for Simple Email module:
 
Under the Advanced tab. I currently have it set to No Caching. However the problem is the same when this is set to Use global. I.e. this setting does not appear to make a difference.
 
Use Captcha: No Captcha
 
My analysis of this: when caching is turned on the Joomla core should somewhere check per module to see whether to cache or not cache that module. This is what the setting in the Advanced Tab of the module is for. By setting this to "No Caching" we are telling Joomla core to exclude this module from caching. Is there somewhere I can check for this? E.g. is this set into the db somewhere?
 
I'm not that familiar with Joomla development but am a PHP developer.
 
Many thanks for your help
 
with best wishes
 
Justin
 

 

Justin --

 
You should be able to have global caching turned on, but make sure you disable caching in the module configuration.  I've had customers (well ... if you can call somebody who uses your code but doesn't pay you any money a customer!) tell me that caching and Joomla form processing (not just confined to my module) don't seem to go very well together, especially when using the captcha.
If you are using the form inside an article, there is a module you can install which allows you to disable caching of that one article, and that appears to work quite well.  Sorry I can't be of any more help than that.  Oh ... I've got a lot of questions and answers on the joomla.unlikelysource.org website.  Just type "cache" or "caching" into the search box.
Yours,
db

Hi Doug
 
Thanks.
 
For information this is what I found:
 
Joomla 3.2.4
 
With System caching set to Progressive and the Setting in your module set to No cache - the form was not sent. (As per my first report the request has been turned into a GET so your form code just doesn't process it).
 
With System caching set to Conservative and the Setting in your module set to No cache - the form was sent.
I don't know why this is. Progressive caching caches per visitor whereas Conservative caches just once for all visitors. But even using a new visitor it still didn't work when I have progressive caching enabled. It may be to do with the way that the first time it "creates a cached version of the page and serves that". So - in this creation of the cached page the form processing gets lost. Anyway. The main point is that, for me, I could get it it to work with No cache set in the module and using Conservative caching.
 
With regards
 
Justin