Ticket #4710 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

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

Reported by: peter@mach-ii.com Assigned to: athomas
Priority: normal Component: AddCommentMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

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:

http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/MachII1.8SESImprovements#CommentbyanonymousonFri27Feb200901:39:06PMEST

Attachments

Change History

03/30/09 23:37:56 changed by bailey@newman.upenn.edu

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):

--- macro.py~   2009-03-30 16:49:32.000000000 -0400
+++ macro.py    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",
                                         value=req.form_token),

09/10/10 16:25:50 changed by osimons

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4710 (Anonymous user's comments always show as "Commenty by anonymous..." even if name or email is supplied)




Change Properties
Action