Page MenuHomePhabricator

Special:Preferences dies if user's date preference is not valid and the language does not have a formatting type named 'default'
Closed, ResolvedPublic

Description

simple patch to solve (?) the problem

The newly revamped [[Special:Preferences]] checks if all user preference values are valid, and if not, it resets them to the global defaults.

In case of the 'date' preference, the global default is hardcoded to 'default' (see $wgDefaultUserOptions), however, some languages do not have a date formatting style called 'default' (e.g. cs, hu). In those languages, Special:Preferences dies with an internal error “Global default default is invalid for field date” (see http://cs.wikipedia.org/wiki/Soubor:Vnit%C5%99n%C3%AD_chyba2.jpg).

The global default for date formatting should be language-dependent. However, no big deal, it seems we already have that, we are just not using it. See MessagesXx::$defaultDateFormat.

Therefore, I believe a fix might be as simple as presented in the attachment.


Version: unspecified
Severity: major
URL: http://en.wikipedia.org/wiki/Special:Preferences?uselang=cs

Attached:

Details

Reference
bz19239

Event Timeline

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

Hmmm… One other observation: it seems to me the whole date formatting idea is not too good… you have the (user-interface) language defining the _keys_ which are stored in (language-independent) database (in user/options).

This way, ?uselang=xx will always behave weirdly.

  • This bug has been marked as a duplicate of bug 19237 ***