Closed (fixed)
Project:
Hierarchical Select
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Reporter:
Created:
5 Jun 2008 at 09:09 UTC
Updated:
3 Aug 2009 at 08:33 UTC
Jump to comment: Most recent file
Comments
Comment #1
iub98 commentedI have the same exact issue. I'd love some clues on where to check for a problem. Thanks!
Comment #2
wim leersThat's a serious issue. I assume both of you are using the latest dev tarball?
I'll need a list of non-core modules from the both of you, because I'm 90% sure that another module is conflicting with HS.
Comment #3
iub98 commentedYes, I'm using the latest dev tarball. I have a huge list of modules. Do you want all of them, or only the ones that are activated?
Comment #4
wim leersOnly the ones that are activated, please!
Comment #5
nchase commentedHmm, 1 Day after I supplied the list here to help the community to improve, 2 of my sites got hacked. I don't know if this is a coincidence but somehow it goes quit well together.
Comment #6
wim leersOk. You can imagine that I will *not* install all these modules to find out which one is causing this. You can wait for iub98's list of installed modules and then compare them. But if you want a faster solution, you'll have to disable the modules yourself to find the culprit (use the binary search principle!).
Comment #7
wim leersWow! I hope you had backups!
If you weren't using it already, you should use the Update Status module, it can warn you for security updates.
Comment #8
iub98 commentedHere you go. I dsiable both Curvey Corneys and Nifty Cube and had the same result...disappearing boxes. I re-enabled them.
email
feildgroup
image
number
option widgets
text
Page Title
comment
forum
help
menu
path
profile
statistics
throttle
tracker
upload
basic event
event
event all day
event views
event repeat
Hierarchical Select
Hierarchical Select View Taxonomy
image
image attach
image gallery
imagecache
image assist
upload image
Privatemsg
node profile
automatic nodetitles
avatar selection
curvey corners
custom error
favorite nodes
pageroute
pageroute nodefamilies
pageroute UI
flag content
guestbook
IMCE
logintoboggan
Niftycube
Pathauto
search config
subform element
troll
webform
Comment #9
chaps2 commentedI have the same issue and can offer the following in the hope that it helps:
I have selected to have one of several vocabularies controlled by HS. On the node add form the js code in hierarchical_select.js expects there to be a form with id 'hierarchical-select-0-wrapper' - but there isn't. The element with that id is a div within the form with id 'node-form'. As an experiment I did try the following patch which got me as far as the second level select box but there was more trouble after that...
Comment #10
wim leersCould somebody with this problem give access to his server, either SSH or SFTP?
Comment #11
chaps2 commentedI'm willing to investigate further if you have any suggestions of where to look.
Comment #12
wim leersPossibly depends on http://drupal.org/node/259077#comment-894977.
Comment #13
wim leersI'm actually pretty sure now this is fixed thanks to #259077. Please mark as "active" again if it turns out to NOT be fixed, or I won't see the issue!
Comment #14
chaps2 commentedI still get this with the latest dev released dated June 26. The cause still seems to be that the selector
$('form[#hierarchical-select-' + hsid +'-wrapper]', Drupal.HierarchicalSelect.context)on line 251 of hierarchical_select.js doesn't evaluate to anything so the array of form values in the subsequent AJAX post doesn't contain a form_id.Comment #15
wim leersWhich browser are you using? This has been verified to work in FF2/3, Safari 2/3, IE6/7. Konqueror was problematic with HS2 and will probably continue to be so now.
Comment #16
chaps2 commentedI'm using FF2 and Safari 3 on a Mac. I've got the latest JQuery update module which includes jquery.js version 1.2.6. When I change the selector to use :has() I get the second drop down with animation but then an endless run of js errors that look like this (from firebug):
Comment #17
wim leersThere you go. I specifically state in the README that you have to use jQuery 1.x. jQuery Update 2.x is NOT backwards-compatible!
Comment #18
chaps2 commentedSo you do... please accept my sincere apologies!
Comment #19
wim leersAccepted ;) :)
Please see http://drupal.org/node/203055#comment-897511!
Comment #20
chaps2 commentedBack to duplicate - see comment 13.
Comment #21
wim leersComment #22
SteveK commentedreceiving the same error. The JSON Post returns:
After clicking "Add" the layout changes drastically so I refresh and receive this error:
I'm using a form override to fork my forms to a separate TPL file for theming and using drupal_render() to output the select fields. The forms work fine when I revert back to the original forms.
Comment #23
SteveK commentedrendering the rest of the
$formelements fixes the problem. I'm interested in an explanation if you have the time to answer :) Thanks.Comment #24
wim leersHow were you using drupal_render() exactly?
Comment #25
wim leersPlease mark the issue as active again whenever you reply or I won't notice it! :)
Comment #26
thedosmann commentedI hate to jump in here but I have the same issue. Same error/versions etc.
Code is stopping here
jQuery.fx.step[attr] = function(fx){ //////with undefined color in
js is showing errors
if (Drupal.settings.admin_menu.margin_top) {
in admin_menu.js
jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
jQuery.fx.step[attr] = function(fx){
in effects core.js
I've disabled several modules...no help
debugging steps starts looping at
if (typeof window.jQuery == "undefined") {
2 window.undefined = window.undefined;
3 var jQuery = function (a, c) {if (a && typeof a == "function" && jQuery.fn.ready && !a.nodeType && a[0] == undefined) {return jQuery(document).ready(a);}a = a || document;if (a.jquery) {return jQuery(jQuery.merge(a, []));}if (c && c.jquery) {return jQuery(c).find(a);}if (window == this) {return new jQuery(a, c);}if (typeof a == "string") {var m = /^[^<]*(<.+>)[^>]*$/.exec(a);if (m) {a = jQuery.clean([m[1]]);}}this.set(a.constructor == Array || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType ? jQuery.merge(a, []) : jQuery.find(a, c));var fn = arguments[arguments.length - 1];if (fn && typeof fn == "function") {this.each(fn);}return this;};
4 if (typeof $ != "undefined") {
5 jQuery._$ = $;
Finally breaks loose
Watchdog
uasort() [function.uasort]: The argument should be an array in /home/webadmin/test.com/html/includes/common.inc
call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in /home/webadmin/test.com/html/includes/form.inc on line 218.
Missing argument 1 for drupal_retrieve_form() in /home/webadmin/test.com/html/includes/form.inc on line
179.
It looks like the $form is not getting passed the js vars or some js lib is not being passed but at the moment I'm stuck. If you don't have a clue I guess I'll start unplugging modules to see if there is a conflict.
Would formfilter be the culprit? Just a stab in the dark but I'll unplug that first..
If you have a direction let me know. I've tried everything I've found in the posts.
going in other then admin
You don't have Javascript enabled. Hover for more information! But don't worry: you can still use this web site! You have two options:
In ff it actually shows this as admin also
it works ..kinda ..but this is not the desired result.
could it be a untied knot to the theme....a3_atlantis:
I did add
// We need jquery included on all admin pages.
if (arg(0) == 'admin') {
drupal_add_js('misc/jquery.js');
}
to tempalate.php
I would assume adding this to the other .tpls would give the same results
It still looks as if js is not being pushed to frount.
In Hierarchical Select menu I get no errors and the preview works
Nothing in status looks off
Comment #27
wim leersPlease post your code (as a .zip or at drupalbin).
Comment #28
thedosmann commentedCode above? Too late for that.. If that's the protocol I didn't notice in reading posts in here but will do so in the future if that is what's needed. If your not referring to above please tell me how I can help you help me with this.
I have continued with troubleshooting -to no avail. If i disconnect module- error gone. If I enable -error is back. I've turned off most all non core, non required modules. The direction I'm looking at right now is the themes. I have tried some of the included themes -same error. But the js trail leads to jsquery not getting the form vars from the drupal side so I was thinking that the themes are not loading the js or are not loading them all. I may be way off but if you have another direction I should be looking at..please let me know. Meanwhile I'm lost in here at the moment.
One question I had was the views patch- I did that . But I'm showing this under views section in modules.
Hierarchical Select Content Taxonomy Views 5.x-1.x-dev
And this under the forms section
Hierarchical Select Content Taxonomy 5.x-3.0-rc6
Is this correct?
Comment #29
wim leersPlease check your status report to verify that the installation is correct.
Comment #30
thedosmann commentedLook at last line in #26
Comment #31
thedosmann commentedComment #32
thedosmann commentedLet me repeat this;
When I log in as non-admin I get
You don't have Javascript enabled. Hover for more information! But don't worry: you can still use this web site! You have two options:
In FF Using the update button will will bring up the child select box
Firebug still shows jQuery.fx.step is undefined but stepping thru will show the child box
IE will also show the child box using the updtae button and also gives same
You don't have Javascript enabled. Hover for more information! But don't worry: you can still use this web site! You have two options:
As admin I get the errors in #26 and child comes up with update buuton in FF
In IE the child box does not come up and I get the errors listed in #26
I tried to give the error trail as reported by firebug, watchdog , etc.
At this point, as much as I need this , it is proving too problematic, for myself.
I will continue to troubleshoot but I'll have to revert after today, I'm on a deadline with this.
It seems several folks have had this same issue, error, but for differant reasons. I just have'nt found the fix that applies to me. I did the weight fix, the views patch, etc. but to no avail.
Comment #33
wim leersthedosmann: could you give me access to this site? I'll see if I can find the cause. I assume you did try it on a page with no other JS, to ensure this isn't some sort of JS conflict?
You can send me the login info via my contact form.
Comment #34
thedosmann commentedmessages
Comment #35
thedosmann commentedmessages update
Comment #36
thedosmann commentedOk, for those that follow-- this turned out to be a combiation of a few things. First was a conflict with an email field that was altered after entry to hide from spam bots.
I just took that out and replaced with Privatemsg module which did what I was needing.
The other was a conflict with the drupal upload module. I was getting a button undefined after the other fix and I narrowed it down to that. I simply unplugged it.
But I needed the upload feature so I was supprised to see that the upload field was still there???? Not about to figure that one out at the moment , mabe the UC module?, but the select boxes are working as designed.
Except on the admin edit cotent and add content pages. It just greys out in IE. In FF it works in admin edit cotent and add content pages. Both work in edit category I'll track down that later but for now the user can select the category without a dropbox a mile long and segmented by parent-chid- chid. Now the select box will bring up each sub as it's parent is choosen.
Good Module. A little tricky, for me anyways, to get tied in to existing modules.
just a suggestion but it would be nice to have a search by date to filter out bugs and related bugs in global search. I found myself backtracking a number of times because of issues that were already fixed. But in the global search you have to really watch the date of the post or you will find yourself chasing your tail.
Comment #37
wim leersThis post is quite unclear to me, but it seems to me you got it solved.
When you still have problems, please report them.
Comment #38
Vuds commentedHi Wim,
I'm still having a lot of these errors as in #22, now that my site system is online and has been launched to public. Let's say that 2 from each 5 users have this problem some time in some form (it doesn't have a standard, it just happens "when it wants").
I've checked browser versions with my users but it's really aleatory (happens with FF, IE, Chrome - others browsers are not too much popular around here).
The symptoms are the same; Try to choose a value (usually from the second tree, but not a standard) and:
- it hides all the widget; OR
- it freezes all the widget (and doesn't even show the 3rd tree); OR
- it brings all the HS together (as I had reported before).
With any of the three, it always reports that 3 errors (missing argument, call_user_func_array() and uasort()).
I had tried to change weights as they said in this issue but it didn't help.
I was thinking if the Ajax part of the code has implemented some kind of timeout when trying to access the callback or something like that, just because it can freeze the widget and does not return anymore. Or if you could maybe implement any value check before calling /hierarchical_select_json.
Comment #39
wim leersVuds: you must have *something* on your site that causes this problem. It can't be HS itself, because if that were the case, then everybody would be reporting this problem. Also, in the logs of my own site, on which the demo is running, I don't see this problem.
You will have to provide more detailed reports. You'll have to try to narrow it down yourself, like thedosman did in #36.
Comment #40
Vuds commentedDid you test it with a big vocabulary? Or a big term table?
My main vocab has around 6K terms and it's the first position where errors occur more.
All the terms in my site are around 10K.
If you feel comfortable to try my site... Now I could see that if I just start playing a while with the HS widget it happens.
Comment #41
wim leersNo, but slow loading times cannot cause PHP errors.
Just to be sure, enable developer mode (open the .module and change the define() at the top from 0 to 1). You'll now see performance numbers.
Giving me access to your site would be very helpful.
Comment #42
Vuds commentedWell, I'll get a fresh copy of my site on my develop environment to try the developer module.
Could you say what permissions would you like to have to try my website? You can already access it, in the register page already have a "problematic" field. I'll send it in private (maybe you will have a language barrier, but to identify the field would be easy).
Just to know, you are saying that it is a PHP error, but I'm thinking if that isn't really a JS error... Since the error messages are relating (my view) that the callback is being called with no arguments informed...
Comment #43
Dimm commented6.x-3.x-dev
Boxes after a few clicks are gray and inaccessible.
Firebug show error:
common.inc - line 2740
On the next page I see:
Comment #44
Dimm commentedFirebug scren
Comment #45
Vuds commentedI've installed a copy on my develop environment.
The first thing that I could realize is that the bug in Chrome is related with the list size it has to load. If it needs to load a big sized list, in any hierarchy level, it hangs and the widget disappears from form. However, in the same field, lists that are short, with few terms, it handles ok until the end.
I'm still hunting more with IE and FF.
Comment #46
Vuds commentedThe same that occurs to Chrome is also valid to Safari 3. The widget disappears while loading a very long term list in any hierarchical level.
Comment #47
toemaz commentedI recently deployed rc6 on a Drupal 5 install and I encounter the exact same issue.
The php errors always come in 3:
I can reproduce these errors just by browsing to /hierarchical_select_json which returns { "cache": [ ], "output": null, "log": null }
I just started to investigate where these problems come from. Wim, if you are interested, I can give you access to my server. Contact me toemaz a t gmail d o t com
Comment #48
Vuds commentedOn IE6 (old version but there is too many people still using it), the error (widget freezes and the same 3 errors on the log showed) happens more frequently.
But I was thinking that the Safari's issue is a big one now, since there is millions of people around world using their iPhones and iPod Touchs, and some of them could try to use these widgets registering on sites like mine or just trying to update their Drupal blogs/websites.
Comment #49
Vuds commentedWith developer mode on, I'm getting error on JS: Console is undefined. Any browser.
Comment #50
toemaz commented@Vuds Be aware that with developer mode on (I suppose you mean devel module enabled and system output), that ajax callbacks will not work bc a chunk of extra system output is added to the return.
Comment #51
Vuds commentedI think I found my problem (and probably it's the problem for everybody)...
The HS settings in the "cache" table (cid = hs_form_ + generated md5), that controls HS behaviours of each field from each form, is always being inserted with the fixed expiring value of 2000000.
2000000 is the maximum value of cookie timeout from the last activity point (or if Drupal couldn't get that value, it would be added to 86400, meaning 24h time expiring); it should be added to time() value, because we need to count it from "now" (the moment the user is using the widget) to +2000000, but it's been used absolutely. 2000000 is less than the current Unix timestamp (that is around 1.229 trillion now), so the system considers this cache already expired when created.
It means that any module that calls clear_cache_all() to clean all "cache" table (inadvertently; because I understand that any module should clean up only its own mess, but there is modules that can clean all the table) will erase all HS data, letting user's forms orphans and consequently with troubles on them.
Updating line 643 of hierarchical_select.module like this:
should do the trick.
Comment #52
Vuds commentedAfter this one now, it just let us with only the Chrome/Safari problem: With big sized lists, the widget just disappear while loading it (this one I really believe it's a JS problem).
Comment #53
Dimm commented6.x-3.x-dev
Boxes after a few clicks are gray and inaccessible.
I found a bug.
For debugging, I changed common.inc line 2830, which gave a fatal error
I found a bug.
hierarchical_select.module
function hierarchical_select_json()
You need to remove
And insert
Because:
Because sometimes
$cached = cache_get($hs_form_build_id, 'cache');
return empty
then
$cached ==''
then
$storage = $cached->data;
$storage ==''
then
$form_id = $_POST['form_id'] = $storage['parameters'][0];
$form_id==''
But there were still problems:
$form_state = &$storage['parameters'][1];
$form = call_user_func_array('drupal_retrieve_form', $storage['parameters']);
$name = $storage['#names'][$hsid];
These lines do not work because $storage ==''
Where can I get value for $storage ???????????????????
Comment #54
Dimm commentedI tried it for 6.x-3.x-dev
Error not disappeared
Comment #55
Vuds commentedThis one of #53 doesn't work with node profile nodes and others sub_form_modules-based that transform nodes in sub-forms...
In the end, we are pointing to the same error (some where, some how, the hs_form_id disappears) but I really believe that the cause is that any other module is cleaning out "cache" table before people finish to fill their forms, and with the "expires" field not set correctly the system really empties out all data.
After my patch, the error doesn't happened any more and I still have compatibility with Node Profile module.
Comment #56
codenamerhubarb commentedI tried Vuds' patch (http://drupal.org/node/266960#comment-1158696) but I still get the following warnings:
And my form is grayed out and doesn't get past the first level of categories (the first drop-down box).
Comment #57
lyy9981 commentedI use Drupal 6 and had the same problem.
Thanks to comment #51, I changed to the following line:
// The change for Drupal 6; if you use Drupal 5, use the code on comment #51
cache_set($hs_form_build_id, $storage, 'cache', time()+$expire);
The problem is fixed. However, it would appear again if I open two identical windows of the same webpage - this doesn't matter, I simply won't open two windows at the same time.
Comment #58
lyy9981 commentedThis is a followup to my previous posting.
No, it didn't work!
But I know why.
#51 explains well here: http://drupal.org/node/266960#comment-1158696
But the solution didn't work for me.
I saw the error every time I cleaned the cache. As long as I don't clean cache, the error won't happen.
Comment #59
bob.hinrichs commentedWe are having the form errors issue here, same as original post, using the latest dev for D6. When this error occurs, the ffx browser alerts that the server gave an invalid response.
Comment #60
bacchus101 commentedI am experiencing the same problem with the latest version. Here is the error firebug kicks out in console when I select a term in the drop box.
Update: If I disable JQuery UI then it will work, although it still flashes the message that I do not have JS enabled, but it quickly goes away.
Comment #61
wim leersThis issue is a bit of a mess …
And that's partially my fault because I took so long to respond. Please accept my apologies. But I hope you understand that I've been extremely busy.
@Vuds: thank you very much for your patch. I committed it in a slightly different form, the way Drupal 6' form.inc does it:
So only 6 instead of 24 hours. Excellent find though :) Credited you in the commit.
@Dimm: Thanks to you too for your research, but it seems to be a different bug – if you still have the problem. Please do start a new issue if you're still having problems.
@bacchus101: it seems you've got jQuery compatibility issues. Please ensure you're using Drupal core's jquery.js and that you haven't overwritten it. If that doesn't help you, then please post a separate support request.
This issue is closed and stays closed. New problem reports here will be ignored, please start new issues.
Commits:
D6: http://drupal.org/cvs?commit=186268
D5: http://drupal.org/cvs?commit=186270
Comment #63
brnco commentedHi, I'm still getting the following errors. Everything works fine in FF and Chrome. In IE7 I can't get subcategories. There are alway two options None and Primary links. I tried to do all the things mentioned above but none of them semms to work in my case.
warning: Missing argument 1 for drupal_retrieve_form() in /home/html/***.sk/public_html/_sub/******/includes/form.inc on line 179.
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in /home/html/***.sk/public_html/_sub/******/includes/form.inc on line 218.
warning: uasort() [function.uasort]: The argument should be an array in /home/html/***.sk/public_html/_sub/******/includes/common.inc on line 2263.