Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
mansspams CreditAttribution: mansspams commentedActually moving myself as I start to read HS code and see familiar "help-text" string.
Comment #2
mansspams CreditAttribution: mansspams commentedI 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.
Comment #3
desica CreditAttribution: desica commentedI'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!
Comment #4
Wim Leers#2: that's impossible. Plus, there's nothing wrong with using custom AJAX commands.
Comment #5
unic CreditAttribution: unic commentedThe 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.
Comment #6
Wim LeersI'd move it back to the @font-your-face project's issue queue in that case. AFAICT, HS is not doing anything wrong.
Comment #7
mansspams CreditAttribution: mansspams commentedMoving.
Hi @font-your-face maintainers, could you look into this issue?
Comment #8
sreynen CreditAttribution: sreynen commentedThis 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.
Comment #9
chefnelone CreditAttribution: chefnelone commentedSame problem here. Did anyone find a fix to this?
Comment #10
stayontherun CreditAttribution: stayontherun commentedsubscribe
Comment #11
ronin17 CreditAttribution: ronin17 commentedDoes anyone have a patch or workaround for this issue?
Thanks!
Comment #12
unic CreditAttribution: unic commentedI think you may disable @font-your-face and integrate google font manually. Let us know in case of success.
Comment #13
captainpants CreditAttribution: captainpants commentedThis 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.
Comment #14
A.Kotov CreditAttribution: A.Kotov commentedHave 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.
Comment #15
GoldIs 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.