Opened 9 years ago

Closed 7 years ago

#14175 closed Bug (wontfix)

Comment object's user_name field too short for User.get_full_name

Reported by: gravm Owned by: nobody
Component: contrib.comments Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


[9118] introduced a bug where a comment can't be saved because User.get_full_name() returns a name that's more than 50 characters (the limit set by the Comment model). By default, User.first_name and User.last_name both allow up to 30 characters. User.get_full_name() returns the concatenation of first_name and last_name with a space in between, so it's possible for that method to return a 61 character string. On possible fix is to change the Comment.user_name field to allow 61 characters.

Attachments (2)

comments.diff (732 bytes) - added by gravm 9 years ago.
14175_comment_long_full_name.diff (3.1 KB) - added by Julien Phalip 9 years ago.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by gravm

Attachment: comments.diff added

comment:1 Changed 9 years ago by Matthias Kestenholz

Triage Stage: UnreviewedAccepted

Either that or the return value of get_full_name() would have to be truncated.

Changed 9 years ago by Julien Phalip

comment:2 Changed 9 years ago by Julien Phalip

If we are to keep using the full name, then I think the best approach is to augment the character limit to 61 (see patch). However, this would be backwards incompatible...

comment:3 Changed 8 years ago by Julien Phalip

Severity: Normal
Type: Bug

comment:4 Changed 8 years ago by Thejaswi Puthraya

Easy pickings: unset
milestone: 2.0
UI/UX: unset

Since the change is backwards-compatible, pushing the milestone to 2.0.

comment:5 Changed 8 years ago by Jacob

Milestone 2.0 deleted

comment:6 Changed 8 years ago by Julien Phalip

Patch needs improvement: set

Once migration tools are added to django core, some migration scripts should be included in this patch.

comment:7 Changed 7 years ago by Jacob

Resolution: wontfix
Status: newclosed

django.contrib.comments has been deprecated and is no longer supported, so I'm closing this ticket. We're encouraging users to transition to a custom solution, or to a hosted solution like Disqus.

The code itself has moved to; if you want to keep using it, you could move this bug over there.

Note: See TracTickets for help on using tickets.
Back to Top