has an upload feature ( folder where these documents are uploaded to doesn’t have public read)
We have run into some trouble where a public form is caching the previous persons results. I have checked previous posts to which this can happen if a form is nested in.
The form is going to move location to our student authenticated area however I am just wondering why this form would be caching and what measures we could do to prevent the caching.
Set the caching on the form in cache manager to not cache
set a trigger to clear the cache on the form on submit
Looking forward to hearing your thoughts guys
Edit - I have just realised I also had %current_page_contents% in my forms body copy rather than %form_contents%. We have seen caching occur in the past on multipage matrix forms.
Are the submission urls and confirmation/thank you urls exactly the same?
If so, then your clear cache trigger is causing matrix to rebuild the cache when the form is submitted - therefore caching the submission content.
I would recommend that you disable this trigger, and ensure that your Custom Form has cache disabled.
One thing to point out here for you to check:
"It has an upload feature ( folder where these documents are uploaded to doesn't have public read)"
I assume this folder has Public write access? Then, removing 'read' access permissions won't stop Public users from download files directly if they have the absolute url.
Also. what happens if someone uploads a document with the same name as a previously uploaded document? I assume matrix provides a message like this?
Unable to create file with name "filename here", web path already exists? [CORE0086]
Hey Alex thanks heaps for the reply!
No no trigger was on the form at all and submission and public urls are the same.
My question re trigger was should I have one on the form - by the looks of your response it wouldn’t be a good idea.
Re the upload facility public read and webpaths had already been removed - taking no chances there! From speaking with Nic I assumed that public would need access to the folder - but this is not the case.
Regarding disabling the cache for the form Are you suggesting just the cache manager here?
Hey Alex thanks heaps for the reply!
No no trigger was on the form at all and submission and public urls are the same.
My question re trigger was should I have one on the form - by the looks of your response it wouldn’t be a good idea.
Re the upload facility public read and webpaths had already been removed - taking no chances there! From speaking with Nic I assumed that public would need access to the folder - but this is not the case.
Regarding disabling the cache for the form Are you suggesting just the cache manager here and just disabling per node specific?
Not sure if you are saying you've already tried this, but I think turning off caching of Custom forms is the way to go. We had the same issue and it worked.
So right click cache manager > Type Code Specific > Pick Custom Form form the list > Caching Status Off
That way you don't need to set a new root node each time you setup a new form
ps. if you look at the request of the form in firebug, the response header should have 'Cache-Control max-age=0, public'
Thanks so much - we were just talking about this in our team meeting today - you have ESP!
Thanks all for the advice. I just wanted to add to that after talking to our unix guru I was wrong we did have apache caching layer infront of the public server. On checking the right headers were being sent. After a test on a form and adjusting the cache settings the right headers were sent.