Page MenuHomePhabricator

Error in Preferences in debug mode
Closed, DuplicatePublic

Description

I am having some problems with recent changes so I turned on debug mode. When I go into preferences, I get

Deprecated: Use of 'default' parameter as a string when using 'rawrow' (must be a FieldLayout or subclass) was deprecated in MediaWiki 1.32. [Called from HTMLForm::displaySection in /home/ccmdb/ccmdb.kuality.ca/includes/htmlform/HTMLForm.php at line 1672] in /home/ccmdb/ccmdb.kuality.ca/includes/debug/MWDebug.php on line 309

This wiki is >10yr old so there might be some LocalSettings entries that are causing this, but I tried it with all user settings entries commented out and it still gives this error.

MediaWiki: 1.32.2
PHP: 7.2.11

This may have the same root cause as my recent changes issue but looked like something unrelated that might have been missed, so flagging.

Event Timeline

Reedy subscribed.

Did you disable all extensions to test?

Not blaming you, but the function is a bit bad at giving us a clue as to where it might be being called from...

	public function getOOUI( $value ) {
		if ( !empty( $this->mParams['rawrow'] ) ) {
			if ( !( $value instanceof OOUI\FieldLayout ) ) {
				wfDeprecated( "'default' parameter as a string when using 'rawrow' " .
					"(must be a FieldLayout or subclass)", '1.32' );
			}
			return $value;
		}

		return parent::getOOUI( $value );
	}

Change 516761 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/core@master] htmlform: Reveal method getOOUI() is called from when spitting deprecation notice

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

matmarex subscribed.

The warning is caused by SemanticMediaWiki, see here: T205956#4633005 T205956#4633514

The warning is caused by SemanticMediaWiki, see here: T205956#4633005 T205956#4633514

Do we need/want to backport your change? So this is obviously a dupe...

No need to backport anything.

To clarify, this message used to be an exception; in T205956, it was changed to a warning, and is mostly harmless now. There is nothing to do in MediaWiki about this, SemanticMediaWiki should be updated to not trigger the warning.

I’m guessing it wasn’t reported upstream?

Change 516761 merged by jenkins-bot:
[mediawiki/core@master] htmlform: Reveal method getOOUI() is called from when spitting deprecation notice

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