We get the following warnings after the file has finished uploading only when the case tracker module is installed.
* warning: Invalid argument supplied for foreach() in /var/www/html/modules/node/node.module on line 521.
* warning: implode(): Bad arguments. in /var/www/html/modules/node/node.module on line 525.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /var/www/html/includes/database.mysql.inc on line 172.
Comments
Comment #1
drenton commentedBelow is a backtrace. Looks like it is failing on this line from the casetracker.module because of an empty node id :
$node = isset($form['nid']['#value']) ? node_load($form['nid']['#value']) : NULL;
So does this look like a casetracker bug? Should I post it on that module?
Thanks
warning: Invalid argument supplied for foreach() in /var/www/html/modules/node/node.module on line 521.
Array
(
[0] => Array
(
[file] => /var/www/html/includes/common.inc
[line] => 552
[function] => drupal_set_message
[args] => Array
(
[0] => warning: Invalid argument supplied for foreach() in /var/www/html/modules/node/node.module on line 521.
[1] => error
)
)
[1] => Array
(
[function] => error_handler
[args] => Array
(
[0] => 2
[1] => Invalid argument supplied for foreach()
[2] => /var/www/html/modules/node/node.module
[3] => 521
[4] => Array
(
[param] =>
[revision] =>
[reset] =>
[nodes] => Array
(
)
[cachable] => 1
[arguments] => Array
(
)
)
)
)
[2] => Array
(
[file] => /var/www/html/modules/node/node.module
[line] => 521
[function] => node_load
)
[3] => Array
(
[file] => /var/www/html/sites/all/modules/casetracker/casetracker.module
[line] => 1081
[function] => node_load
[args] => Array
(
[0] =>
)
)
[4] => Array
(
[file] => /var/www/html/sites/all/modules/filefield/filefield.module
[line] => 821
[function] => casetracker_form_alter
[args] => Array
(
[0] => filefield_js
[1] => Array
(
[field_customfield] => Array
(
[#type] => fieldset
.
.
.
.
.
Comment #2
dopry commentedThis looks like case tracker issue.
Comment #3
STyL3 commentedi'm getting the same error but for 5.x-1.3-beta1:
Anyone know how to fix this?
Comment #4
drenton commentedDo you have the CCK filefield module installed ?
http://drupal.org/project/filefield
Comment #5
STyL3 commentedyes. is this the cause of the issue?
Comment #6
drenton commentedThis is what I did for a workaround.
diff -up casetracker.module.orig casetracker.module
--- casetracker.module.orig
+++ casetracker.module
@@ -1078,7 +1078,7 @@ function casetracker_comment_changes($ca
* Implementation of hook_form_alter().
*/
function casetracker_form_alter($form_id, &$form) {
- $node = isset($form['nid']['#value']) ? node_load($form['nid']['#value']) : NULL;
+ $node = !empty($form['nid']['#value']) ? node_load($form['nid']['#value']) : NULL;
// add case options to our basic case type.
if (in_array(str_replace('_node_form', '', $form_id), variable_get('casetracker_case_node_types', array('casetracker_basic_case')), TRUE)) {
Comment #7
STyL3 commentedi'm assuming this is a patch of some sort? i'm not exactly sure what it is i'm supposed to do with it. i'm a drupal noob.
Comment #8
drenton commentedYeah, I just changed one line in the casetracker.module file.
Look for the casetracker_form_alter function (line 1080 in my code) and change this :
$node = isset($form['nid']['#value']) ? node_load($form['nid']['#value']) : NULL;
to this :
$node = !empty($form['nid']['#value']) ? node_load($form['nid']['#value']) : NULL;
Comment #9
STyL3 commentedyou're awesome! I just swapped it out and will report back once i do some testing! thanks again.
Comment #10
zero2one commentedSee http://drupal.org/cvs?commit=111403
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.