Hello,

I'm trying to load a view with exposed filters (ajax enabled) inside a modal window.
The first time when I open the modal windows, the exposed filters works ok, but if I close the modal and open again the exposed filters doesn't work anymore (no errors, just doesn't filter anymore).

I'm using

function mymodule_modal_add($js = NULL) {
  if ($js) {
    ctools_include('modal');
    ctools_include('ajax');
    $output = views_embed_view('add_car');
    ctools_modal_render(t('Add car'), $output);
  } else {
    return MENU_ACCESS_DENIED;
  }
}

Can anyone tell me what I'm doing wrong? Is possible what I'm trying to do?

Thanks.

Comments

juanramonperez’s picture

When I try to filter the second time I get the following error in Chrome console

Uncaught TypeError: Cannot read property 'top' of null ajax_view.js:131
Drupal.ajax.commands.viewsScrollTop ajax_view.js:131
Drupal.ajax.success ajax.js:400
ajax.options.success ajax.js:164
c.success jquery.form.js:11
f.resolveWith jquery.min.js:16
v jquery.min.js:16
c jquery.min.js:16
juanramonperez’s picture

Status: Active » Closed (won't fix)
nithinkolekar’s picture

Issue summary: View changes
Status: Closed (won't fix) » Closed (duplicate)
Related issues: +#1809958: Views with exposed filter (ajax enabled) inside modal window (ctools)

won't fix would be misleading, as there is a active issue with a patch to review.