Closed
Bug 1237661
Opened 8 years ago
Closed 8 years ago
the admin switches locales between refreshes
Categories
(developer.mozilla.org Graveyard :: General, defect)
developer.mozilla.org Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: robhudson, Assigned: willkg)
References
Details
(Keywords: in-triage)
If you go into the admin and refresh any of the admin pages a few times, it'll switch locales: text that's been translated, the way dates are formatted, etc.
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → robhudson
Reporter | ||
Comment 1•8 years ago
|
||
It may be related to middleware ordering: https://docs.djangoproject.com/en/1.8/ref/middleware/#middleware-ordering
Assignee | ||
Comment 2•8 years ago
|
||
Input has a similar bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1215125
Comment 3•8 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/002f83aa97f695deb1471535fadb556027689b97 Fix bug 1237661 - Correct order of middleware for locales and sessions https://github.com/mozilla/kuma/commit/f87cee970ec89773807bb25d65da44a7af3e3aed Merge pull request #3739 from robhudson/admin-locale-fix Fix bug 1237661 - Correct order of middleware for locales and sessions
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•8 years ago
|
||
Rob did a deploy this morning, but the problem is still occurring so I'm reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•8 years ago
|
||
Side effect of this which makes the problem more serious: If you're editing a user's information (adding them to a group, for example), and then try to save the page, and the locale randomly changes on you to one whose date format is different, your save is blocked and you get an error message telling you to correct your invalid date. This can result in frustration of having to try over and over until finally it accepts your change.
Assignee | ||
Comment 8•8 years ago
|
||
I'm snatching this from Rob. I just spent a bunch of time on Input looking into it, figured out the problem and fixed it there. Pretty sure it's the same cause in MDN.
Assignee: robhudson → willkg
Assignee | ||
Comment 9•8 years ago
|
||
It's the same issue that Input had. Yay! In a PR: https://github.com/mozilla/kuma/pull/3785
Comment 10•8 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/c10ae65546447fb7a349e1c618e71d8656d4ac6c Fix bug 1237661: Fix wonky admin This fixes the wonky admin problem where the language of the admin would change between refreshes. What's going on is that Django 1.8 introduced a fix to trans_real.activate where if you pass in '', it does nothing and returns. The prefixer will set the locale to '' for /admin/, so then the locale-aware middleware calls translation.activate('') and suddenly we're all standing in a pool of goo in the middle ages with flaming arrows aimed at us. This fixes that. https://github.com/mozilla/kuma/commit/67bb93dce75750f1fef6e14d48c99202e4eda525 Merge pull request #3785 from mozilla/1237661-admin Fix bug 1237661: Fix wonky admin
Updated•8 years ago
|
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•