Page MenuHomePhabricator

WikiPageConfigLoader: Treat "config page does not exist" as a non-error state
Closed, ResolvedPublic

Description

Currently, WikiPageConfigLoader::load will return an error if the configuration page does not exist. In the two usages we have for WikiPageConfigLoader, this can have two implications:

  • In the community configuration, everything will be configured based on what the PHP globals say
  • In the structured mentor list, mentorship would behave just as if there were no mentors listed at all.

In both cases, this is precisely what happens if WikiPageConfigLoader::load returned an empty array, instead of failing.

I think we should make WikiPageConfigLoader::load simply return an empty array in this case, as the end result would be the same.

Event Timeline

Change 868158 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] WikiPageConfigLoader: Stop treating "page does not exist" as failure state

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

Urbanecm_WMF changed the task status from Open to In Progress.Dec 14 2022, 7:56 PM
Urbanecm_WMF triaged this task as Medium priority.

Test wiki created on Patch demo by Martin Urbanec (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/2d3deeaa96/w

Change 868158 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] WikiPageConfigLoader: Stop treating "page does not exist" as failure state

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

Test wiki on Patch demo by Martin Urbanec (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/2d3deeaa96/w/