Opened 14 years ago

Closed 12 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: dev
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

Description

[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 14 years ago.
14175_comment_long_full_name.diff (3.1 KB ) - added by Julien Phalip 14 years ago.

Download all attachments as: .zip

Change History (9)

by gravm, 14 years ago

Attachment: comments.diff added

comment:1 by Matthias Kestenholz, 14 years ago

Triage Stage: UnreviewedAccepted

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

by Julien Phalip, 14 years ago

comment:2 by Julien Phalip, 14 years ago

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 by Julien Phalip, 14 years ago

Severity: Normal
Type: Bug

comment:4 by Thejaswi Puthraya, 14 years ago

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

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

comment:5 by Jacob, 13 years ago

Milestone 2.0 deleted

comment:6 by Julien Phalip, 13 years ago

Patch needs improvement: set

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

comment:7 by Jacob, 12 years ago

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 https://github.com/django/django-contrib-comments; 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