Hi all,
We at ShoutWiki (http://www.shoutwiki.com/) updated from MediaWiki 1.21 to MediaWiki 1.22 earlier today. The upgrade went mostly smoothly, save for some smaller issues, but afterwards we ran into one major issue: user preferences are not being saved.
When a user updates their preferences via [[Special:Preferences]], the special page claims that the changes were saved correctly, but this is not the case. It seems that the only entries saved to user_properties are 'variant' and 'watchlisttoken'.
Setting a preference via eval.php seems to work:
$u = User::newFromName( 'Jack Phoenix' ); $u->setOption( 'signature',
'set via a CLI script' ); $u->saveSettings(); $dbw = wfGetDB( DB_MASTER ); $dbw->commit(); echo $u->getOption( 'signature' ); set via a CLI script
$u = User::newFromName( 'Jack Phoenix' ); echo $u->getOption( 'signature'
); set via a CLI script
...but this is an optical illusion. Visiting any wiki page seems to reset the preferences to their defaults.
We've diffed /includes/specials/SpecialPreferences.php, /includes/Preferences.php and /includes/User.php but nothing overly suspicious has come up.
ShoutWiki uses quite many extensions (see, for example, http://www.shoutwiki.com/wiki/Special:Version), some of which are yet to be released, but as far as I'm able to see, none of these mess with the preferences stuff. Unlike the defaults in /includes/DefaultSettings.php, the user_properties table is _not_ shared on ShoutWiki. Our essential configuration files are also published online at http://www.shoutwiki.com/conf/ .
Needless to say that this bug doesn't seem to manifest itself at least on my local development setup, only on production.
Anyone got any clues as to what might be causing this and how to fix it? If we're not able to fix this soon, we're forced to roll back the 1.22 change, because our users are rather fond of their preferences, obviously.
Thanks and regards, -- Jack Phoenix MediaWiki developer
Hi again,
Seems that we've solved this puzzle -- at least mostly. The problematic piece of code was the Gadgets extension. Disabling it allowed to save preferences normally. Why so, this is beyond me...the version we use(d) was the version that was bundled with the 1.22 tarball release. It should also be noted that on the wikis that we tested this issue and the fix, there were no defined gadgets. Of course, everything still works on my local development wiki, with or without Gadgets enabled...
I'd like to thank MatmaRex and Lewis Cawte, ShoutWiki's CTO, for pointing me in the right direction, which effectively made it possible to "fix" this issue. Of course, I'm sure that our hardcore gadget users would very much want their gadgets back and preferrably right away, so that'll be the next step...
Thanks and regards, -- Jack Phoenix MediaWiki developer
wikitech-l@lists.wikimedia.org