Skip to content

Language setting is lost for new browser sessions #16758

@m2martin

Description

@m2martin

Deployment Type

Self-hosted

NetBox Version

v4.0.6

Python Version

3.12

Steps to Reproduce

  1. Be sure to have LOGIN_TIMEOUT > 0 set
  2. Login with a user which has language set to auto
  3. Netbox will show in the language determined from browser language
  4. Go to user preferences and set an alternate language
  5. Netbox will show in alternate language (django_language cookie is set)
  6. Close your browser and navigate to your Netbox again with a new browser instance (of course with the same browser)
  7. The user is still logged in but language is again detected by browser language

This is because django_language cookie's lifetime is set to browser session's lifetime. Each time the browser is closed, the cookie is deleted. Because no new login happens, the language is not set (related #16512).

Expected Behavior

The user's language setting is applied

Observed Behavior

Browser language is applied.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions