Hi, there is a conflict between @font-your-face (@FYF) and Hierarchical Select (HS). I open issue here first and if this is not a problem of @FYF, we can move it over to HS.

I narrowed it down to line below. HS also does some ajax.

$commands[] = ajax_command_prepend('head', $vars['styles']);

Problem represents itself as permanent windows wait cursor and new HTML of empty div below HS widget <div class="help-text><div>

Comments

mansspams’s picture

Project: @font-your-face » Hierarchical Select
Version: 7.x-2.2 » 7.x-3.0-alpha5
Component: Code (general) » Code - Content Taxonomy

Actually moving myself as I start to read HS code and see familiar "help-text" string.

mansspams’s picture

I guess hierarchical_select_ajax() needs to use http://api.drupal.org/api/drupal/includes!ajax.inc/function/ajax_command... instead of it's own code.

desica’s picture

I'm having the same problem! I need both modules. Is there a solution to this. Please help, my site is ready for launching, last thing I did was applying some fonts with Font Your Face and now my HS elements stopped working. Thanks!

Wim Leers’s picture

Component: Code - Content Taxonomy » Code - Taxonomy
Status: Active » Closed (works as designed)

#2: that's impossible. Plus, there's nothing wrong with using custom AJAX commands.

unic’s picture

Status: Closed (works as designed) » Active

The issue was closed with "works as designed". But does "permanent windows wait cursor" really designed? Can you tell which component responsible for the issue? It's critical for me. Thanks.

Wim Leers’s picture

I'd move it back to the @font-your-face project's issue queue in that case. AFAICT, HS is not doing anything wrong.

mansspams’s picture

Project: Hierarchical Select » @font-your-face
Version: 7.x-3.0-alpha5 » 7.x-2.x-dev
Component: Code - Taxonomy » Code (general)

Moving.

Hi @font-your-face maintainers, could you look into this issue?

sreynen’s picture

Title: fontyourface_ajax_render_alter() conflicts with Hierarchical Select » Hierarchical Select fails on standard AJAX commands added with hook_ajax_render_alter()
Project: @font-your-face » Hierarchical Select
Version: 7.x-2.x-dev » 7.x-3.0-alpha5
Component: Code (general) » Code

This seems to be an issue with this line in hierarchical_select.js:

Drupal.ajax.prototype.commands[response[i]['command']](this, response[i], status, hsid);

That line is calling every command passed in the AJAX response, which is fine when Hierarchical Select is controlling the entire AJAX response, but has problems when other modules (e.g. @font-your-face) extend the AJAX response with calls to standard Drupal.ajax commands.

That becomes a problem because Drupal.ajax commands assume the first parameters of the command is Drupal.ajax, or something that extends Drupal.ajax. But Hierarchical Select is making AJAX requests with $.ajax, which lacks functions defined in Drupal.ajax.

Summary: Drupal.ajax commands assume they are being called in the context of a Drupal.ajax request and fail when being called in the context of the $.ajax requests Hierarchical Select uses.

I think to solve this, Hierarchical Select needs to either change the success function to only call its own commands, guaranteed to work in the $.ajax context, or use Drupal.ajax or an extension of Drupal.ajax to make AJAX requests in the context the standard AJAX commands expect. The first option seems simpler, but it would bypass Drupal's AJAX extensibility. The second option is probably more complicated to implement, but would maintain AJAX extensibility.

I'm moving this back to the HS queue, as I believe it can only be solved by modifying HS code. That said, if anyone sees a solution we could implement in the FYF code, I'd be happy to investigate further.

chefnelone’s picture

Same problem here. Did anyone find a fix to this?

stayontherun’s picture

subscribe

ronin17’s picture

Does anyone have a patch or workaround for this issue?

Thanks!

unic’s picture

I think you may disable @font-your-face and integrate google font manually. Let us know in case of success.

captainpants’s picture

This is still an issue.

I find it odd that the preview in the widget type page works before you save the widget as hierarchical select, but if you go back to this page after saving it, the preview won't work.

A.Kotov’s picture

Issue summary: View changes

Have the same problem.
I bind classic ajax request on "change" of terms.
Since i start change the parent term - my ajax not stops working.
But if some other ajax action triggered on other field, ajax on hierarchical select field - start working again.
It looks like it is possible to bypass this issue, if make js code trigger ajax request from another field.
Something like fake mouse click on other field.

Gold’s picture

Status: Active » Closed (outdated)

Is this still an issue? I'm not convinced I can replicate the issue and both codebases have move a long way in the 4 years since the last comment.

If so, could someone please reopen and update the description with detailed steps to reproduce. Preferably start with a clean install of D7 from the Standard profile.