What is the problem?
If I have a local-exception for a global user option, if I unset and submit the form, the local value of that option remains set in the database.
If I submit the form a second time, the local value of the same option is removed (i.e. it is reset to default).
It feels to me like the outcome of both of those actions should be the same. Either the value should be removed the first time I submit, or the value should be maintained the second time I submit.
This affects a number of different user options, which I will list below.
Steps to reproduce problem
- Go to Special:GlobalPreferences
- Set "Allow other users to email me" as global and submit
- Go to Special:Preferences
- Check the local-exception checkbox for "Allow other users to email me", uncheck its local value and submit
- Check the database (you can use this SQL query: SELECT user_properties.* FROM user_properties INNER JOIN actor ON actor_name="<username>" AND up_user=actor_user WHERE up_property="disablemail";)
- In Special:Preferences, uncheck the local-exception for "Allow other users to email me" and submit again
- Check the database
- Submit the Special:Preferences form again (you might need to change another user preference in order to submit)
- Check the database
- Go to Special:GlobalPreferences and remove the global setting for "Allow other users to email me"
- Go to Special:Preferences and look at the value of "Allow other users to email me"
Observed behavior: The checkbox is checked, even though the last time I explicitly set that value I set it to unchecked. The value in the database is the same in steps 5 and 7 (the value is 1), it is different in step 9 (the value is not set).
Expected behavior: The bug for me is that I am submitting the Special:Preferences form twice without changing the value of "Allow other users to email me", but it is being set to a different value each time in the database.
I am not sure exactly what the expected behaviour should be (it might be a PM/design decision), but I suggest it should be one of either:
- a) The value of disablemail in the database in steps 5, 7 and 9 should be the same, or
- b) The value of disablemail in the database in steps 7 and 9 should be the same
User options affected
On enwiki beta, I set every user option (which is a checkbox type, I didn't test other kinds of user options) to be global. I repeated the repro steps above for all the options. The options I think are affected include (but not limited to):
(note that I only tested this on enwiki beta, and each wiki has a different set of user options. There might be more user options affected by this bug.)