Commit e4b01a0d authored by dawehner's avatar dawehner Committed by tim.plunkett

Issue #1801376 by dawehner | tim.plunkett: Fixed HTML IDs are being...

Issue #1801376 by dawehner | tim.plunkett: Fixed HTML IDs are being incremented across AJAX requests.
parent 9198a460
......@@ -809,6 +809,12 @@ function views_ui_build_form_url($form_state) {
* together.
*/
function views_ui_ajax_form($js, $key, ViewUI $view, $display_id = '') {
// Reset the cache of IDs. Drupal rather aggressively prevents ID
// duplication but this causes it to remember IDs that are no longer even
// being used.
$seen_ids_init = &drupal_static('drupal_html_id:init');
$seen_ids_init = array();
$form = views_ui_ajax_forms($key);
if (empty($form)) {
return MENU_NOT_FOUND;
......
......@@ -1428,6 +1428,12 @@ public function buildEditForm($form, &$form_state, $display_id = NULL) {
* Provide the preview formulas and the preview output, too.
*/
public function buildPreviewForm($form, &$form_state, $display_id = 'default') {
// Reset the cache of IDs. Drupal rather aggressively prevents ID
// duplication but this causes it to remember IDs that are no longer even
// being used.
$seen_ids_init = &drupal_static('drupal_html_id:init');
$seen_ids_init = array();
$form_state['no_cache'] = TRUE;
$form_state['view'] = $this;
......@@ -1590,6 +1596,12 @@ public function submitDisplaysReorderForm($form, &$form_state) {
* rather than closing the ajax popup.
*/
public function addFormToStack($key, $display_id, $args, $top = FALSE, $rebuild_keys = FALSE) {
// Reset the cache of IDs. Drupal rather aggressively prevents ID
// duplication but this causes it to remember IDs that are no longer even
// being used.
$seen_ids_init = &drupal_static('drupal_html_id:init');
$seen_ids_init = array();
if (empty($this->stack)) {
$this->stack = array();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment