fix(manager): persist manager language across logout/login - #16928
Open
Ibochkarev wants to merge 4 commits into
Open
Ibochkarev wants to merge 4 commits into
Ibochkarev wants to merge 4 commits into
Conversation
Store manager language in cookie (modx_manager_language) so it survives session end. Read cookie on login, set on language change and login. Redirect to ?manager_language=XX after logout for immediate restore. Fixes modxcms#16072
Ibochkarev
force-pushed
the
fix/16072-manager-language-persist
branch
from
August 2, 2026 04:10
6a01acd to
1f48536
Compare
Fix operator spacing flagged by phpcs on touched modX.php lines.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.x #16928 +/- ##
============================================
+ Coverage 21.67% 21.78% +0.11%
- Complexity 10786 10803 +17
============================================
Files 566 566
Lines 33149 33219 +70
============================================
+ Hits 7186 7238 +52
- Misses 25963 25981 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AgelxNash
pushed a commit
to AgelxNash/revolution
that referenced
this pull request
Sep 6, 2026
AgelxNash
pushed a commit
to AgelxNash/revolution
that referenced
this pull request
Sep 6, 2026
smg6511
requested changes
Sep 21, 2026
smg6511
left a comment
Collaborator
There was a problem hiding this comment.
Ok, this definitely works. I have one change request and an optional suggestion for you to look at, then it's good to go.
Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
Accept-Language detection varies too much across browsers to be a reliable fallback. After request, cookie, and session, fall back to en.
smg6511
self-requested a review
September 21, 2026 13:51
smg6511
approved these changes
Sep 21, 2026
smg6511
left a comment
Collaborator
There was a problem hiding this comment.
Rechecked and works well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Manager language lived only in
$_SESSION. Logout destroyed the session, so the locale reset on the next login (#16072).This PR persists the choice in cookie
modx_manager_language, reads it on login, sets it on language change, and passesmanager_languagethrough the logout redirect (PHP +modx.js). AddsmodX::setManagerLanguageCookie().How to test
Related issue(s)/PR(s)
Resolves #16072
Compatibility notes
Manager only. Cookie name
modx_manager_language; value validated against available lexicons.Breaking change assessment
No API signature changes. Additive persistence for manager locale. Safe for patch releases.
Test coverage
No automated tests added; manual login/logout flow.
Contributors
None beyond author.
AI tool use
Cursor helped normalize this PR description to the repository template.