Opened 7 years ago

Closed 6 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: athomas
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 7 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 6 years ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

as closed The owner will remain athomas.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.