Page MenuHomePhabricator

Fix namespace blocks of removed extension namespaces (and actions)
Open, Needs TriagePublic3 Estimated Story Points

Description

Some namespaces are added by extensions. Users can be partially blocked against namespaces, including extension namespaces.

If a block blocks namespaces, the namespaces are shown in Special:BlockList:

If the extension is then uninstalled, the namespaces no longer appear, but instead we see empty bullet points:

The empty bullet points should not display if the namespace doesn't exist.

Loading the block into Special:Block/Blockable in order to edit Blockable's block also doesn't work properly, and on submission there is an error:

(The workaround is to open Special:Block, and enter Blockable as the target, instead of opening Special:Block/Blockable.)


What needs doing

  • The list of partial block restrictions is built in BlockListPager::getRestrictionListHTML. There's handling for PageRestrictions where the title no longer exists, and we should add something similar for NamespaceRestrictions and ActionRestrictions.
  • The Special:Block form is populated in SpecialBlock::maybeAlterFormDefaults. Again, there's a check for whether this title exists, and we should add something similar for the namespace and action.

Event Timeline

Note that whatever fix we introduce for this may need to be applied to action blocks too, since actions can be added by extensions.

Tchanders renamed this task from Fix namespace blocks of removed extension namespaces to Fix namespace blocks of removed extension namespaces (and actions).Wed, Apr 28, 5:25 PM
Tchanders updated the task description. (Show Details)