Unnecessary url cache context getting added to the Toolbar

Created on 3 June 2025, 4 months ago

Problem/Motivation

Language switcher is adding a url cache context to the toolbar. This makes a cache variation of the entire toolbar for each distinct urls, because of cache bubbling. Even if we checked the "Disable toolbar language switcher" option, the same cache context is getting added to the toolbar. Same thing happening if we are not using the language module or there is only one language enabled.

Steps to reproduce

Proposed resolution

Add 'admin_toolbar_langswitch' array to the toolbar only if there is a language switcher needed.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India sijumpk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024