Page MenuHomePhabricator

Allow $input in LogEventsListGetExtraInputs hook, deprecate it
Closed, ResolvedPublic

Description

In converting Special:Log to HTMLForm for T117737 the LogEventsListGetExtraInputs hook now optionally takes a $formDescriptor array. At some point we should remove the old $input string.

rMW38756eae46a8: Special:Log: Convert to HTMLForm
rMW2dce53c5ae71: [wip] LogEventsListGetExtraInputs: Allow both string and array

Event Timeline

Change 445559 had a related patch set uploaded (by Prtksxna; owner: Prtksxna):
[mediawiki/core@master] LogEventsListGetExtraInputs: Keep $input and add $formDescriptor

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

Anomie subscribed.

This seems to have nothing to do with the action API.

The only extension using LogEventsListGetExtraInputs in Wikimedia version control is CentralAuth. Currently, the incompatible change is causing https://en.wikipedia.beta.wmflabs.org/wiki/Special:Log/gblrename to fail with:

[W040RQpEEj4AACDGL9QAAAAF] /wiki/Special:Log/gblrename MWException from line 463 of /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php: Descriptor with no class for extra: <label for="mw-log-gblrename-oldname">Previous username:</label> <input name="oldname" size="20" value="" id="mw-log-gblrename-oldname" />

Backtrace:

#0 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(482): HTMLForm::getClassFromDescriptor(string, string)
#1 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(342): HTMLForm::loadInputFromParameters(string, string, HTMLForm)
#2 /srv/mediawiki/php-master/includes/logging/LogEventsList.php(163): HTMLForm->__construct(array, RequestContext)
#3 /srv/mediawiki/php-master/includes/specials/SpecialLog.php(255): LogEventsList->showOptions(array, string, string, boolean, NULL, NULL, NULL, array, string, string)
#4 /srv/mediawiki/php-master/includes/specials/SpecialLog.php(147): SpecialLog->show(FormOptions, array)
#5 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(566): SpecialLog->execute(string)
#6 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(569): SpecialPage->run(string)
#7 /srv/mediawiki/php-master/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#8 /srv/mediawiki/php-master/includes/MediaWiki.php(867): MediaWiki->performRequest()
#9 /srv/mediawiki/php-master/includes/MediaWiki.php(524): MediaWiki->main()
#10 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#11 /srv/mediawiki/w/index.php(3): include(string)
#12 {main}

image.png (980×1 px, 180 KB)

Screenshots for comparison:

Change 445559 merged by jenkins-bot:
[mediawiki/core@master] LogEventsListGetExtraInputs: Keep $input and add $formDescriptor

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

https://www.mediawiki.org/wiki/Special:Log/gblrename is also broken, so change https://gerrit.wikimedia.org/r/445559 will need to be backported to wmf.13. We don't need to backport the CentralAuth change, it can roll out with the next train.

Change 446392 had a related patch set uploaded (by Bartosz Dziewoński; owner: Prtksxna):
[mediawiki/core@wmf/1.32.0-wmf.13] LogEventsListGetExtraInputs: Keep $input and add $formDescriptor

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

matmarex renamed this task from Remove deprecated $input from LogEventsListGetExtraInputs hook to Allow $input in LogEventsListGetExtraInputs hook, deprecate it.Jul 17 2018, 7:18 PM

Change 446392 merged by jenkins-bot:
[mediawiki/core@wmf/1.32.0-wmf.13] LogEventsListGetExtraInputs: Keep $input and add $formDescriptor

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