#27402: When using i18n_patterns and prefix_default_language=False, 404 page
redirects incorrectly
------------------------------------------------+------------------------
               Reporter:  Hovi                  |          Owner:  nobody
                   Type:  Uncategorized         |         Status:  new
              Component:  Internationalization  |        Version:  1.10
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 Hello,

 I just migrated to 1.10.2 using new cool localization with
 prefix_default_language=False, replacing solid-i18n-urls:
 https://github.com/st4lk/django-solid-i18n-urls
 Only smaller issue is, that whenever I go to 404 page, I get redirected to
 /en/THE_OLD_URL/ (en is default language in my case).

 My guess is bug in LocaleMiddleware, language_path variable is being
 constructed always using language code even in cases when there shouldn't
 be (default language).
 I attached simple fix, that seems to work it out for me.

--
Ticket URL: <https://code.djangoproject.com/ticket/27402>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/047.11a393ab61d674c2d5649aa1bec52774%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to