[5.x]: Multisite: Backend editor/media links stick to login site after top-bar switch (confusing UX)
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
On a Craft multisite installation (5.x), switching sites from the top admin bar correctly resolves the frontend preview/context for the selected site. However, the backend editor (entry editors, asset modals, etc.) and media-related links still appear to use the originally logged-in site's context/base URL.
Steps to reproduce
- Log into the control panel via Site A’s domain (e.g., sitea.example.com/admin).
- Switch to Site B using the site switcher in the top admin bar.
- Open an entry editor or asset field for Site B content.
- Observe media/asset links and editor preview URLs — they point to Site A’s domain/context.
- Frontend preview resolves correctly to Site B.
Expected behavior
Editor links/assets should immediately reflect the switched site's context, matching frontend behavior.
Actual behavior
Backend stays tied to the login site's context. Frontend correctly uses the active site's Base URL.
Why it's confusing:
Authors expect a seamless switch — previewing/editing Site B content should fully use Site B’s URLs everywhere. This creates cognitive dissonance when backend links don't match what authors see on frontend.
Craft CMS version
5.9.14
PHP version
8.2.3
Operating system and version
Linux 6.17.0-1010-azure
Database type and version
8.2.30
Image driver and version
GD 8.2.30
Installed plugins and versions
Contact Form | 3.1.0
Contact Form Honeypot | 2.1.0
Control Panel CSS | 3.0.0
Feed Me | 6.11.0
Field Manager | 4.0.3
Google Maps | 5.2.0
Linkit | 5.0.0
Navigation | 3.0.17
Position Fieldtype | 5.0.0
reCAPTCHA | 3.0.0
Redactor | 4.2
SEO | 5.1.20
Super Table | 4.0.5
Table Maker | 5.0.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the control panel: switch from Site A to Site B, then open an entry editor or asset field and compare its links with the frontend preview URL. Done means editor, asset, and media-related links consistently use the active site's context and base URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100