Opened 9 years ago

Closed 8 years ago

#4710 closed defect (fixed)

Anonymous user's comments always show as "Commenty by anonymous..." even if name or email is supplied

Reported by: peter@… Owned by: Alec Thomas
Priority: normal Component: AddCommentMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11


When an anonymous users (such as accessing a public Trac install) adds a comment, the comment is entered like Comment by anonymous on Fri 27 Feb 2009 01:39:06 PM EST even thought the person entered their name or email address. Example URL here:

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by bailey@…

The problem appears to be that some markup needed for Trac to find the value in the box was missing. The following patch fixes the problem for me (inlined since it's so short):

---   2009-03-30 16:49:32.000000000 -0400
+++    2009-03-30 17:23:06.000000000 -0400
@@ -169,9 +169,11 @@
                         (req.authname == 'anonymous' and tag.div(
                             tag.label("Your email or username:",
-                                    for_="authoraddcomment"),
-                            tag.input(id="authoraddcomment", type="text",
-                                    size=30, value=authname)
+                                      for_="authoraddcomment"),
+                            tag.input(name="authoraddcomment",
+                                      id="authoraddcomment", type="text",
+                                      size=30, value=authname),
+                            class_="field"
                         ) or None),
                         tag.input(type="hidden", name="__FORM_TOKEN",

comment:2 Changed 8 years ago by osimons

Resolution: fixed
Status: newclosed

(In [8746]) AddCommentMacro: New name for anonymous was not picked up. Fixes #4710. Thanks for the patch!

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Alec Thomas.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.