Index: hierarchical_select.module =================================================================== --- hierarchical_select.module (revision 915) +++ hierarchical_select.module (working copy) @@ -294,6 +294,9 @@ function hierarchical_select_json() { // Collect all necessary variables. $cached = cache_get($hs_form_build_id, 'cache'); $storage = $cached->data; + if (!$storage) { + $storage = $_SESSION['hierarchical_select_js']; + } // Ensure that the form id in the POST array is the same as the one of the // stored parameters of the original form. For 99% of the forms, this step @@ -734,6 +737,7 @@ function hierarchical_select_after_build // render part of the form). $hs_form_build_id = 'hs_form_'. md5(mt_rand()); cache_set($hs_form_build_id, $storage, 'cache', time() + $expire); + $_SESSION['hierarchical_select_js'] = $storage; } elseif (isset($_POST['hs_form_build_id'])) { // Don't generate a new hs_form_build_id if this is a re-rendering of the