I am getting this when adding and then removing items in the HS.

Any suggestions on setup. This is IE6 and 7. There are a lot of items in the list.

Comments

billnbell’s picture

Type php
Date Wednesday, May 6, 2009 - 11:22
User user
Location http://site/hierarchical_select_json
Referrer http://site/node/add/jobs
Message Missing argument 2 for drupal_retrieve_form() in /var/www/html/drupal-6.11/includes/form.inc on line 320.
Severity error
Hostname 64.78.226.5
Operations

wim leers’s picture

Assigned: Unassigned » wim leers
Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Can you reproduce this with a vanilla installation of Drupal?

billnbell’s picture

It does not happen every time. It seems to happen when the user is adding and removing items using IE.
the form locks up - but they can refresh the page to get a clean form. Not easy to duplicate. But is does happen.

Drupal 6.11
Latest HS

billnbell’s picture

I think the form is timing out. Maybe I have too many items in the list? I have like 5,000 items. two-levels.

I might be able to use tag autocomplete or multi-select - it's just not as nice for huge numbers.

wim leers’s picture

I know of sites who are browsing 30,000 items via HS. I assume you don't have >100 items or so *per* level?

Also, in #3, you did reproduce the problem in a vanilla installation of Drupal?

billnbell’s picture

I didn't try it. I moved to autocomplete due to the client requesting it... WE thought it might have been google analytics interfering when google is slow, but did not have time to verify.

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Well then, no way to solve this issue! Closing this issue.

freelylw’s picture

got the same problem here. just suddenly happen, it was ok yesterday, I don't know how it happen today.

summit’s picture

Status: Closed (fixed) » Active

Hi Wim,
Set this to active, if this is ok by you. Got the same error "received an invalid response from the server" using Hierarchical Select 6.x-3.x-dev (2009-Apr-07).

And got these warnings:
    * warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given in httpdocs/includes/form.inc on line 366.
    * warning: uasort() [function.uasort]: The argument should be an array in httpdocs/includes/common.inc on line 2838.

I made already the changes suggested in: http://drupal.org/node/451038#comment-1545140
I even set HS itself to 30, no improvement.

The HS installation gives the following configuration:

$config = array(
  'config_id'       => 'taxonomy-2',
  'save_lineage'    => 0,
  'enforce_deepest' => 0,
  'entity_count'    => 0,
  'resizable'       => 0,
  'level_labels' => array(
    'status' => 1,
    'labels' => array(
      0 => '',
    ),
  ),
  'dropbox' => array(
    'status'    => 1,
    'title'     => '',
    'limit'     => 0,
    'reset_hs'  => 1,
  ),
  'editability' => array(
    'status' => 1,
    'item_types' => array(
      0 => '',
    ),
    'allowed_levels' => array(
      0 => 1,
    ),
    'allow_new_levels' => 1,
    'max_levels'       => 0,
  ),
);

Thanks for going into this!
Greetings, Martijn

wim leers’s picture

You're using a module that hacks forms, Summit.

node_form() is not being found, which means the associated file is not being loaded, which means another file gets loaded, which means a wrapper function was used, which means you're using a module that hacks forms.

So … what module are you using?

summit’s picture

Hi Wim,
This is my module list. Hopefully you see something familiair related to the moduel which hacks forms.

AdSense 6.x-1.x-dev (2009-Apr-01) 
Advanced help 6.x-1.2 
Chaos tool suite 6.x-1.x-dev (2009-May-12) 
FCKeditor - WYSIWYG HTML editor 6.x-2.0-beta1 
Front Page 6.x-1.2 
Global Redirect 6.x-1.2 
Google Analytics 6.x-2.2 
Hierarchical Select 6.x-3.x-dev (2009-Apr-07) 
Image 6.x-1.x-dev (2009-May-02) 
Image FUpload 6.x-3.0-rc2 
IMCE 6.x-1.2 
Image Assist 6.x-2.0-alpha3 
Utility 6.x-2.3 
Meta tags 6.x-1.0 
Page Title 6.x-2.x-dev (2009-May-08) 
Panels 6.x-3.x-dev (2009-May-12) 
Pathauto 6.x-2.x-dev (2009-May-03) 
Web Links 6.x-2.x-dev (2009-May-11) 
SiteMenu 6.x-1.x-dev (2009-Mar-12) 
Taxonomy Image 6.x-1.x-dev (2009-May-02) 
Token 6.x-1.x-dev (2009-Apr-21) 
Views 6.x-2.x-dev (2009-May-07) 
Views Bonus Pack 6.x-1.x-dev (2009-May-11) 
Views Bulk Operations (VBO) 6.x-1.x-dev (2009-May-11) 
Weight 6.x-1.0 

Thanks a lot in advance!
Greetings, Martijn

wim leers’s picture

Chaos tool suite is a known problematic module. There's a temporary patch in the issue queue that you can apply.

That aside, you'll have to figure it out on your own.

summit’s picture

Hi Wim,
Thanks for your quick response. I will report back what my findings are.
Greetings, Martijn

summit’s picture

Hi Wim, The Ctools patch worked for me. But now I have another User Interface issue.
The html with span-id is shown with the 'none' and 'create' items. The issue is: http://drupal.org/node/461984
Thanks for telling me about the patch! I think this issue is closed again.
greetings,
Martijn

wim leers’s picture

Status: Active » Closed (fixed)

@freelylw: I'm assuming it was a random server glitch. Please reopen if the problem persists.

freelylw’s picture

Hi wim

Problem caused by the module Chaos tool . once I swich off the Delegator module. the problem is gone.

elvis2’s picture

Status: Closed (fixed) » Needs review

Hi Wim, I ran into the same issue. Here is what I can tell you.

Running HS with ubercart and ubercart market place. Ubercart Market Place has an option to "hide' certain ubercart product fields on node form "product" (node/add/product). Originally UC and MP was installed and setup to "hide" some product fields.

I then installed HS and set it up. The first few goes HS didn't throw up any errors when creating the product node. I decided to go back into MP and change that setting to unhide product node fields. That is when I begin having this issue above. Odd thing is, FF works fine, as super admin and regular authenticated user. But, in IE7 I get the error, with both normal auth user and super admin.

Just thought I would post the code that MP is using to hide specific fields:

      if (!user_access('administer sellers') && variable_get('mp_products_hide_fields', TRUE)) {
        $form['base']['weight']['#access'] = FALSE;
        $form['base']['dimensions']['#access'] = FALSE;
        $form['base']['pkg_qty']['#access'] = FALSE;
        $form['base']['default_qty']['#access'] = FALSE;
        $form['base']['ordering']['#access'] = FALSE;
        $form['shipping']['#access'] = FALSE;
      }

According to the API this is an acceptable method to hiding form fields:
http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...

Here is the error status message given after you try to use HS and get the "Received an invalid response from the server." message (you have to refresh the page to see this error, once HS spits out the "invalid response" error).

warning: Missing argument 2 for drupal_retrieve_form() in C:\WAMP\www\fordrupal\includes\form.inc on line 320. 
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in C:\WAMP\www\fordrupal\includes\form.inc on line 366. 
warning: uasort() [function.uasort]: The argument should be an array in C:\WAMP\www\fordrupal\includes\common.inc on line 2829. 

A little more digging... In IE, I logged in as admin, went to each vocab setting, and resubmitting the form. Within each "edit vocab" the HS preview does work without errors, in FF and IE.

I hope this is helpful in solving this issue...

bstrange’s picture

Same problem as above, same solution as #16. Turned off delegator and it works fine. Not sure if delegator is something I need, but have too much work in HS to try and keep it atm.

Andrew Gorokhovets’s picture

In my case the problem was in admuncher (http://www.admuncher.com)

kiev1.org’s picture

please help, without Chaos tool work, however it is need for panels!

nchase’s picture

I'm having this issue without having ctools installed. Using Opera. It happens whenever I want to add a new term into taxonomy at the node form while creating a new node.

There are some errors loged:

1.
Location hierarchical_select_json
Message Missing argument 2 for drupal_retrieve_form() in /includes/form.inc on line 320.

2.
Location hierarchical_select_json
Message call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in /includes/form.inc on line 366.

3.
Location hierarchical_select_json
Message uasort() [function.uasort]: The argument should be an array in/includes/common.inc on line 2843.

nchase’s picture

sorry, double posting...

SWeddig’s picture

Category: support » bug
Priority: Normal » Critical

I have the same problem also using ctools.

When will this error be fixed?

wim leers’s picture

Category: bug » support
Priority: Critical » Normal
Status: Needs review » Postponed (maintainer needs more info)

This is not a bug. It's another module that does weird Forms API stuff and because of that, HS cannot retrieve the data is has stored that is necessary for the AJAX callbacks. Please apply the latest patch in #368471: CTools Delegator causes error in hierarchical_select_json() and report back in *that* issue and that issue only if you have CTools installed.

Those with problems in a specific browser: make sure you cannot reproduce the issue in another browser and then please start a new issue.

gumdrop’s picture

@ Wim Leers Thank-you for clearing that up and your most excellent work. Patch applied as stated and seems to be working.

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Excellent. Marking this one as duplicate then. For those of you that don't get a fully operational HS thanks to the patch referenced in #24, please open a new issue.

doq’s picture

This might be the problem: http://doques.net/node/513

Dev.Moh Sh’s picture

I have the same problem

it is appear in one of my sites and does not in another one, so i search for the differences and found that the problem come when i enable the i18n module (http://drupal.org/project/i18n)

Anonymous’s picture

Still having this issue. Tried all patches, not using Ctools Delegator. Using Ctools 1.3, Panels 3.3, HS 3.0 stable latest (31 Dec 09).

It happened suddenly, can't exlain it. Worked fine until 5 days ago, probably some update.

My site is dead now, since user generated content depends on HS...

Equinger’s picture

Subscribed. Was using 6.x.3.0 and just loaded and ran update.php with the latest 6.x.3.x-dev. Basically, this problem started happening with 6.x.3.0 after I added more exposed filters to a view pane. I thought I would take them away and I would be back to square one, but the HS no longer functions, yielding this error.

mayerwin’s picture

subscribing

Alex Andrascu’s picture

subscribing

Ingumsky’s picture

Thank you Wim for your continuing work on this module.

I've tried to disable all contributed modules on my test website and to create a term but error still occurs. Probably size of the dictionary makes it difficult to create a new term. There're 496 terms im my Geography dictionary (4 levels) and every time I'll try to use HS for it "Received an invalid response from the server." window appears.

picacsso’s picture

I had the same issues. I was using hs_nodereference module and had the views UI module installed too. After I disable the views UI i get the "...invalid response" error when using the drop down. When the views UI is enabled, it works fine.

Not sure whats going on.
I just thought I'd share this. May help someone.

Anonymous’s picture

+1 here ... disabling the chaos tools seems to do the trick, but chaos tools it`s an important module.

Still... apparently this one shows up without chaos tools enabled, some would say.

qpro’s picture

No error changing the view display:

I have a view with content pane display and exposed filter (Term ID with depth and Hierarchical Select selection type) added in a panel. When i apply the filter in the view i get the "Received an invalid response from the server."

If the display is changed to page display the error is not shown.

#34 for my site the error is independent of the views ui enabled/disabled state

- Hierarchical Select 6.x-3.7
- Chaos tools 6.x-1.8
- Views content panes 6.x-1.8
- Panels 6.x-3.9
- Views 6.x-2.12

user654’s picture

Status: Closed (duplicate) » Active

.

daniel wentsch’s picture

I'd like to throw in my experience: I get that error reproducibly every time I duplicate a node using node_clone module (http://drupal.org/project/node_clone).
Adding and editing nodes isn't affected by the error at all. Maybe someone else is using node clone?

Edit: okay, the problem with node_clone is a different issue: #355226: HS + Node clone compatibility and making HS more informative when an error occurs

amogiz’s picture

Got the same and even with Drupal 7 … No solution ? I did not have the problem a few days before.

oriol_e9g’s picture

Same problem error with HS 3.7 when we try to /node/add/*, same problem with 3.7+3-dev :(

oriol_e9g’s picture

I have solved the problem! The bug and my solution here #1439736: Hierarchical Select doesn't work if you disable English language

stefan81’s picture

In my case the Dialog API module interfered HS.
Deactivating the module solved the problem (temporarily).

@Wim Leers: Thank you for this great module!

stefan81’s picture

Hi I just wanted to clarify my debug:

1)
Actually it is query_ui which is interfering with the loading of the drop downs selectors.
I am using jquery_ui version 1.8.16
See related issue http://drupal.org/node/873170

2)
Only if I have multiple nodes in edit mode open tabs in my browser (Safari),
i get the "invalid response" error message.

gangaloo’s picture

I had the same problem but it goes away when you remove any debugging from devel like dpm(). It also will appear when you do any drupal_set_message() commands. After removing any drupal_set_messages or debugging commands like dpm(), the message never comes back.

ltrain’s picture

Thanks @gangaloo - this saved me some time!

kars-t’s picture

Assigned: wim leers » Unassigned
Status: Active » Fixed

Dear fellow Drupal enthusiasts,

this issue is now lasting for a very long time in the issue queue and was unfortunately never solved. As Drupal is a open source project everyone is helping on voluntary basis. So that this is was not solved is nothing personal and means no harm. But perhaps no one had time to deal with this issue, maybe it is too complex or did not describe the problem comprehensibly.

But this issue is not the only one. There are thousands of issues on Drupal.org that have never been worked on or could not be processed. This means that we are building a wave that is unmanageable and just a problem for the Drupal project as a whole. Please help us keep the issue queue smaller and more manageable.

Please read again, "Making an issue report" and see if you can improve the issue. Test the problem with the current Core and modules. Maybe the problem doesn't exist anymore, is a duplicate or has even been solved within this issue but never closed.

Help can also be found for it on IRC and in the user groups.

In order to remove this issue, I have set this issue to "fixed"

If there is new information, please re-open the issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.