Hi,
I often seem to have the same error when selecting HS parent and child, in fact when I select it will just hang and the following in error reports:
Error 1:
Location http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/node/add/article
Message Missing argument 2 for drupal_retrieve_form() in /home/mysite/public_html/includes/form.inc on line 320.
Error 2:
Location http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/node/add/article
Message call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in /home/mysite/public_html/includes/form.inc on line 366.
Error 3:
Location http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/node/add/article
Message uasort() [function.uasort]: The argument should be an array in /home/mysite/public_html/includes/common.inc on line 2832.
As far as I know I do not have hierarchical_select_json in the base of my site. Is there perhaps a reference that is incorrect the HS?
Look so forward to hearing from you with any solution to this please ..
Lilian
| Comment | File | Size | Author |
|---|---|---|---|
| #53 | 368471-53.patch | 1.26 KB | wim leers |
| #52 | 368471-52.patch | 1.25 KB | wim leers |
| #25 | hs_delegator_workaround.patch | 922 bytes | wim leers |
Comments
Comment #1
chawl commentedI get exactly same error and behaviour on Drupal 6.9 with the latest dev.
In fact HS preview form on Vocabulary settings page works perfect, but when creating a node, neither selection, nor create new term works.
I am not sure if there was an older 6.x dev version but I seem to remember that this was working previously, though I am not sure if it was HS for menu or taxo.
Thank you for a great module.
Comment #2
chawl commentedMinor retouch sorry, compacted title a bit to include more...
Comment #3
chawl commentedOk, I checked form post with Firefox' Tamper plugin and here it is:
Request Header seems intact:
And the unfortunate response header;
Something fatal happens as we see error 500. Any experienced eyes there?
Tx.
Comment #4
chawl commentedChanging status...
Comment #5
Flying Drupalist commentedsubscribe
Comment #6
zdean commentedsubscribe...I get the same problem/error
Comment #7
chawl commentedHi all again, may be some good news,
Anyone using Panels 3 dev module with Ctools Delegator enabled?
I disabled "only" the Delegator and voila! A miracle happened and HS worked prefectly.
Check my another issue on http://drupal.org/node/352804#comment-1241196 and http://drupal.org/node/367213#comment-1242805 which seem very very related to me, and if this is your case also, please inform Ctools.
Tx.
Comment #8
zdean commentedChawl...I can confirm this.
But then panels doesn't work
Comment #9
chawl commentedUnfortunately Delegator screws up every bit of JS functionality on edit pages, not only HS.
I think this is not a main HS issue anymore.
Comment #10
zdean commentedif correct, what would be the plan of action? I'm a newbie so not sure where to take this next?
Comment #11
Flying Drupalist commentedDowngrade to panels 2 for now. Obviously not the optimal solution, but hey. Post in the ctools issue, who knows which side the problem lies.
Comment #12
chawl commentedI can not find an immediate workaround myself and disabled HS, and fallback to standart select fields unfortunately.
Anyway, as preview page retains some functionality back, that may fix some HS features.
It is also plausible to check http://drupal.org/project/issues/ctools?states=all Ctools issue page frequently.
May it be easy!
Comment #13
liliplanet commentedIn my first post of this thread, still have this error, but not using Panels or Delegator ...
Comment #14
chawl commentedCheck this on http://drupal.org/node/336517
May be related with teaser.js issue somehow and might help.
HS is a must anyway.
Comment #15
chawl commentedAs Panels is one of the most commonly used modules and announced to discontinue 2.x and decided to rely on 3.x version which uses Ctools/Delegator for the future, HS/Delegator issue has to be solved.
Unfotunately nobody knows which side causes the problem, but I'd like to reanimate this thread.
You can also check the counter issue on http://drupal.org/node/370487
Tx.
Comment #16
wim leersIf you can set up a demo site for me with admin + FTP/SSH access then I'll give it a look. If I have to create the test case myself, this will stay at the bottom of the pile that is my todo list. I've got limited amounts of time and time spent on reproducing the test case is time lost. Thanks for your understanding and thanks in advance for the demo site :)
Comment #17
chawl commentedI have setup a test site and sent you the information from your contact form.
Thank you for your time :)
Comment #18
wim leersThanks for setting up the test site! I got your e-mail.
I've got 3 busy school days now, I probably won't look at it before Friday.
Comment #19
wim leersComment #20
summit commentedHi Wim,
Is it already clear, whether this is a HS issue, or a Delegator issue?
For me this is the hold up to go live with a site on D6.
Thanks a lot in advance for your effort to get to the bottom of this!
Greetings,
Martijn
Comment #21
wim leersDelegator obviously, because it works fine when you disable Delegator.
I'll probably have time this weekend to track this down.
Comment #22
summit commentedThanks Wim! Looking forward to it.
Greetings, Martijn
Comment #23
bacchus101 commentedThanks Wim. HS is the only way to go so I look forward to a solution when you do get the time. Clearly Delegator has caused issues with more modules then just HS, and that is unfortunate being it stands to be an integral part of many drupal installations going forward with the increasing desire of users to employ panels.
Comment #24
wim leersInvestigating this right now.
It seems Delegator empties
$_POST. No wonder that everything breaks…Comment #25
wim leersI've got no clue why it stopped doing this, but all of a sudden $_POST was no longer empty.
In any case, this is due to the extra layer of indirection that delegator adds. HS assumes that the file for the menu callback is also the file in which the form definition function lives. This works for 99% of the cases. Exceptions are modules such as node_clone and … delegator. However, node_clone just had to add a
require_once(drupal_get_path('module', 'node') .'/node.pages.inc').Delegator really adds another (pretty abstract) layer of indirection. And thus it's up to Delegator to let us know where the function lives. merlinofchaos has agreed to fix this. The relevant issue is #416298: Delegator's extra layer of FAPI abstraction makes finding the form function impossible. You can also find a more detailed explanation there.
For now, I'm providing a patch (see the attachment) that you can apply manually. It's somewhat hacky, but it gets the job done. It only works when Delegator is applied to node forms (which is all it currently supports).
Comment #26
Veggieryan commentedWim's patch in #25 WORKS FOR ME.
Apparently, you can have your cake and eat it too.
Thanks Wim.
Comment #27
summit commentedHi,
Confirming on latest dev that patch works to have delegator and HS work together.
Thanks for now Wim!
Greetings, Martijn
Comment #28
dropchew commentedHi,
The exact error only shows on my production lighttpd server. There's no error in my localhost using xampp (apache). wondering anything to do with that? Using the exact same database and contribute modules on both machines. I did not have Ctools or delegator installed btw...
Comment #29
wim leersIf you don't have CTools/Delegator installed, then please start a separate issue.
Comment #30
jrust commentedPatch saved me a ton of headaches as well. Thanks.
Comment #31
merlinofchaos commentedJust to inform, I checked in the delegator half of #416298: Delegator's extra layer of FAPI abstraction makes finding the form function impossible so that Wim can do the HS half.
Please continue using the patch workaround until Wim's half is done, though, as the real solution is still slightly more complex than the workaround.
Comment #32
wim leersThanks a lot merlin :) Much appreciated!
Comment #33
mrgoltra commentedsubsribing
Comment #34
wonder95 commentedHad to apply the patch with CTools dev as of 5/8/09, and HSis working fine now.
Comment #35
MGParisi commentedSubscribing, please inform us/me when this is included into dev... Both panels and HS are needed for my D6 deployment.
Comment #36
psynaptic commentedPatch works great, thanks Wim!
Comment #37
Apollo610 commentedSubscribing for updates.
Patch works thanks!
Comment #38
Leeteq commentedSubscribing.
Comment #39
minus commentedSubscribing.
Comment #40
gordon commentedsubscribing
Comment #41
green monkey commentedDelegator issues as well, just a bit different codes
Posting it here for others via Druapl search
Windows error - invalid server request
Drupal error:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given in /home/mysite.com/includes/form.inc on line 366.
warning: uasort() [function.uasort]: The argument should be an array in /home/mysite.com/includes/common.inc on line 2829.
workaround: disabled Delegator - works
going to try patch
comment: I had just merged 30 terms into parent/child before this happened, thought I had damaged that Vocab - so went and un-did the parnet/child - ouch!
lesson learned:
1) Stop everything
2) go to drupal search for error - to see if common
3) save headaches and lost of time :-(
Comment #42
gordon commentedsubscribe
Comment #43
MGParisi commentedIs this patch working well enough to be added to a dev version?
I am still fighting with the PATCH situation (I use windows).
Comment #44
green monkey commentedits working here
Comment #45
liliplanet commentedHi,
Thought it was time to give HS and Delegator another try after my first post (on top).
I've added the patch and it works if the user is logged in, but not when the HS is on the user/register page.
There I would like the user to select a HS parent and child, but receive the same errors .. 'receiving an invalid response from the server'.
When I disable Delegator, it works, but then no panels3 (so it's one or the other :).
Look forward to any suggestion, and thank you.
Lilian
Comment #46
liliplanet commentedHi,
I think the answer has been in front of us all the time:
Error report:
Location http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/user/register
The HS is looking for hierarchical_select_json in public_html and not in sites/all/modules ...
with error
call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, '' was given in /home/public_html/includes/form.inc on line 366.Am I perhaps on the right track?
Look forward to any reply, and thank you ..
Lilian
Comment #47
green monkey commentednot sure to log error here or in HS
but same error as #41 , so will start here
the error would appear and prevented any "move" changes to Drupal Core Menu
Workaround: turned off HS menu option
Comment #48
ricobotto commentedSame issue here as in #28......but i have ctool. I cannot go without Ctools though (used by Advanced Profiles).
I patched HS with the workaround submitted, but still getting errors on remote server. When delegator is removed, everything work fine.
Any solutions, suggestions? Currently I am working without HS, but as you all know its not the same!!
thanks in advance
rc
Comment #49
ricobotto commentedany one managed to work around issue #48...i am still testing and trying to find a solution...i appreciate recommendations...thanks
rc
Comment #50
liliplanet commentedHi, Have just installed the new Panels 3, which does not need Delegator, therefor uninstalled ... updated CSTools ..
Still same error :
http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/user/register
Message Missing argument 2 for drupal_retrieve_form() in /home/public_html/includes/form.inc on line 320.
So it's not Delegator that is causing the problem ..
Comment #51
ricobotto commentedJust a quick update...I disabled all the options in the HS select module - except the HS taxonomy and seemed to work fine. I only needed HS for Taxonomy at this point.
Comment #52
wim leersThanks to merlinofchaos (see #31), it is now possible to fix this in a more generic way. Please try the new patch.
Comment #53
wim leersSorry, wrong patch.
Comment #54
liliplanet commentedHi,
Have just downloaded latest version 18 July, updated and then added the patch in #53
When a user tries to select a term at the register page, an error pops up with
"Received an invalid response from the server."
In error reports:
http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/user/register
Message Missing argument 2 for drupal_retrieve_form() in /home/public_html/includes/form.inc on line 320.
http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/user/register
Message call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in /home/public_html/includes/form.inc on line 366.
http://www.mysite.com/hierarchical_select_json
Referrer http://www.mysite.com/user/register
Message uasort() [function.uasort]: The argument should be an array in /home/public_html/includes/common.inc on line 2843.
I do have Panels 3 installed, but disabled Delegator as it is not necessary for Panels 3 anymore ..
The strange thing is though, when the user is logged in, then is able to select an HS term. Only when they are trying to register it does not work.
Looking so forward to any reply, and thank you.
Lilian
Comment #55
wim leersHow did you add Hierarchical Select to the user registration form?
Comment #56
liliplanet commentedHi Win,
Sorry I seemed to have missed your response. Thank you so much for your reply :)
Using Content Profile and 'Use this content type on the user registration page'.
In admin/content/taxonomy/list > selecting 'directory' > edit vocabulary > Use the Hierarchical Select form element for this vocabulary.
I then select my content profile type which is 'profile'.
Save only the deepest term
Force the user to choose a term from a deepest level
Display the node count: Disabled
Resizable: Disabled
This vocabulary (directory) is the only one uses as HS on my site.
When a user edits in their content profile, HS works beautifully, and everything is good.
When a user is trying to register for the first time, and need to select a Directory with HS, receive error 'received an invalid response from the server'.
I'm using Firefox, but have also tried it with Safari.
Looking so forward to your reply, and again, thank you Wim.
Lilian
Comment #57
wim leersSo you are using Content Profile. There's a separate issue for that: #518830: Content Profile causes error in hierarchical_select_json().
This issue is intended solely for CTools. Please subscribe to that other issue and copy/paste your last comment over there.
Others: please test the patch in #53!
Comment #58
gumdrop commentedOK, I've applied #53 and if I create a new field using Content Taxonomy on the same content type, nodes will not be saved in the specified term for that vocabulary unless a term is also specified for the Content Taxonomy field at the same time. It will be blank. BTW, I also tried it with: http://drupal.org/node/342992
Comment #59
junedkazi commentedThis patch in #53 works for me.
But why is it still not committed ?
Are there any other issues pertaining to it ?
Comment #60
wim leersIt was not yet committed because I didn't have any confirmation that it was in fact working. I'll assume one confirmation is enough.
So, I've committed it: http://drupal.org/cvs?commit=244418.
Comment #62
zkrebs commentedSo noob, but how do I apply this patch?
Comment #63
mrgoltra commentedhere, read carefully
http://drupal.org/node/60108
Comment #64
summit commentedHi,
With latest upgrade of HS I experienced again the delegator error. Implemting the patch of http://drupal.org/node/368471#comment-1409770 worked for me.
This issue is in mine opinion still not completely resolved, so setting issue to active again.
Greetings,
Martijn
Comment #65
wim leersEh … that patch was committed ;) Are you sure you're using the latest version of HS?
Comment #66
summit commentedI have installed: Hierarchical Select 6.x-3.x-dev (2009-nov-01) and I needed to add this patch to get it working still.
Greetings, Martijn
Comment #67
wim leersThen you don't have the latest version of delegator installed (see #31). Revert the patch and update Delegator and it'll work.
Comment #68
Renee S commentedI have the latest, and I'm getting this error too. In cTools 1.2 and later Delegator appears to be gone (but the error is back, so wherever its functions went...).
Comment #69
JGO commentedI don't have delegator and don't have admin memcache and also suffering from this :(
Seeking for hours now. Giving up
Comment #70
Renee S commentedI think it's fair to say this is still an active issue.
Comment #71
wim leers@JGO: I can't help if you don't provide details. When you do find the details causing this, please open a new issue.
@renee: I think it's not. Note that you're the *only one* saying that this is a problem again since November 15. Whereas there used to be dozens complaining. So I think it's fair to say that your specific setup exhibits this problem, which makes it likely that something else than CTools Delegator is causing the problem. When you've found that, please open a new issue :)