After discovering the cause of that problem in #266960, I sneaked around all this functions and I was doing tests with a views filter form. I discovered this issue observing the "cache" table, since the hs_form_build_id was not disappearing after submitting the filter.

The #submit function does not affect in filter view, I had tested it.

The bad of this is that the "cache" table can get very big, if you have a great quantity of users, views filters allowed for anonymous users, web crawlers that do searching in your site, and many other situations, lowering performance considerably.

Comments

wim leers’s picture

Category: bug » task
Status: Active » Postponed (maintainer needs more info)

Are you sure? Then this is a Drupal core bug, because:

/**
 * Hierarchical select form element type #after_build callback.
 */
function hierarchical_select_after_build($form, $form_values) {
  // …

  // Pass the hs_form_build_id to a custom submit function that will clear
  // the associated values from the cache.
  $form['#submit']['_hierarchical_select_submit'] = array($_POST['hs_form_build_id']);

  return $form;
}


/**
 * Hierarchical select form element #submit callback.
 */
function _hierarchical_select_submit($form_id, $form_values, $hs_form_build_id) {
  // Delete the stored form information when the form is submitted.
  cache_clear_all($hs_form_build_id, 'cache');
}
wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Closing while cleaning up the issue queue. Feel free to reopen.