Page MenuHomePhabricator

Changing skin in userOptions.php fails.
Closed, InvalidPublic

Description

Author: akozak

Description:
Recently we attempted to change all user skin preferences to vector with the command:

php userOptions.php skin --old monobook --new vector

It appeared to run successfully (with messages like "Setting skin for <user> from 'monobook' to 'vector'): OK") but our preferences had in fact not been changed, and when we ran "php userOptions.php skin --usage" we got:

Usage for <skin> (default: 'vector'):
1 user(s): 'modern'

Done.

whereas before when we ran it we a breakdown of skin usage for our users.

Following a direct modification of the database to update user skin preferences, running the command "php userOptions.php skin --usage" shows nothing but "Done."


Version: 1.16.x
Severity: normal

Details

Reference
bz24818

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport set Reference to bz24818.
bzimport added a subscriber: Unknown Object (MLST).

Setting a preference to a global default simply removes it from database, so what you're seeing in response to php userOptions.php skin --usage is normal. Are you saying that users didn't observe a change in their preferences? (Note that user objects may be cached and although a change in prefrerences should result in cache invalidation, all kinds of glitches can happen).

Have you tried setting $wgDefaultSkin = 'vector'; yet?

akozak wrote:

We'd set the $wgDefaultSkin = 'vector', but are unable to replicate the original bug (the vector skin is enabled just fine according to our users). It's possible there was an unrelated issue (maybe a syntax error in LocalSettings when we first set the new default skin).

Is there somewhere in the documentation I or someone can make a note that "php userOptions.php skin --usage" will not display the skin preference if it's set to the default, since that's somewhat unintuitive behavior? Maybe it isn't that big of an issue.

Thanks for the help!

syntax error in LocalSettings

...always result in wiki being completely unusable.

Is there somewhere in the documentation

That's bug 1 :/