The second level fails to load and fade in after the ajax request finishes. If I turn off jQuery Update it works fine. It would be nice if the animations were optional as well. I will try to patch this if I can trace it back.

Additionally, it works fine in admin, just not on the front end as a taxonomy ref field of a profile2 on registration.


joelpittet’s picture

Just an update, the issue is happening starting in this function

Drupal.HierarchicalSelect.postUpdateAnimations(hsid, updateType, lastUnchanged, function() {

Chrome is returning:
Uncaught TypeError: Property '#<Object>' of object #<Object> is not a function

Firebug is returning:
jQuery.easing[specialEasing || defaultEasing] is not a function

joelpittet’s picture

Ok, I think I got it.

Seems jquery UI is not loading, so it's trying to use show() from jquery which has different syntax than jQuery UI show effect. The reason why UI is not loading is because of the way jQuery Update replaces the UI libraries with the CDN of all minified.

And since system's effects library doesn't depend on system ui library, the CDN doesn't get added.

So to get this to work, prepend to _hs_process_attach_css_js

Line 379 of hierarchical_select.module

  $element['#attached']['library'][] = array('system', 'ui');


Or add this to a themename_preprocess_html()...

	  drupal_add_library('system', 'ui');
dgastudio’s picture


David_Rothstein’s picture

Version: 7.x-3.0-alpha5 » 7.x-3.x-dev
Status: Active » Closed (won't fix)

Nice find. It took me a while to understand, but I think that means the problem is in jQuery Update module, not here, right?

Hierarchical Select shouldn't be adding jQuery UI core because it doesn't have a dependency on that, and it's not a good idea to wastefully load that JavaScript for all sites when it's not being used.

This is something jQuery Update needs to take care of when a CDN is being used, so I posted a patch at #1801388: When a CDN is used, the jQuery UI Effects library never gets added unless the jQuery UI core library is added also which solves the issue for me. Tentatively marking this one "won't fix".

TBarina’s picture

After patching hierarchical_select.module as per #2 i get the following error when using hierarchical_select:
Warning: file_get_contents(sites/all/modules/jquery_update/replace/ui/ui/jquery.effects.drop.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of /var/www/drupal_lr/includes/

Also patching JQuery Update as per #4 doesn't fix the problem when not using CDN.
Many thanks in advance.

martichka5’s picture

Same problem here. I use the 7.x-2.3+15-dev version of the module and the second patch from #4 link is applied already in the module but the problem still exists.