Closed (fixed)
Project:
Node Comments
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 May 2008 at 23:52 UTC
Updated:
11 Jun 2008 at 12:50 UTC
When I visit /node/12345/view, I get three errors/warnings:
* warning: Invalid argument supplied for foreach() in /home/clients/websites/w_php0/public_html/php0/modules/node/node.module on line 521.
* warning: implode() [function.implode]: Bad arguments. in /home/clients/websites/w_php0/public_html/php0/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 /home/clients/websites/w_php0/public_html/php0/includes/database.mysql.inc on line 172.
I tracked it down to line 643 (inside nodecomment_render). Apparently, it thinks $cid = 'view'. So the patch slightly changes the if statement.
This work was sponsored by Initsoft, LLC.
| Comment | File | Size | Author |
|---|---|---|---|
| nodecomment.module.patch | 378 bytes | fersman4 |
Comments
Comment #1
sirkitree commentedThanks. Committed.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
groberts100 commentedI've got exactly this error but do not have a file called nodecomment.module anywhere in my Drupal 5.5 installation.
So there is nothing to patch ! What to do ?
Thanks.
Comment #4
sirkitree commentedgroberts100: note that the error is actually coming from node.module. This error occurs when a module tries to do a node_load() on a variable that is not a valid node id. So there is somewhere else in your installation that is passing a bad node id to this function. Look up debug_backtrace() and use this to see if you can pinpoint where this is happening.