Closed
Description
Summary
A condition in my multisite app causes me to have arrived at a cms view with current_language = 'en-us'
and user_languages = ['en-gb', 'fr']
at cms/views.py#L83.
When the user is unauthenticated, or the user is staff but the toolbar is not in edit mode, the elif condition of cms/views.py#L96-L99 is reached and an HttpResponseRedirect to /en-gb/ is returned. All good.
When the user is staff, and the toolbar is in edit mode, request.toolbar.redirect_url
is set, but a LanguageError is thrown at cms/views.py#L110 in get_redirect_on_fallback
before a response can be returned.
Expected behaviour
I expect to be redirected to /en-gb/ regardless of the properties of the user or the toolbar state.
Environment
- Python version: 3.5.2
- Django version: 1.9.10
- django CMS version: 3.3.3