Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.265.2.10 diff -u -r1.265.2.10 form.inc --- includes/form.inc 13 Aug 2008 23:59:12 -0000 1.265.2.10 +++ includes/form.inc 31 Aug 2008 16:32:54 -0000 @@ -119,9 +119,8 @@ drupal_process_form($form_id, $form, $form_state); if ($cacheable && !empty($form['#cache'])) { // Caching is done past drupal_process_form so #process callbacks can - // set #cache. By not sending the form state, we avoid storing - // $form_state['storage']. - form_set_cache($form_build_id, $original_form, NULL); + // set #cache. + form_set_cache($form_build_id, $original_form, $form_state); } } @@ -139,7 +138,7 @@ // the form, passing in the latest $form_state in addition to any // other variables passed into drupal_get_form(). - if (!empty($form_state['rebuild']) || !empty($form_state['storage'])) { + if (!empty($form_state['rebuild']) || (!empty($form_state['storage']) && !empty($form_state['submitted']) && !form_get_errors())) { $form = drupal_rebuild_form($form_id, $form_state, $args); }