Deleted nodes causes php errors
FlemmingLeer - September 21, 2009 - 15:46
| Project: | Comment Page |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I have this issue.
If a parent node is deleted and all the posted comments removed it will produce these 3 php errors:
Error 1:
Link www.example.com/comment/1029/Feminism-and-death-beauty
Henvisning
Message implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /nfs/c04/h04/mnt/67036/domains/denmarkonline.dk/html/modules/node/node.module on line 565.
Strength Error
Error 2:
Placering www.example.com/comment/1029/Feminism-and-death-beauty
Henvisning
Besked 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 /example.com/html/includes/database.mysql.inc on line 174.
Strength Error
Error 3:
Link www.example.com/comment/1029/Feminism-and-death-beauty
Henvisning
Besked Invalid argument supplied for foreach() in /example.com/html/modules/node/node.module on line 561.
Strength ErrorTranslated by me from Danish to English so bear with me with non standard descriptions :/
Status is this:
Drupal 5.20
CAPTCHA Already 21272 blocked form submissions
Cron-opgaver Sidst kørt for 22 minutter 44 sekunder siden
Du kan køre cron manuelt.
Database-schema Updated
Filsystem Skrivbar (Public download-method)
Konfigurationsfil Protected
MySQL database 5.1.26
PHP 5.2.6
PHP register globals Disabled
Unicode-bibliotek PHP mbstring-udvidelse
webserver Apache/2.0.54

#1
I have exactly the same situation.
Subscribing.
#2
@FlemmingLeer:
I think I have solved this problem. In my case the 'Reply prefix' field in 'Comment subject settings' was empty. By filling in this field it appears to have stopped the php errors.
(I actually clicked the 'reset to defaults' button which fills the field with 'Re:')
Hope this works for you.
G
#3
Forget my previous post - the errors are still occurring.
#4
The issue is not caused specifically by the deletion of nodes. If comments are deleted and then the comments page for that comment is called (through a user bookmark or web crawler) it produces the same errors.
What is happening is that the comments page module is not checking if the comment exists before trying to render the page. You can prove this by typing: http://www.yoursite.com/comment/9999
If you check watchdog you will see the 3 errors you mention above.
I'm going to try the previous release of the module to test it for the same behaviour.