Page MenuHomePhabricator

Unable to add new custom messages to validErrorMessages
Closed, ResolvedPublic

Description

LoginForm::$validErrorMessages restricts the number of valid error messages. For a custom special page which requires login e.g. Special:Uploads (on mobile) we would like to display a custom message.

Should we add a hook or is there a nicer way extensions can register new messages?


Version: unspecified
Severity: normal

Details

Reference
bz71769

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz71769.
bzimport added a subscriber: Unknown Object (MLST).

Another way i was thinking about is to add a new config variable storing an array with additional valid messages. This would need a little rewrite of the currently used access to the static var (LoginForm::$validErrorMessages). The negative point: Extensions still need to set thier messages very early in the setup process.

Change 170520 had a related patch set uploaded by Florianschmidtwelzow:
UserLogin: Allow extensions to add valid error messages

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

Change 170521 had a related patch set uploaded by Jdlrobson:
Use Hook to add valid error messages

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

Change 170520 merged by jenkins-bot:
UserLogin: Allow extensions to add valid error messages

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

Change 170521 merged by jenkins-bot:
Use Hook to add valid error messages

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