Page MenuHomePhabricator

Fix uses of (error|warning)box (MediaWiki core)
Closed, ResolvedPublic

Description

All usages of (error|warning|success)box CSS classes should be fixed in core.

For example the login and signup special pages have ?error and ?warning URL parameters that can be used to show a custom message, which ends up in this code:

LoginSignupSpecialPage::getFieldDefinitions()
		if ( $this->mEntryError ) {
			$fieldDefinitions['entryError'] = [
				'type' => 'info',
				'default' => Html::rawElement( 'div', [ 'class' => $this->mEntryErrorType . 'box', ],
					$this->mEntryError ),
				'raw' => true,
				'rawrow' => true,
				'weight' => -100,
			];
		}

$this->mEntryErrorType . 'box' can be errorbox or warningbox. Those classes are going away, see parent task.

Event Timeline

Ammarpad renamed this task from Fix uses of (error|warning)box in LoginSignupSpecialPage (MediaWiki core) to Fix uses of (error|warning)box (MediaWiki core).Jan 29 2022, 9:38 AM
Ammarpad added a project: MediaWiki-General.
Ammarpad updated the task description. (Show Details)
Ammarpad added a subscriber: Ammarpad.

Change 768144 had a related patch set uploaded (by Stang; author: Stang):

[mediawiki/core@master] Fix uses of (error|warning|success)box in core

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

Change 768144 merged by jenkins-bot:

[mediawiki/core@master] Fix uses of (error|warning|success)box in core

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

Change 773937 had a related patch set uploaded (by Stang; author: Stang):

[mediawiki/core@master] Replace (error|warning)box with id attribute in core

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

Change 773937 merged by jenkins-bot:

[mediawiki/core@master] Replace (error|warning)box with id attribute in core

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

Thanks, @Stang for working on this one!

Note: T304363 tracks removing the IDs but we can do that at a later date!