Last modified: 2014-09-13 17:14:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72670, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70670 - Move things that are not preferences out of the preferences page
Move things that are not preferences out of the preferences page
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-10 18:23 UTC by Jon
Modified: 2014-09-13 17:14 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2014-09-10 18:23:41 UTC
I'm trying to build an ajax preferences form.

When I try to edit name
action:options
format:json
optionname:realname
optionvalue:Jon R

I get the following response:
{"warnings":{"options":{"*":"Validation error for 'realname': cannot be set by this module"}},"options":"success"}

As a result I can't finish this enhancement.
Comment 1 Kunal Mehta (Legoktm) 2014-09-10 18:26:14 UTC
"realname" is considered to be a special preference (see User::getOptionKinds() and Preferences::getSaveBlacklist()( and can't be set via the API.
Comment 2 Jon 2014-09-10 18:39:17 UTC
Historically why is this the case?
Comment 3 Kunal Mehta (Legoktm) 2014-09-10 18:42:07 UTC
I'm guessing because it's not a real preference and actually stored in the user table.
Comment 4 Bartosz Dziewoński 2014-09-10 18:47:42 UTC
Because 'realname' and 'emailaddress' are not actual user preferences stored in the (confusingly named) user_properties table, but properties of the user itself (like user name or password) stored in the user table (user_real_name and user_email fields). I don't know why they were implemented this way.

'emailaddress' is luckily not a problem here (it's not shown on Preferences; actually I don't know why it's in the blacklist), but 'realname' is. Perhaps it should get its own special page for changing it, like email and password? Or perhaps it should be converted into actual user pref?
Comment 5 Umherirrender 2014-09-10 19:12:17 UTC
When we want bug 63354 than we should not move the real name to the properties table.

'emailaddress' seems to be forgotten to remove, when the Special:ChangeEmail special page was created (r92924).
Comment 6 Brad Jorsch 2014-09-10 19:53:16 UTC
As far as the API goes, this is WONTFIX. We could change the error message for 'special' to the same as 'unused' ("not a valid preference") to avoid confusing people, but it wouldn't help Jon's use case.

But if someone wants to reopen this and reassign it to "User preferences" for moving realname off of Special:Preferences somehow, go ahead.
Comment 7 Chad H. 2014-09-10 19:56:55 UTC
(In reply to Bartosz Dziewoński from comment #4)
> Because 'realname' and 'emailaddress' are not actual user preferences stored
> in the (confusingly named) user_properties table, but properties of the user
> itself (like user name or password) stored in the user table (user_real_name
> and user_email fields). I don't know why they were implemented this way.
> 

Because those fields predate the user_properties table. Remember, prefs used to be stored as a blob in user.user_options.

> 'emailaddress' is luckily not a problem here (it's not shown on Preferences;
> actually I don't know why it's in the blacklist), but 'realname' is. Perhaps
> it should get its own special page for changing it, like email and password?
> Or perhaps it should be converted into actual user pref?

Let's do the last one! Move it to a real pref.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links