#37086: `set_language` silently fails when `next` URL prefix differs from active
language cookie
-------------------------------------+-------------------------------------
Reporter: Bugy Future | Owner: Jason
| Judkins
Type: Bug | Status: closed
Component: | Version: 6.0
Internationalization |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Accepted
LocalePrefixPattern, |
set_language, |
get_language_from_path(), i18n |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by JaeHyuckSa):
* resolution: => duplicate
* status: assigned => closed
Comment:
Looking at this again, #35034 looks very close to this issue.
When the language cookie and URL prefix are out of sync, `translate_url()`
tries to resolve the URL using the request's current language. That fails,
and `set_language()` ends up redirecting back to the original URL.
Since #35034 was already closed as a duplicate of #28567, I think this
should probably be closed the same way. #37086 has a clearer repro, and
[https://github.com/django/django/pull/21240PR 21240] is already open, but
it looks like the same root cause. If this is c losed as a duplicate,
[https://github.com/django/django/pull/21240PR 21240] should probably
reference #28567 instead.
--
Ticket URL: <https://code.djangoproject.com/ticket/37086#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019e0ba139ad-3e382bc7-8ef5-46c5-8986-e5daedf6d9a6-000000%40eu-central-1.amazonses.com.