Changes between Version 1 and Version 2 of Ticket #29281
- Timestamp:
- Apr 1, 2018, 5:29:05 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29281 – Description
v1 v2 2 2 Sometimes 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/. 3 3 Happens 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 ... 8 urlpatterns += i18n_patterns( 9 url(r'^', include('app.urls')), 10 ) 11 ... 12 }}} 4 13 5 14 {{{ … … 42 51 The 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=[])) 43 52 44 {{{45 #proj.urls.py:46 ...47 urlpatterns += i18n_patterns(48 url(r'^', include('app.urls')),49 )50 ...51 }}}52 53 53 I don't have a setup and\or scenario to reproduce it everytime. 54 54 Django 1.11.10