﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1234	[patch] problems with multiple window logins, last_login not updated	oggie rob <oz.robharvey@…>	Adrian Holovaty	"I was making some changes to multiple windows of the admin interface, was prompted for a login as my session had expired, and promptly lost everything in my model! I was greeted with a nasty looking page complaining that none of the required fields were filled in, which indeed was true. In the process of debugging I discovered the last_login field was not being updated in admin. They are in the same method so this patch fixes both.

To reproduce the login failure:
 1. Add the missing change_stage staff_member_required thing (it's in magic_removal, but is needed to reproduce this problem): see [1830]
 2. turn on the admin interface on some model(s)
 3. set your myproj/settings.py SESSION_COOKIE_AGE to something very low so you can set plenty of session expirations. I used 30 (meaning, 30 seconds). Log out and log in again to get the low cookie expiration.
 4. display a change list
 5. wait until the session expires
 6. use ""open in new window"" or ""open in new tab"" to have the edit view of several objects open in different windows. In other words, right-click on the href for those items in the change list. Each window will produce a login prompt.
 7. Try to log in on each of those edit views

The first screen should be fine, subsequent ones will return you to the edit screen with no fields displayed/selected and lots of errors. (You can use the back button to recover your work, however.) Minor variations on the above steps will lead to similar problems.

The problem is the POST has been encoded, and when it is used again of course the view function can't find the things it is looking for."	defect	closed	contrib.admin	dev	major	fixed			Unreviewed	1	0	0	0	0	0
