Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As noted in http://drupal.org/node/644150#comment-2322222 currently the cache is written two times when form caching is activated and the form is rebuilt. I've re-rolled the patch from the linked issue making sure it only caches if we are not rebuilding.
If we rebuild, we cache nevertheless inside the rebuild function. But with a new form-build-id.
Also the code contained a needless !empty(), which is cleaned up as we have default values for that now.
Comment | File | Size | Author |
---|---|---|---|
#4 | form-state-cache.patch | 2.16 KB | fago |
form-state-cache.patch | 2.13 KB | fago | |
Comments
Comment #1
sunNow we need to put back in the additional isset($form_build_id) condition, because we don't have one in the batch scenario.
This review is powered by Dreditor.
Comment #2
fagoYep, I've seen that and noted before:
If we'd like to fix caching for that case, we should use $form['#build_id'] - but there is no $form...
Comment #3
sunRight, so let's just prepend isset($form_build_id) to the elseif condition and we're done, I think. Curious to see whether the new multi-step form storage tests will still pass with this patch then.
Comment #4
fagook done so. Why shouldn't they pass?
Comment #5
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.