Changes between Version 1 and Version 2 of Ticket #29281


Ignore:
Timestamp:
Apr 1, 2018, 5:29:05 AM (6 years ago)
Author:
Nikita Delyukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29281 – Description

    v1 v2  
    22Sometimes it fails: if the current link is /es/smth/ (or just /es/, whatever), post to /i18n/setlang/ with 'en' reloads the same link /es/smth/, instead of /en/smth/.
    33Happens from time to time in our prod, dev servers and locally. Sometimes just closing the browser window and opening the site again solves the issue. At the same time it may be fine in one browser and fail in another. Yesterday I encountered it locally and was able to debug:
     4
     5{{{
     6#proj.urls.py:
     7...
     8urlpatterns += i18n_patterns(
     9    url(r'^', include('app.urls')),
     10)
     11...
     12}}}
    413
    514{{{
     
    4251The variables in both runs are the same until get_resolver(urlconf).resolve(path), where one triggers Resolver404, and the other returns a matched url (ResolverMatch(func=app.views.smth, args=(), kwargs={'template_name': 'app/smth.html'}, url_name=smth, app_names=[], namespaces=[]))
    4352
    44 {{{
    45 #proj.urls.py:
    46 ...
    47 urlpatterns += i18n_patterns(
    48     url(r'^', include('app.urls')),
    49 )
    50 ...
    51 }}}
    52 
    5353I don't have a setup and\or scenario to reproduce it everytime.
    5454Django 1.11.10
Back to Top