Closed (works as designed)
Project:
Hierarchical Select
Version:
6.x-3.6
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2010 at 11:24 UTC
Updated:
5 Feb 2011 at 15:33 UTC
As suggested by: http://drupal.org/node/538022#comment-2502630
293: // drupal_json() function.
294: module_load_include('inc', 'node', 'node.pages');
295: drupal_set_header('Content-Type: text/javascript; charset=utf-8');
PLEASE add this line in the module, it will fix all HTTP-0, Received an invalid response from the server and other json/ajax errors caused by using HS form elements in blocks or custom code without regular node rendering.
Comments
Comment #1
jonthomas83 commentedHi there,
I've created a custom module to alter form elements using hook_form_alter, unfortunately this too is causing the "Received an invalid response from the server" message prompt.
I've tried the above patch and it's not working for me, disabling my module works but it's not the answer I'm looking for I'm afraid! :)
Many thanks for any help you could possibly offer me, advice or links to where this has been solved elsewhere, I've had a look around to no avail.
Cheers,
Jonathan
Comment #2
wim leersThat's not the right way to fix this. Some other module is including node.pages.inc and that module should follow the guidelines in API.txt (search for "$form_state").