This issue came up in the 4.6 beta (IIRC) and has reared its head again. When a user edits a previously submitted comment, comment.module will report out the user's name as "anonymous" to the rest of the system, but when the comment is viewed, the true author is still listed.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | comment.module_21.diff | 12.63 KB | drumm |
| #8 | comment.module_20.diff | 13.39 KB | drumm |
| #4 | comment-admin_0.patch | 9.03 KB | chx |
| #1 | comment-admin.patch | 5.43 KB | merlinofchaos |
Comments
Comment #1
merlinofchaos commentedThis one is because of work being done in _validate that is not valid. It is no longer allowed to change the form in _validate.
I moved all of the heavy lifting done in comment_validate to comment_form_submit, and I introduced a new $op for hook_comment: 'submit'.
I didn't find any instances of hook_comment being used anywhere in core, so I think we're ok there (but someone please doublecheck me and make sure I didn't screw up the grep).
Comment #2
dries commentedPatch seems to break comment previews!
Comment #3
Cvbge commentedRelated to http://drupal.org/node/40762
Comment #4
chx commentedComment #5
merlinofchaos commented+1 -- patch seems to work well for me in both admin and non-admin editing.
Comment #6
chx commentedComment #7
Steve Dondley commentedWhen your preview the comment, and I stress *only when you preview*, the author is not anonymous. It is set to editor's name.
However, when the comment is actually displayed on the site, it says "Anonymous" as expected.
Comment #8
drummI rerolled the patch to work for editing the information of anonymous commentors.
Comment #9
drummA little extra code got in this patch
Comment #10
grohk commented+1 Works as advertised. Thanks for the patch.
Comment #11
dries commentedCommitted to HEAD. Thanks.
Comment #12
morbus iffThis still appears to be broken somehow - in PHP 5, I can't submit a comment (either anonymous or admin) due to no valid date being passed. The trip through the rabbit hole starts in comment_validate which uses $date and not $edit['date']. We end up in a _submit call later on where a timestamp and a date are set, but that's too late, because comment_validate triggers before then (on a failed "is the date there?"). Haven't had much of a chance to look at it past there. It appears that we need to move the _submit timestamp/date stuff into comment_form.
Comment #13
morbus iffComment #14
morbus iffSee http://drupal.org/node/45723.
Comment #15
(not verified) commented