Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2008 at 12:56 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damien tournoud commentedThis change is long overdue. I discussed it with chx a while ago, and we have his agreement on that.
The behavior implemented by the patch is: "the form is cached if any of its element set #cache to TRUE". It means that setting #cache to FALSE don't have any effect whatsoever. That's only a DX patch.
Comment #2
dropcube commentedThis is issue is breaking the normal behavior of the Form API. The patch is simple and fixes the issue, please commit it ;)
Comment #3
webchickD'oh. :P That looks like a brain-o. :P
Ran all tests, no failures. Committed to HEAD. Setting back for consideration in 6.x.
Comment #4
chx commentedYay for the patch. Nay for the implementation. !empty is your friend.
Comment #5
chx commentedPatchy.
Comment #6
webchickThanks, reverted the patch in #0 and committed #5 to HEAD. The one in #5 should apply to 6.x without a problem.
Comment #7
gábor hojtsyGreat, committed #5.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #9
bzzz commentedHere is the situation:
$form['#cache'] = FALSE; ('#type' = 'form')
but one of the elements have
$form['#cache'] = TRUE
therefore FormAPI changes #cache of whole form to TRUE! Why??
I don't want to cache this form! I told FormAPI not to cache this form!
But someone else add another element to form. And by the way decided to enable cache for this element.
I think we should switch #cache to true only if this parameter isn't set at all.
Comment #10
KingMoore commentedI can't get my forms to not cache no matter what I do (if I have drupal caching enabled). #cache doesn't seem to be documented? Am I missing something?
Comment #12
MantasK commentedI was searching for something else and found this. It is old but maybe somebody is going to find it useful.
In d6 I also had some issues with cached forms and validation.
I solved problem by implementing: