Page MenuHomePhabricator

Language switcher shows multiple "Add languages" and "Settings" buttons
Closed, DuplicatePublicBUG REPORT

Description

It's apparently easy to run into the situation where the ULS menu in the top right corner of the new Desktop Improvements (Vector 2022) opens with more than one Add languages Add languages Add languages and buttons. I was able to reproduce it a few times (but not entirely consistently because it's a timing issue). Just click very fast. The internet connection doesn't need to be particularly slow for this to happen.

Screenshot from 2024-04-04 09-06-21.png (423×706 px, 38 KB)

My current theory is that the "avoid reinitializing ULS multiple times for an element" logic added via T289815: Sticky header: Add language switching functionality to sticky header isn't tight enough. The data attribute is only set after two more MediaWiki-ResourceLoader modules have been loaded, which takes time.

Event Timeline

Change #1017016 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/UniversalLanguageSelector@master] Avoid repeated initialization when clicking very fast

https://gerrit.wikimedia.org/r/1017016