User:DWalden (WMF)/GlobalPreferences
This covers testing both Special:GlobalPreferences and Special:Preferences when you have globally set a user preference.
How it works
edit- When you go to Special:GlobalPreferences, you can choose to make a user option global, and set its global value.
- Afterwards, when you go to Special:Preferences on any wiki, you will see the user option you made global in step 1 greyed out and with an extra checkbox next to it.
- If you click the new checkbox (in English called: "Set a local exception for this global preference") you can set the option to a different value for this wiki only.
Things to note
edit- Different user options can behave differently. It is worth testing a broad variety of them on Special:GlobalPreferences and Special:Preferences.
- Some options have dependencies on other options. For example, some options may only appear after enabling other options (e.g. phab:T294186#7538001, phab:T264150, phab:T292802)
- Different wikis have different user options. It is worth testing across a variety of wikis (both language and project).
- N.B. the user options which appear in Special:GlobalPreferences depend on what options are available on the local wiki.
- The UI might not correctly represent the actual user preferences in the database. See #Oracles.
Oracles
editOne thing to be aware of is that the UI might not correctly represent the actual user preferences in the database.
Two ways of dealing with this:
- Disable javascript in the browser. This should eliminate any javascript related bugs. (How to do it in Firefox, Chrome)
- Look in the database. These SQL queries will show the user preferences (locally and globally) for a single user:
SELECT user_properties.* FROM user_properties INNER JOIN actor ON actor_name="<username>" AND up_user=actor_user;
SELECT global_preferences.* FROM centralauth.global_preferences INNER JOIN centralauth.globaluser ON gu_name="<username>" AND gp_user=gu_id;
Scripts
editYou can use this javascript snippet on Special:GlobalPreferences to enable every option globally:
$( "input[name*='global']" ).click();
and then run this snippet on Special:Preferences to check every local override checkbox:
$( "input[name*='local-exception']" ).click();
and then this snippet to change the value of every user preference that is a checkbox:
$( "form#mw-prefs-form input:not([name*='local-exception'])" ).each( function( item ) { if ( this.type == "checkbox" ) { this.click() } } )