Page MenuHomePhabricator

PHP Deprecated: Use of HTMLTitleTextField::validate will reject external titles in 1.38 when interwiki is false was deprecated in MediaWiki 1.37. [Called from HTMLFormField::getErrorsRaw]
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: Use of HTMLTitleTextField::validate will reject external titles in 1.38 when interwiki is false was deprecated in MediaWiki 1.37. [Called from HTMLFormField::getErrorsRaw]
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLFormField.php(937)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, string, array)
#1 /srv/mediawiki/php-1.37.0-wmf.9/includes/debug/MWDebug.php(376): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.37.0-wmf.9/includes/debug/MWDebug.php(352): MWDebug::sendRawDeprecated(string, boolean, string)
#3 /srv/mediawiki/php-1.37.0-wmf.9/includes/debug/MWDebug.php(230): MWDebug::deprecatedMsg(string, string, string, integer)
#4 /srv/mediawiki/php-1.37.0-wmf.9/includes/GlobalFunctions.php(998): MWDebug::deprecated(string, string, string, integer)
#5 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/fields/HTMLTitleTextField.php(74): wfDeprecated(string, string)
#6 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLFormField.php(937): HTMLTitleTextField->validate(string, array)
#7 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLFormField.php(627): HTMLFormField->getErrorsRaw(string)
#8 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLForm.php(1747): HTMLFormField->getOOUI(string)
#9 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLForm.php(1767): HTMLForm->displaySection(array, string, string, boolean)
#10 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLForm.php(1322): HTMLForm->displaySection(array, string)
#11 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/OOUIHTMLForm.php(279): HTMLForm->getBody()
#12 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLForm.php(1106): OOUIHTMLForm->getBody()
#13 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLForm.php(1078): HTMLForm->getHTML(boolean)
#14 /srv/mediawiki/php-1.37.0-wmf.9/includes/htmlform/HTMLForm.php(629): HTMLForm->displayForm(boolean)
#15 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/FormSpecialPage.php(187): HTMLForm->show()
#16 /srv/mediawiki/php-1.37.0-wmf.9/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php(105): FormSpecialPage->execute(NULL)
#17 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/SpecialPage.php(646): GrowthExperiments\Specials\SpecialEditGrowthConfig->execute(NULL)
#18 /srv/mediawiki/php-1.37.0-wmf.9/includes/specialpage/SpecialPageFactory.php(1362): SpecialPage->run(NULL)
#19 /srv/mediawiki/php-1.37.0-wmf.9/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#20 /srv/mediawiki/php-1.37.0-wmf.9/includes/MediaWiki.php(917): MediaWiki->performRequest()
#21 /srv/mediawiki/php-1.37.0-wmf.9/includes/MediaWiki.php(551): MediaWiki->main()
#22 /srv/mediawiki/php-1.37.0-wmf.9/index.php(53): MediaWiki->run()
#23 /srv/mediawiki/php-1.37.0-wmf.9/index.php(46): wfIndexMain()
#24 /srv/mediawiki/w/index.php(3): require(string)
#25 {main}
Impact
Notes

Details

Event Timeline

kostajh created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is caused by suggested edits configuration containing an interwiki link in https://nl.wikipedia.org/wiki/Speciaal:EditGrowthConfig. It should cause no user-facing bug, and was already fixed by 42840ee – when introducing interwiki links to the form, I forgot to enable them for suggested edits links as well.

We can backport the fix to get rid of the deprecation warning if you wish, but since this happens very rarely (this form is not used a lot), we can probably also just wait for the train.

Actually, it looks I was wrong in my judgement this does not bring any user-facing error. This happened when I tried to save Special:EditGrowthConfig:

image.png (250×773 px, 19 KB)

I'll backport the fix, as nlwiki is one of the newly deployed wikis, and Benoit or community might want to do changes.

Change 700740 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.9] EditGrowthConfig: Suggested edit "Learn more" link should support interwiki

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

Change 700740 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.37.0-wmf.9] EditGrowthConfig: Suggested edit "Learn more" link should support interwiki

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

Mentioned in SAL (#wikimedia-operations) [2021-06-23T18:35:14Z] <urbanecm@deploy1002> Synchronized php-1.37.0-wmf.9/extensions/GrowthExperiments/includes/Specials/SpecialEditGrowthConfig.php: 17efbafc300c6745928415d7a10f2dad8f406de4: EditGrowthConfig: Suggested edit "Learn more" link should support interwiki (T279886; T285385) (duration: 01m 06s)