Page MenuHomePhabricator

Echo's default user options overrides prevent overrides in LocalSettings.php
Open, Needs TriagePublic


I'm splitting this from T296270: Cross-wiki notifications don't appear to be working as the follow-up discussion.

The default of true seems to be set in wmf config, not extension config.

Maybe the order of loading config is now a problem, when the hook is running after the settings is set and overrides it.

I think so, the hook is overwriting the config...which would mean it's impossible to set defaults for any of the other settings?

Also in Pre-UserOptionsLookup code [1] the hook overrides the defaults from LocalSettings.php.
It seems that options from the hook could not get values from the config. But the global is for that purpose.

It is not possible to change the order, because echo also looks for default of core settings, which should reflect changes in LocalSettings.php as well ... (but that is part of my patch set and could be removed as well).

The options with a fix name could be moved to extension.json, but the variable named options are not ready for overrides (but that is not new to echo extension).
Fixing all hooks to check if the option is already set is also much work and could be broken in future again.


Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 740940 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Move core's $wgDefaultUserOptions into class DefaultOptionsLookup

kostajh added a subscriber: kostajh.

Tagging Platform Engineering as the proposed patch touches code most recently updated by members of that team.