Page MenuHomePhabricator

Allow extensions to modify block error message key via a hook
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

BlockErrorFormatter is a service for handling block error messages, instead of the block objects handling this themselves.

It was introduced as part of an (ongoing) effort to make block objects value objects; however, it made block error reporting less flexible: BlockErrorFormatter chooses the message based on characteristics about the block, but is unaware of anything introduced by extensions, e.g. the GlobalBlock type.

We can use the hook system to re-introduce this flexibility.

Acceptance criteria
  • BlockErrorFormatter::getBlockErrorMessageKey runs a hook that allows extensions to check block characteristics and potentially override the chosen block error message key.

Related Objects

StatusSubtypeAssignedTask
ResolvedDreamy_Jazz
ResolvedDreamy_Jazz
OpenNone
ResolvedDreamy_Jazz
OpenSpikeNone
ResolvedCyndymediawiksim
ResolvedCyndymediawiksim
ResolvedCyndymediawiksim
ResolvedCyndymediawiksim
Resolved AGueyte
Resolved TThoabala
Resolved AGueyte
ResolvedWMDE-Fisch
Resolved AGueyte
ResolvedCyndymediawiksim
ResolvedCyndymediawiksim
ResolvedUniversal_Omega
ResolvedTchanders
ResolvedTchanders
Resolved AGueyte

Event Timeline

Change 832302 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/core@master] WIP: Create Hook to check block's error messages from extensions

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

Change 832302 merged by jenkins-bot:

[mediawiki/core@master] Create Hook to check block's error messages from extensions

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