Code

Opened 4 years ago

Closed 3 years ago

Last modified 3 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 4 years ago.
Patch for this issue
14012.2.diff (3.2 KB) - added by ramiro 4 years ago.
Alternative patch also fixing an (old?) typo 'a username' -> 'an username'

Download all attachments as: .zip

Change History (17)

comment:1 Changed 4 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 4 years ago by kmtracey

  • Triage Stage changed from Unreviewed to Accepted

Bisection shows change in behavior was introduced by r12218.

Changed 4 years ago by ramiro

Patch for this issue

comment:3 Changed 4 years ago by ramiro

  • Component changed from Uncategorized to django.contrib.admin
  • Has patch set

comment:4 Changed 4 years ago by ramiro

  • Triage Stage changed from Accepted to Ready for checkin

Marking RFC as per Jacob instructions on IRC.

Changed 4 years ago by ramiro

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

comment:5 Changed 4 years ago by ramiro

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 4 years ago by kmtracey

"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 4 years ago by ramiro

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

comment:8 Changed 4 years ago by ramiro

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

comment:9 Changed 4 years ago by russellm

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

(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 4 years ago by russellm

(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 3 years ago by dburke@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 3 years ago by ramiro

This regression was introduced in r14628.

comment:13 Changed 3 years ago by russellm

  • Resolution set to fixed
  • Status changed from reopened to closed

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 3 years ago by ramiro

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 3 years ago by ramiro

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.