Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
- Install Drupal 8 using a language other than English.
- Add English as a second language.
- Enable "User" in language Detection and selection settings.
- In user profile settings (uid1) set both "Site language" to English.
- Boom: when you are at the admin pages or looking at site content pages with "en" URL prefix, the toolbar buttons disappeared from the vertical toolbar. Submenu items are not rendered in HTML too. Switch to the default non-English language and they are back.
Proposed resolution
Remaining tasks
User interface changes
The submenu will be loaded properly.
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#10 | 2612126-toolbar-network-info.png | 163.31 KB | thamas |
#4 | d8-toolbar-buttons-disappear.png | 43.63 KB | thamas |
Comments
Comment #2
thamasComment #3
thamasComment #4
thamasComment #5
Gábor HojtsyI think this may be down to language differences in how the submenus are downloaded (or not downloaded probably :). If I were you I would firebug the page and see which URL was used to request the submenus and if it returned a result.
Comment #6
Gábor Hojtsy#2313309: Admin toolbar and contextual links should always be rendered in the admin language (if set) may be related.
Comment #7
thamas@Gábor Hojtsy You are right, it is important. Not just the buttons disappear, there are no submenu items in the html output rendered.
Comment #8
thamasComment #9
thamasComment #10
thamasAs suggested by @Gábor Hojtsy I checked network info in the browser and you can see in the screenshot what I got: a "403 Forbidden" message to the AJAX request.
Comment #11
Gábor HojtsyRetitling. I can reproduce with the steps. Not sure what is the reason, but don't have the time to debug further unfortunately :/ I did turn off the account admin pages language option and the bug was still reproducible.
Comment #12
Gábor HojtsyComment #13
Gábor HojtsyComment #20
rwam CreditAttribution: rwam commentedComment #25
larowlanClosing this as a duplicate of #2868193: 'Account administration pages' language negotiation causes 'access denied' in toolbar subtree caching. which has more progress