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.
Problem/Motivation
Very strange problem, that I'm not sure how to even start truly troubleshooting.
When I try to add a relation to a taxonomy term with the Hierarchical Select interface, I get this error in Chrome's console:
That results in the page just sitting there, trying to load the ajax response, or something. Now, the really odd thing, is that this only happens on my Acquia Dev Cloud server. The copy of the site I have on my local machine works just fine. The only difference between the two, is what computer they are on. My Co-Worker has the same experience. So, any suggestions on how I can troubleshoot/fix this?Uncaught TypeError: Object #
has no method 'getEffect' Drupal.ajax.commands.insert ajax.js:482 Drupal.HierarchicalSelect.update.ajaxOptions.success hierarchical_select.js:561 c.extend.handleSuccess jquery.js:143 c.extend.ajax.w.onreadystatechange jquery.js:142
Comment | File | Size | Author |
---|---|---|---|
#46 | error.png | 28.86 KB | UmarSharif |
#39 | hierarchical_select-uncaught_type_error-1372300-39.patch | 1.98 KB | Georgique |
#36 | hierarchial_select-1372300-uncaughttypeerror-36.patch | 2.5 KB | willieseabrook |
#32 | hs-1372300-32.patch | 3.58 KB | OnkelTem |
#24 | hierarchical_select-no-method-geteffect-1372300.patch | 842 bytes | kwabi |
Comments
Comment #1
schmidtk CreditAttribution: schmidtk commentedJust to provide some more information (We're still having this problem), Firefox provides a slightly different error message:
ajax.getEffect is not a function
http://www2dev.lanecc.edu/misc/ajax.js?v=7.10
Line 482
Comment #2
dgastudio CreditAttribution: dgastudio commentedsame here
Comment #3
grafik CreditAttribution: grafik commentedsame here
Comment #4
Barry_Fisher CreditAttribution: Barry_Fisher commentedI too am getting the Firefox error as described in comment #1.
Trying to debug, but like you say- difficult knowing where to start.
I can also confirm that this appears to be server specific so I'm going to see if there are any settings that may be causing this.
Comment #5
di3gopa CreditAttribution: di3gopa commentedSame here, and only happens with anonymous user, looks like the response is empty
Comment #6
di3gopa CreditAttribution: di3gopa commentedJust found that this happens to me when i have more that one form on the same page using hierarchical select, just like this bug on d6 -> http://drupal.org/node/541132
Comment #7
chefnelone CreditAttribution: chefnelone commentedI have the same problem. Is there any patch to fix this?
Comment #8
chefnelone CreditAttribution: chefnelone commentedComment #9
camdarley CreditAttribution: camdarley commentedSame problem for me.
I would like to use it for taxonomy based media folders, with media and media browser plus modules.
There is two pages to edit media: one for edit single media, and an other to edit multiple medias on the same page.
The widget works well in the first case, but i have an ajax error in the second. That seems to confirm #6.
Comment #10
joelpittetI have been working on a problem very similar, this may help:
http://drupal.org/node/1536230
Comment #11
camdarley CreditAttribution: camdarley commentedI try to add
$element['#attached']['library'][] = array('system', 'ui');
at line 379 of hierarchical_select.module but it still doesn't work.Thanks anyway.
Comment #12
jdflorez CreditAttribution: jdflorez commentedTo the people having issues, do you have Jquery Update installed? As joelpittet pointed out, most likely is an issue with this module.
Edit: I have two hierarchical selects (different fields, different vocabularies) in two forms that load on the same page. This problem persists.
Comment #13
dgastudio CreditAttribution: dgastudio commentedi have disabled jquery update module
the problem still exists...
Comment #14
jdflorez CreditAttribution: jdflorez commentedI have this error with two forms using hierarchical select displaying on one page. Are you doing something similar?
Comment #15
dgastudio CreditAttribution: dgastudio commentedno. but really strange..
due to error in db, i have copied all file systems of my drupal installation to new one.
i have create a new db.
enabled SAME modules.
moved all content from old site.
moved all views.
moved ALL fields.
moved everything, that can be movable, with Features
HS works perfectly.
------------
Comment #16
jdflorez CreditAttribution: jdflorez commentedOk, I have this situation. Using profile2 and profile2 regpath, I have created two registration forms for different profiles. I created a block with the registration form for each one and placed them in the same page. Both of them have a term reference field and I'm using hierarchical select to display them.
Hierarchical select doesn't work in any of the two forms. It seems that when two forms (that are displayed on the SAME page) use hierarchical select for a field, it breaks because it doesn't discriminate in which form the field is, or something like that. (I deduct this because visually when I use one of the hierarchical select, the other one disappears, neither shows up again and the error has no method 'getEffect' happens).
Any ideas/help would be appreciated
Comment #17
david.gil CreditAttribution: david.gil commentedHi, more info,
it is happening to me too, but the problem is that it only happens in production servers, with the same database and code in one server it is happening and not in other. We are using Acquia Servers, so more or less all is the same, the only difference is that production servers are load balanced and pre-production not.
It seems that all the JS files are the same and loaded in the same order, so no idea why it happens in one machine and not in the other.
Ah!, and i only have one form in the page.
Any idea to test?
David
Comment #18
david.gil CreditAttribution: david.gil commentedMore info,
if i add this, as said in:
http://drupal.org/node/1536230
$element['#attached']['library'][] = array('system', 'ui');
The JS error not appears, but it seems that the AJAX callback is not working.
Comment #19
david.gil CreditAttribution: david.gil commentedHi,
We have detected why it is not working in Acquia Servers, yesterday we activate "New relic" service and it is adding code to the ajax callbacks, i attatch an screenshot. At least the problem for us is that.
We open a ticket in acquia to ask to solve it, if you are using new relic you must disable it and this works again.
Best!
David
Comment #20
Wim LeersSo was everybody who had this problem using New Relic?
Or did some of you maybe use jQuery Update at some point but then not clear the CSS/JS cache to check if that was the problem?
Neither of the above necessarily imply a bug.
Comment #21
schmidtk CreditAttribution: schmidtk commentedProblem stopped happening for us when we left Acquia, which lends weight to the New Relic theory.
Comment #22
acolyte26 CreditAttribution: acolyte26 commentedI am also running into the same problem. Has anyone found the cause of the problem? and are there any patch or solution?
Comment #23
gleroux02 CreditAttribution: gleroux02 commentedI can also confirm this issue. I am using drupal 7.14 with its standard jquery 1.4.4. The scenario where I am seeing this error is such. I have a content type that has a taxonomy reference field that uses HS as its widget. On the same content type I have a media field. The media types also have a taxonomy reference field that uses HS as its widget. When editing a media item from the content type, the edit form loads via a ctools modal. When trying to add a taxonomy item onto the media item in the modal I receive the following error:
And the page ends up hanging.
I should also note that it is the same taxonomy reference field on the media type and the content type, which could be contributing to the issue. I also have not tried seeing what would happen with two different fields that use HS on the same content type. I will try this and respond back with the results.
Comment #24
kwabi CreditAttribution: kwabi commentedI think I have nailed this show stopper. Here is a patch that should be used in conjunction with the patch I submitted against the ajax.js file in drupal core. http://drupal.org/node/1702132#comment-6280122 or http://drupal.org/node/1702132#comment-6280242 which is just a well structured one - coding guidelines adherence
Please review and advise.
Comment #25
kwabi CreditAttribution: kwabi commentedschedule for testing
Comment #26
samhassell CreditAttribution: samhassell commentedWe are suffering from the same issue since the move to Acquia Dev Cloud. This was working under pretty standard conditions on Ubuntu and Centos servers previously.
As described in #24, the ajax.js patch and the one posted here appear to fix the problem.
NOT marking RTBC coz I don't understand the full technical implications of the patch.
Comment #27
sabsbrain CreditAttribution: sabsbrain commentedHave applied #24 to the latest DEV version of the module and Drupal 7.15
HS is now updating wonderfully.
I'm going to mark this as reviewed and tested and against DEV since thats the version I used.
Comment #28
iMiksuI have same problem in same context:
#24 didn't worked out for me in version 7.x-3.0-alpha5+9-dev.
After patching the module, I have now this error when using select dropdowns:
Uncaught TypeError: Property 'undefinedToggle' of object [object Object] is not a function
Comment #29
Anonymous (not verified) CreditAttribution: Anonymous commentedThese patches need to get RTBC....as it stands the module is useless without them. This module is incredibly useful on ecommerce packages, and these patches, plus the error messages really need to be committed at this point. I wish the core patch wasn't necessary, I don't see that getting into drupal without a serious push.
This module is too awesome to let dwindle away!
Comment #30
cesarmiquel CreditAttribution: cesarmiquel commentedWe were having this exact same problem and it turns out it was an issue with @font-your-face. Its already reported. See here: http://drupal.org/node/1887066 which is a duplicate of: http://drupal.org/node/1481566.
So.. if you are seeing this issue try disabling @font-your-face and if it works then look into a workaround. That's what we did because patching core is out of the question for us.
I'm mentioning this because since this two bugs were not related we spent significant time to realize the issue was incomaptability with @font-your-face.
Comment #31
OnkelTem CreditAttribution: OnkelTem commentedSame here. But my context is different. This happens with a Term Reference field with HS widget, when added via CTools page manager to any Panel.
Comment #32
OnkelTem CreditAttribution: OnkelTem commentedThis patch fixes and provides:
Related to the issue:
Theming:
Comment #33
antonimo CreditAttribution: antonimo commentedHey, guys.
today faced with a similar problem.
In fact, not missing a couple of libraries and a small problem with the address of Ajax request.
About the address I still do not understand why this happens, but it is.
solution (webform_custom_component must replaced on your module name):
Comment #34
Wim Leersantonimo: please learn how to use the issue queue :)
Comment #35
antonimo CreditAttribution: antonimo commentedCreate new module and use it code
Don't forget replace webform_custom_component on your module name
Comment #36
willieseabrook CreditAttribution: willieseabrook commentedI experienced this issue on 7.x-3.0-alpha6 and 7.x-3.x-dev using a term reference field.
Patch by OnkelTem in #32 was fundamentally good but not longer applied. Tweaked and rerolled against 7.x-3.x-dev
Fixes the issue for me.
Comment #37
Georgique CreditAttribution: Georgique commentedI've reworked patch in #36 against alpha10, seems it works nice. Will upload it soon.
Comment #38
BertVK CreditAttribution: BertVK commentedI applied patch #36 to alpha10 manually but now I get the Drupal message right above the HS element saying the data has been saved every time I select an item from the lists.
The site I'm using this module in is multi language (i18n). When I use a non-English language I get the message. When using the site in English I do not get the message.
Comment #39
Georgique CreditAttribution: Georgique commentedThis is reworked patch against the latest dev.
It works well on my project. Let's see what community will say.
Comment #40
mErilainen CreditAttribution: mErilainen commentedFixes my problems also. I will leave the code review for someone else, since I'm not a JS guru.
Comment #41
stefan.r CreditAttribution: stefan.r commentedComment #44
stefan.r CreditAttribution: stefan.r commentedComment #46
UmarSharif CreditAttribution: UmarSharif commentedi am getting same error, after uploading bulk files using "plupload" module.