Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using Drupal head after RC3 (couple of days ago)
Add CCK node type - OK
Add text field - OK
Create new node of this type - OK
Add nodereference field [select list, no extra boxes checked, associated w/ anothe CCK node type] - OK
Create a new node of this type - get errors below
Warning: Invalid argument supplied for foreach() in C:\workspace\mysite\modules\node.module on line 359
Call Stack
# Function Location
1 call_user_func_array () C:\workspace\mysite\includes\menu.inc:418
2 call_user_func_array () C:\workspace\mysite\includes\theme.inc:166
Warning: implode() [function.implode]: Bad arguments. in C:\workspace\mysite\modules\node.module on line 363
Call Stack
# Function Location
1 call_user_func_array () C:\workspace\mysite\includes\menu.inc:418
2 call_user_func_array () C:\workspace\mysite\includes\theme.inc:166
3 implode () C:\workspace\mysite\modules\node.module:363
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: node_load SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, 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 C:\workspace\mysite\includes\database.mysql.inc on line 120
Call Stack
# Function Location
1 call_user_func_array () C:\workspace\mysite\includes\menu.inc:418
2 call_user_func_array () C:\workspace\mysite\includes\theme.inc:166
3 trigger_error () C:\workspace\mysite\includes\database.mysql.inc:120
Comments
Comment #1
dado CreditAttribution: dado commentedusing latest version of CCK (just downloaded CVS version).
Comment #2
dado CreditAttribution: dado commentedthis seems to have gone away w/ latest version of CCK & drupal
Comment #3
dado CreditAttribution: dado commentedscratch that. i am still getting the above problems.
In addition:
(1) When I try to switch a node reference type from Autocomplete Text Field to Select List, it initially says it succeded but when I go away then try to create content or come back it is set back to Autocomplete Text Field.
(2) when I try to "preview" I get the above error messages (see 1st post in this issue). When I try to "submit" I get the form again with no error or other messages, and the node has not been created.
Comment #4
JonBob CreditAttribution: JonBob commentedComment #5
Michael Hofmockel CreditAttribution: Michael Hofmockel commentedrunning drupal4.7, CCK (cvs as of 1May2006)
create new node type with "title and nodereference". OK
When create content new node preview - get error
* warning: Invalid argument supplied for foreach() in /htdocs/modules/node.module on line 359.
* warning: implode(): Bad arguments. in /htdocs/modules/node.module on line 363.
* 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.moderate, 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 /htdocs/includes/database.mysql.inc on line 120.
The preview of the nodereference field is "<"
when create content new node submit - OK
Comment #6
JonBob CreditAttribution: JonBob commentedFixed.
Comment #7
asparagus CreditAttribution: asparagus commentedi'm using 4.7 with the cvs version of cck, and am also getting this error on preview.
cck nodereference version: // $Id: nodereference.module,v 1.27 2006/05/05 14:10:44 JonBob Exp $
the error is:
warning: Invalid argument supplied for foreach() in /home/.blunder/ringo380/dev.bayouproperties.com/drupal47/modules/node.module on line 359.
warning: implode(): Bad arguments. in /home/.blunder/ringo380/dev.bayouproperties.com/drupal47/modules/node.module on line 363.
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.moderate, 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 /home/.blunder/ringo380/dev.bayouproperties.com/drupal47/includes/database.mysql.inc on line 120.
Comment #8
lekei CreditAttribution: lekei commentedThis issue is still here. It may have been dropped because it had been reported as fixed at some point.
In my case I have a nodereference to an image node (it seems to be the only way to select an image) for a node.
The following 3 errors occur:
warning: Invalid argument supplied for foreach() in c:\www\drupal.all\modules\node.module on line 359.
warning: implode(): Bad arguments. in c:\www\drupal.all\modules\node.module on line 363.
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.moderate, 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 qbprint_node n INNER JOIN qbprint_users u ON u.uid = n.uid INNER JOIN qbprint_node_revisions r ON r.vid = n.vid WHERE in c:\www\drupal.all\includes\database.mysql.inc on line 120.
Comment #9
lekei CreditAttribution: lekei commentedThis bug occurs ONLY for drop-down lists. If the edit type is auto-complete text box then it works fine.
Problem is that auto-complete requires the user to guess (could take up to 34 tries, all letters and numbers, to find what you are looking for).
Comment #10
marcoBauli CreditAttribution: marcoBauli commentedlekei,
submitting a Title when following up to issues cause the title of the whole issue to be changed!
;)
Comment #11
lekei CreditAttribution: lekei commentedoops. me bad. Sorry.
Comment #12
lekei CreditAttribution: lekei commentedI think I have found the problem, and it is wider spread:
In PREVIEW, the object is all wrong. All items which have a select have the select index in the array instead of the value.
This messes up walking the array. It also makes the preview not function. Here is section of the output when node-content-business_card.tpl.php (for the content type "business card") is set to:
print ("<div style='white-space: pre;'>".print_r($node)."</div>");
and the same thing in normal node view:
So the problem exists in all input types, if the input is a selection widget.
Comment #13
onepairofpants CreditAttribution: onepairofpants commentedSo I am getting the same issue and when i change the field to autocomplete it is fine. Since it seems that lekei is right, is there a patch floating around anywhere? If not I can certainly deal with autocomplete. not ideal but not a big deal.
thx,
thom
Comment #14
gothmog CreditAttribution: gothmog commentedI also have this very same issue with the lastest cvs version (11/07/2006).
Using autocomplete is the only workaround.
Comment #15
robert.redl@easytouch.cc CreditAttribution: robert.redl@easytouch.cc commentedIf I try to use a nodereference field in a view as argument I get the following error if I try to view the result:
Interesting is the SQL part where it says: 'FROM node node LEFT JOIN' (two times 'node'???)
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 '(node.nid))) FROM node node LEFT JOIN node_data_field_firma nod query: pager_query SELECT count(DISTINCT(node_data_field_firma.field_firma_DISTINCT(node.nid))) FROM node node LEFT JOIN node_data_field_firma node_data_field_firma ON node.vid = node_data_field_firma.vid LEFT JOIN node_content_person node_data_field_phone ON node.vid = node_data_field_phone.vid LEFT JOIN node_data_field_email_company node_data_field_email_company ON node.vid = node_data_field_email_company.vid WHERE (node.type IN ('content-person')) in /home/httpd/vhosts/easytouch.at/httpsdocs/itil/includes/database.mysql.inc on line 120.
Comment #16
repe-1 CreditAttribution: repe-1 commentedI bet this has to do with PHP 5 and stdObject.
I was evaluating Subscriptions-module and got stdObject-error when I was trying to preview/view for example forum topics. After I changed array type reference to an object one for the line where an error occured, I got rid of the error, but then I had these same type SQL / Implode etd. errors you guys are describing in this thread. Maybe there is some compatibility mode for PHP 5 or something.
-repe
Comment #17
lekei CreditAttribution: lekei commentedPHP 5 may create its own set of issues (it does with a lot of code), that is why I don't use it.
The example I gave used PHP 4.4.0 on the production server and 4.4.2 on the dev server.
Comment #18
vph CreditAttribution: vph commentedI have this exact problem with drupal 4.7.2
Comment #19
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedvph: please open a new issue, this one is so polluted with unrelated stuff that it is hard to see what it is about. Marking fixed as the original patch was committed.
Comment #20
(not verified) CreditAttribution: commented