Page MenuHomePhabricator

BetaFeatures preferences are no longer available in GlobalPreferences
Closed, ResolvedPublic

Description

Beta preferences should be available as a tab in Special:GlobalPreferences. After some discussion, TBD pointed out that not all wikis contain the same beta features, but @Izno mentioned that not all preferences are available on all wikis anyways.

Event Timeline

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

That's funny, they used to be available, and I have a few beta features enabled as global preferences (which I presumably can't unset now):

image.png (2×3 px, 461 KB)

Oh, I see why it happened! GlobalPreference has a list of field "classes" that are allowed to be global preferences ($allowedClasses). In rEBET163f1eba8914: Namespace extension, BetaFeatures's field classes have been effectively renamed. So they no longer match that list, and thus they have disappeared from global preferences.

The list needs to be updated. For future-proofing, perhaps something similar to rMW5bb8d031c085: HTMLFormField: Use non namespaced class name rather than static::class should be done, to ignore the namespaces in class names.

Oh, I see why it happened! GlobalPreference has a list of field "classes" that are allowed to be global preferences ($allowedClasses). In rEBET163f1eba8914: Namespace extension, BetaFeatures's field classes have been effectively renamed. So they no longer match that list, and thus they have disappeared from global preferences.

Oh, I never knew that GP had an allow-list model for such things. Oops, indeed.

The list needs to be updated.

Ack.

For future-proofing, perhaps something similar to rMW5bb8d031c085: HTMLFormField: Use non namespaced class name rather than static::class should be done, to ignore the namespaces in class names.

Maybe, but I'd worry about bringing in more confusion into GP, a system I don't grok enough as it is. :-)

Jdforrester-WMF renamed this task from Beta preferences in global preferences to BetaFeatures preferences are no longer available in GlobalPreferences.May 25 2021, 7:37 PM
Jdforrester-WMF added a project: Regression.

And yet another case where using stringified class names like that is just generally crappy for searchability (using an IDE rather than just grep etc)

Should be using ::class etc...

Change 699534 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/GlobalPreferences@master] Fix references to BetaFeatures classes

https://gerrit.wikimedia.org/r/699534

Change 699548 had a related patch set uploaded (by Reedy; author: Bartosz Dziewoński):

[mediawiki/extensions/GlobalPreferences@REL1_36] Fix references to BetaFeatures classes

https://gerrit.wikimedia.org/r/699548

And yet another case where using stringified class names like that is just generally crappy for searchability (using an IDE rather than just grep etc)

Should be using ::class etc...

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GlobalPreferences/+/699533

Change 699548 merged by jenkins-bot:

[mediawiki/extensions/GlobalPreferences@REL1_36] Fix references to BetaFeatures classes

https://gerrit.wikimedia.org/r/699548

Change 699534 merged by jenkins-bot:

[mediawiki/extensions/GlobalPreferences@master] Fix references to BetaFeatures classes

https://gerrit.wikimedia.org/r/699534

The change will be deployed to Wikimedia wikis on 22-24 June, per the schedule: https://www.mediawiki.org/wiki/MediaWiki_1.37/Roadmap

The change will be deployed to Wikimedia wikis on 22-24 June, per the schedule: https://www.mediawiki.org/wiki/MediaWiki_1.37/Roadmap

Awesome!