It is not possible to edit unpublished comments. This is noticeable if using the spam module, which can automatically unpublish comments. In Drupal 4.5.1 to verify that an unpublished comment is indeed spam, one needs to first publish it, then edit it. Trying to edit it without first publishing it results in a blank form.
The attached patch removes "AND c.status != 2" from the query that loads the comment for editing. Once applied, it is possible to edit an unpublished comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | comment.module_3.patch | 1.27 KB | jeremy |
| comment.module_2.patch | 697 bytes | jeremy |
Comments
Comment #1
jeremy commentedThis was my misunderstanding. I had originally come to the conclusion that there were three possible values for comment->status: 0 = published, 1 = moderation queue, 2 = unpublished. However, it appears there are only two valid settings, 0 = published and 1 = moderation queue & unpublished.
That said, I don't see any reason to verify that comment.status != 2 as happens when editing a comment. Can anyone tell me why the attached patch shouldn't be applied? (It seems to me it will have no effect)
Comment #2
dries commented'status = 0' means 'published', 'status = 1' means 'not published', and 'status = 2' means 'deleted'. The deleted-status is no longer used so I'd be happy to commit your patch: it removes the last references to it.
I wonder though: did the spam module set the status to 2? If not, something is wrong with the comment module.
Comment #3
jeremy commentedYes, the spam module was setting the status to 2. I misread the comment module code when I was writing the spam module... It's not a bug in the comment.module.
Comment #4
dries commentedCommitted to HEAD and DRUPAL-4-5.
Comment #5
(not verified) commented