Skip to content

[6.x] Restore selected site when resuming session#14562

Merged
jasonvarga merged 1 commit into6.xfrom
restore-selected-site
Apr 28, 2026
Merged

[6.x] Restore selected site when resuming session#14562
jasonvarga merged 1 commit into6.xfrom
restore-selected-site

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

This pull request fixes an issue where the site switcher resets to the first site after session expiry, even though the UI still shows the previously selected site.

This was happening because when a user re-authenticates via the session expiry modal, a new server-side session is created without the statamic.cp.selected-site value. The Vue state still held the correct site, but the server defaulted to the first authorized site, causing a mismatch.

This PR fixes it by restoring the selected site on the server after re-authentication, using the site handle still held in the frontend config.

Fixes #14400

@jasonvarga jasonvarga merged commit 306a2e7 into 6.x Apr 28, 2026
18 checks passed
@jasonvarga jasonvarga deleted the restore-selected-site branch April 28, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site switcher resets after session expiry, UI doesn't reset

2 participants