Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14012 closed (fixed)

Adding an User object in a popup fails

Reported by: gk@… Owned by: nobody
Component: contrib.admin Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Let's say we have a model with a ForeignKey to the django.contrib.auth.User! If you edit objects of this model on the admin interface, you can click the little green plus sign to add a new User in a popup window. You enter the user name and the password (twice). In django 1.1, it closed the window, created the user then set in the select. Django 1.2 behaves wrong, it displays the edit user form, instead of closing the window. You can't even close the window with the full form's save button. To illustrate this, I've uploaded a video:

http://www.youtube.com/watch?v=BIMRoBbH8ws
(The left one is django 1.1.1, the right is django 1.2.1)

Attachments (2)

14012.diff (3.1 KB) - added by Ramiro Morales 6 years ago.
Patch for this issue
14012.2.diff (3.2 KB) - added by Ramiro Morales 6 years ago.
Alternative patch also fixing an (old?) typo 'a username' -> 'an username'

Download all attachments as: .zip

Change History (17)

comment:1 Changed 6 years ago by gk@…

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Sorry, the video link is wrong:
http://gk.lka.hu/x/keep/django-add-user-bug.mov

comment:2 Changed 6 years ago by Karen Tracey

Triage Stage: UnreviewedAccepted

Bisection shows change in behavior was introduced by r12218.

Changed 6 years ago by Ramiro Morales

Attachment: 14012.diff added

Patch for this issue

comment:3 Changed 6 years ago by Ramiro Morales

Component: Uncategorizeddjango.contrib.admin
Has patch: set

comment:4 Changed 6 years ago by Ramiro Morales

Triage Stage: AcceptedReady for checkin

Marking RFC as per Jacob instructions on IRC.

Changed 6 years ago by Ramiro Morales

Attachment: 14012.2.diff added

Alternative patch also fixing an (old?) typo 'a username' -> 'an username'

comment:5 Changed 6 years ago by Ramiro Morales

Note that both patches uploaded so far introduce and/or change new translatable literal and as such might be acceptable for trunk but not for the 1.2.x branch.

comment:6 Changed 6 years ago by Karen Tracey

"a username" reads correctly to me, "an username" reads wrong. I don't think new/changed translatable strings generally prevent fixes from being applied to a maint. branch -- better to fix the bug and have an untranslated string than not fix the bug at all. And new translations can be provided for the branch....

comment:7 Changed 6 years ago by Ramiro Morales

Se also #14014, a change of behavior also introduced with r12218.

comment:8 Changed 6 years ago by Ramiro Morales

Karen is right. Ignore my comment about not adding translatable literals on a maintenance branch.

comment:9 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [13501]) Fixed #14012 -- Corrected the handling of the create user popup dialog in the admin. Thanks to gk@… for the report, and Ramiro Morales for the patch.

comment:10 Changed 6 years ago by Russell Keith-Magee

(In [13502]) [1.2.X] Fixed #14012 -- Corrected the handling of the create user popup dialog in the admin. Thanks to gk@… for the report, and Ramiro Morales for the patch.

Backport of r13051 from trunk.

comment:11 Changed 6 years ago by dburke@…

Resolution: fixed
Status: closedreopened

This does not appear fixed to me. Running from svn and 1.2.5 I was unable to add a user via the popup window for either a manytomany or foreignkey. I get exactly the same behavior as described in the right side video.

comment:12 Changed 6 years ago by Ramiro Morales

This regression was introduced in r14628.

comment:13 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: reopenedclosed

This ticket was fixed; the regression is a separate issue to the original problem. I've just opened #15420 to track the regression.

comment:14 Changed 6 years ago by Ramiro Morales

In [15637]:

Fixed #14012 (again) -- Admin app: Don't show the full user edition view after adding a user in a FK popup. Thanks dburke for reporting this regression introduced in r14628.

comment:15 Changed 6 years ago by Ramiro Morales

In [15638]:

[1.2.X] Fixed #14012 (again) -- Admin app: Don't show the full user edition view after adding a user in a FK popup. Thanks dburke for reporting this regression introduced in r14628.

Backport of [15637] from trunk.

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