Hey there,

I think the title should pretty much explain the issue, but anyway:
- have a view with an HS-powered exposed filter
- the exposed filters are in a block (view setting)
- AJAX is enabled in the view

Basically, when the page first loads, it works perfectly, it loads the results using AJAX and everything seems fine. Only if I try to edit the category of the HS exposed filter now, it doesn't react at all..

If I have the exposed filters inside the view, not in a block, then this issue doesn't come up.

I assume it's some JS hook on load of the data that breaks the HS or something (or doesn't re-load it)..

Hope this is helpful.

Cheers

CommentFileSizeAuthor
#2 views-block-ajax-1163614-2.patch565 byteskevin.dutra

Comments

vlooivlerke’s picture

I have the same problem.
Funny enough if you page the view in Ajax it fix HS (when it reloads)

Edit - Adding a Reset button in the view also breaks HS

kevin.dutra’s picture

Version: 6.x-3.7 » 6.x-3.x-dev
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new565 bytes

It's been a long while, but I ran into the same issue, and here's a patch.

This problem lies with the "updatesEnabled" flag in Drupal.settings.HierarchicalSelect.settings[...]. When the page is first loaded, this flag is initialized to TRUE for each widget. When the Views exposed filter form is submitted, the HS settings array is refreshed by merging new settings with the current settings.

Drupal.HierarchicalSelect.ajaxViewPagerSettingsUpdate = function(target, response) {
  $.extend(Drupal.settings.HierarchicalSelect.settings, response.hs_drupal_js_settings);     <----
  Drupal.attachBehaviors($(target));
};

The settings in the response will never include the "updatesEnabled" flag and this version of the jQuery extend function is not recursive, so that flag always gets wiped out.

I've adjusted the call to extend to be recursive, so that the flag remains set at whatever value it already has.

gold’s picture

Status: Needs review » Closed (won't fix)

Tidying up the issue queue. The 6.x version is no longer supported. Only reopen this if it also applies to the 7.x.