Opened 6 years ago

Closed 3 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 6 years ago.
14175_comment_long_full_name.diff (3.1 KB) - added by julien 5 years ago.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by gravm

comment:1 Changed 6 years ago by mk

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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

Changed 5 years ago by julien

comment:2 Changed 5 years ago by julien

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 5 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:4 Changed 5 years ago by thejaswi_puthraya

  • Easy pickings unset
  • milestone set to 2.0
  • UI/UX unset

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

comment:5 Changed 5 years ago by jacob

Milestone 2.0 deleted

comment:6 Changed 4 years ago by julien

  • Patch needs improvement set

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

comment:7 Changed 3 years ago by jacob

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

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