Download & Extend

Min cache lifetime -> Invalid response from server+PHP warnings

Project:Hierarchical Select
Version:6.x-3.x-dev
Component:Code - Taxonomy
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

Hi,

I want to thank you guys in advance for helping me. I am just having some trouble with my forms where I use both ahah helper and Hierarchical Select together. I have a textfield which has autocomplete and ahah callbacks attached to it. The ahah callback just populates another select list depending on the value of the textfield. When the page first loads, the Hierarchical Select works perfectly fine. However when i enter in text into the textfield and the ahah callback is run, the Hierarchical Select no longer works. When I try to select an option from the Hierarchical Select drop down, it returns 'Received an invalid response from the server'. the other errors returned are also

* warning: Missing argument 2 for drupal_retrieve_form() in D:\wamp\www\test\quoteajob\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 D:\wamp\www\test\quoteajob\includes\form.inc on line 366.
* warning: uasort() [function.uasort]: The argument should be an array in D:\wamp\www\test\quoteajob\includes\common.inc on line 2843.

I have read a few posts and looks like the same error from the delegator module. Unsure of how to continue and make these two form elements work together. Any help would be greatfully appreciated

Comments

#1

I found where the problem lies but not sure on how to fix it. Somehow after I run the ahah element that populates my select list, the cache that contains the storage data disapears. therefore this line $cached = cache_get($hs_form_build_id, 'cache'); is not really retrieving anything. $hs_form_build_id does still exist and is still being received through $_POST. Any help would be appreciated thanks

#2

3rd update -
I have narrowed the problem down a bit more

(1) Ahah callback is changing the hs_id from the afterbuild function
(2) Ahah callback is calling the submit function for hs and clearing all cache with previous hs_id

still not sure how to fix this though

#3

Possible D 6.15 version of the same error.

# warning: Missing argument 2 for drupal_retrieve_form() in /var/www/html/***/includes/form.inc on line 326.
# warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '' was given in /var/www/html/***/includes/form.inc on line 372.
# warning: uasort() [function.uasort]: The argument should be an array in /var/www/html/***/includes/common.inc on line 2874.

We use HS Taxonomy on node edit pages, nothing more. If you try to add a new term, term is added but "invalid response" alert window appears. Then HS form does not function anymore for this edit session. You have to save the node and re-edit again to be able to use HS Taxo form.

Disabling/Enabling caching has no effect.,

HS was ok at 6.14 times, but I am not sure if core Drupal or another update screwed this up.

Reporting.

(If this is a general error, next person changes the title please)

(D 6.15, Ctools 6.x-1.x-dev (2009-Dec-17))

#4

Title:Ahah helper & Hierarchical Select» Invalid response from server + PHP warnings

Ok, I am pretty sure this is general, thus hijacking the issue.

#5

Status:active» postponed (maintainer needs more info)

Well, there must be something that causes it. Just HS doesn't result in this problem. So please provide exact steps to reproduce.

#6

I'm seeing something very similar with d6.13, so I don't think it's confined to later versions of Drupal. With that said, I'm doing things a little differently but I hope this doesn't constitute hijacking this issue.

Here's how I've run in to the issue. I don't have the time to try and cleanly reproduce this at the moment since it's on a client site, so I'll include my module list just in case.

(1) Added a vocab with approx. 10 terms, up to 3 deep.
(2) Allowed HS to take over the form element with the following settings: Saving lineage, forcing deepest level, disabled node count, disabled associated node.
(3) This is where I suspect things might be falling down. I'm attempting to embed the node form in another page generated by a module. I'm using the following code:

<?php
   
// required for Drupal 6
   
module_load_include('inc', 'node', 'node.pages');
   
   
$node_type = 'vehicle';
   
$form_id = $node_type . '_node_form';

   
$node = new stdClass;
   
$node->uid = $user->uid;
   
$node->name = (isset($user->name) ? $user->name : '');
   
$node->type = $node_type;
   
   
// Invoke hook_nodapi and hook_node
   
node_object_prepare($node);
   
   
$output .= drupal_get_form($form_id, $node);
?>

(4) Errors logged when attempting to make a HS selection on the page that outputs that form:
uasort() [function.uasort]: The argument should be an array in /home/drupal6.13/includes/common.inc on line 2843.
call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given in /home/drupal6.13/includes/form.inc on line 366.
(5) The error does not occur when using the standard node form (node/add/*) so I'm assuming it's got a lot to do with my code above. Any suggestions?

Module list:
name, webform, block, color, comment, dblog, filter, help, menu, node, path, php, profile, system, taxonomy, trigger, update, upload, user, autoassignrole, content, content_permissions, nodereference, number, optionwidgets, text, userreference, checkbox_validate, currency, currency_api, cvs_deploy, date, date_api, date_popup, date_timezone, filefield, formatted_number, format_number, front_page, googleanalytics, imageapi, imageapi_gd, imagecache, imagefield, jquery_impromptu, masquerade, money, nodereference_url, nodereferrer, profile_role, taxonomy_manager, views_export, views_ui, ctools, views_content, motorquote, panels, panels_export, pathauto, admin, hs_taxonomy, auto_nodetitle, fieldgroup, conditional_fields, token, views, panels_node, hierarchical_select, jquery_update, delegator, devel

#7

Yes, similary, HS is not working on Image Assist's add new image iframe also.

But in my case, demo badge on the vocabulary edit page (garland) also produces the same error.

Almost all AHAH bearing forms go haywire at some point, especially if you have a plethora of modules (attached). This is really a high science. Even to isolate the problem is a headache.

Tx.

D 6.15, PHP 5.2.10

AttachmentSize
mods.txt 5.76 KB

#8

Ok, I also tried to monkey with module weights with no success.

Whatever weight combination I tried, still I could not assign new terms on node edit form and on vocabulary demo badge.

As I have said on #3, term is created successfully, but form does not function afterward, then you can not assign the new term till you refresh the page. Demo badge on vocabulary page has the same problem and behaves exactly the same.

I have also observed that, if you try to add a child term to a (present) parent, child added successfully and selected on the second dropdown, but simultaneously first (parent) dropdown is defaulted to <none> by itself. Then form malfunctions again.

#7 has my setup details. JS optimization is ON (with jsmin) anyway.

As damn Microsoft puts a limit on the number of JS/CSS files on a page, live site crashes on IEs when CSS+JS optimizations are disabled. I will disable optimizations and try again on a deserted hour anyway.

Tx.

#9

Priority:normal» critical

Yes, I hope I discovered something at last.

On vanilla D 6.15, on Performance page, just set "Minimum Cache Lifetime" to something other than <none>, and voila, problem (#3,#7,#8) occurs instantly (at least for me).

What's more, even when caching is DISABLED :S

Can anyone reproduce please?

Tx.

#10

Title:Invalid response from server + PHP warnings » Min cache lifetime -> Invalid response from server+PHP warnings

Thus...

#11

Component:Miscellaneous» Code - Taxonomy
Category:support request» bug report

I also tested on Pressflow 6.15, bug #9 is present. Transmuting category...

#12

Status:postponed (maintainer needs more info)» closed (duplicate)

Most likely a duplicate of #538022: JS alert: "Received an invalid response from the server.". When that issue has been fixed and the problem reported in this issue persists, feel free to reopen this issue.

#13

evan23 -> Hi, same HS settings, and same error messages using the 'Node Clone' Module.

#14

Hi seren10pity, refer to http://drupal.org/node/697172 for the solution to our issue.

#15

Subscribing.
Tried #14 with cache on and worked, just gotta note you have to clear your cache first to pick up the changes.

#16

Hey guys!

I've been wanting to get this thing to work for quite some time now! Was really frustrated reading and trying all these different solutions and found that Post #14 to be the answer to all this mess! And what's more, it's actually a very easy fix! Here's the solution:

Go to Performance page in the admin menu then change the following:

Caching mode: Disabled
Minimum cache lifetime: none
Page compression: Disabled
Block cache: Disabled

Clicked on "Clear cached data"
Ran a cron

Credit goes to post #11 JCB from http://drupal.org/node/697172
Thank you inforeto for the heads up too!