Download & Extend

Comment page rendered even if no comment exists

Project:Comments Page
Version:5.x-1.0
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

See http://www.babelup.com/comment/2134 for an example;

If someone visits example.com/comment/# and there is no comment with that CID, a "blank" comment will appear instead. This error appears in the log:

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 /includes/database.mysql.inc on line 174.
nobody click here