* warning: Invalid argument supplied for foreach() in node.module on line 359.
When I go to add content (other than a book page) this error comes up. I've disabled modules left right and centre trying to fix it, to no avail. Would you be able to set me on the right track in diagnosing and fixing the problem?
* warning: Invalid argument supplied for foreach() in /home/nywf6810/public_html/modules/node.module on line 359.
* warning: implode() [function.implode]: Bad arguments. in /home/nywf6810/public_html/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/nywf6810/public_html/includes/database.mysql.inc on line 120.

help?
was anyone able to recognise this? I'd really appreciate your help. I'm a bit lost when it comes to this sort of thing. :(
image_attach
i systematically replaced the node and filter modules, then disabled every other single module there was, until I hit the image_attach module. the error has dissappeared now, although i will need to do further testing. has anyone else had this experience with image_attach?
Heya, I am getting the same
Heya,
I am getting the same errors on my site as well, when users attempt to register from invite links. I have disabled image_attachment, but the error still persists. Was there another solution presented?
cheers,
w
having the same problem with invite
I get the error when trying to delete an invitation....
I dumped out the value for $param and get the value cancel... Is this some confirmation for the delete???
Any help appreciated...
Thanks
John
Anyone solve this?
I get this when clicking on 'Forgot my password' (using logintobbogan) but it also must occur somewhere else as it crops up now and then. The only solution I have is to clear out the cache and sessions and it fixes it temporarily.
I'm also getting this error
I'm also getting this error during "account creation."
help with debugging
Another way to debug this problem (aside from disabling modules/themes until it goes away) is to use the debug_backtrace function thusly:
<?phpif (!is_array($param)) {
ob_start();
var_dump(debug_backtrace());
$output = ob_get_clean();
watchdog('node_debug','backtrace is:'. $output);
}
?>
Add that just before the "foreach ($param as $key => $value) {" and whenever $param is not an array you will get a handy function traceback in your watchdog. Then just go to admin/logs and dig into the call stack to see what has happened.
For more informaiton see:
http://php.net/debug_backtrace
http://php.net/var_dump
--
Growing Venture Solutions
Drupal Implementation and Support in Denver, CO
Same problem. Still looking for solution
I'm having same problem.
Tried the debug_backtrace tip, but am not knowledgeable enough to get any further, yet.
I've disabled og.module. Problem goes away. But my website needs og to work. Any help would be appreciated. Will post resolution if I find one.
post an issue
Create an issue in OG (sorry moshe) with the results of the debug_backtrace in a text file attached to the issue.
That should help in debugging it.
That's general advice for others as well - if you don't understand the backtrace then post the results somewhere and alert someone else to it via the normal support methods (forums, issue support request, IRC, email, etc.).
--
Growing Venture Solutions
Drupal Implementation and Support in Denver, CO
A possible solution
See most recent comments in thread: http://drupal.org/node/77601
Thanks for guidance.
Same Issue
I'm running a virtually bare bones installation, and I'm getting this issue. It happens whenever I try to submit new content (and occasionally other situations).
The only modules I have enabled are: CCK (content only), menu, page, path, pathauto, story, taxonomy
This is not occuring on any other installation I have. It only started occuring when I upgraded MySQL to 4.1, and PHP to 5.1.2
..
Did you try the debugging code that I posted?
Are you using 4.7 or Drupal5beta? And are you sure that the modules you are using are the right versions?
I'd be surprised if the right versions of those modules are causing this problem, is why I ask. Finally, which theme are you using when the problem happens?
--
Knaddison Family | mmm Beta Burritos
I saw the debugging code,
I saw the debugging code, but it's unclear which file to place it in.
It effects both the blue marine theme, and my custom created theme.
I just completely refreshed all the files... downloaded everything just now (core 4.7.4, cck, pathauto) and uploaded fresh brand new files. It's still there.
It's almost as though it's getting worse... it now appears whenever I go to a term list (taxonomy/term/[n]). The error has grown, too.
..
Placement of the snippet:
As you'll see in your error statements, that's just before line 359 of node.module
--
Knaddison Family | mmm Beta Burritos
Im having a simular error as well
Drupal 5.0
Configuration file Protected
Cron maintenance tasks Last run 1 min 45 sec ago
You can run cron manually.
Database schema Up to date
File system Writable (public download method)
GD library bundled (2.0.28 compatible)
MySQL database 5.0.24
PHP 5.1.5
Unicode library PHP Mbstring Extension
Web server Apache/2.2.3 (Win32) PHP/5.1.6
My error is
warning: Invalid argument supplied for foreach() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\modules\node\node.module on line 504.
warning: implode() [function.implode]: Bad arguments. in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\modules\node\node.module on line 508.
warning: mysql_query() [http://www.mysql.com/doc]: 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 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\allensworld\includes\database.mysql.inc on line 148.
When i upgraded to 5.0 i had a few problems one of them was i couldnt add some content
like some other post ive seen on here not able to add rss feeds... (error duplicate intry)
I fixed those issuse by reordering the FID/UID numbers in the affected tables i notice there set to auto incr. So I thought i would try it with the Node taple, and thats when i started getting this error.
Before i was getting a duplicate entry error, I thought it was trying to assign a new colume with an exsisting UID/FID ..
I dont know the original number scheme what should i do at this point?
WWW.allensworld.org
Never mind
I just deleted all the data from the nodes.. only had about 30 anyway, i start fresh
Reomve this line
Hi,
You might have called up the node_load() or node_view() function inside that particular module, which would show these errors if the parameters are not passed correctly.
---Sasi
Yes, that cured it! I was
Yes, that cured it! I was passing incorrect parameters to node_load(). Thank you!
+1
I was getting same error on a Drupal 5.1 installation. And the problem was due to an incorrect call to node_load inside a custom block.
Thanks for pointing this out.
node_load and invalid argument foreach $param
Had this issue in a custom module, and had to pass the nid as an array, whereas I've always passed it just as the nid. Changed the code from:
node_load($node->nid);TO
node_load(array('nid'=>$node->nid));and the error disappeared.
Charles
www.parkroad.co.za
I had the same issue with a
I had the same issue with a fairly simple Druapl 5.1 site using CCK and the new GlobalNode module.
The fix seemed to be a change in the hook_nodeapi() call. Although I am not clear why that worked...
--
Ixis (UK) providing Drupal consultancy and Drupal theme design.
As ekgaon mentioned above,
As ekgaon mentioned above, call to node_load or node_view may be causing the issue