Steps to reproduce
- Go to https://en.wikipedia.org/wiki/Special:GlobalPreferences
- Go to appearance tab
- only one set of checkboxes appears
- one set of checkboxes (2 at top) and a single checkbox below
The second lonely checkbox is the global pair for the MonoBook sub-preference (which will be toggled by JS the moment MonoBook is selected from the main prefs). The reason why the first checkbox does not appear to be lonely now is because when this screenshot was taken the user selected skin was Vector. If the selection is moved to MonoBook, its sub-pref will claim the checkbox, and the lone one still remains for the now hidden Vector sub-pref.
If the skin selection is moved to a skin that does not have sub-pref at all, like Timeless, two lonely checkboxes will appear. (One for Vector, one for MonoBook). If JS is disabled, the checkboxes will then correctly have corresponding items (since the sub-prefs are always visible in that case).
The problem stems from MediaWiki-extensions-GlobalPreferences. The issue in this case is that the sub-prefs are generated by external clients and displayed conditionally by JS while the checkbox pairs for the global setting are generated based on the total number of the preferences that can be used as global prefs unconditionally by the GlobalPreferences extension.
To fix this, GlobalPreferences needs to be fixed to tie visibility of the global-pair checkbox to the same or similar logic that is used to update visibility of the corresponding preference item.