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

Prtksxna created this task.Jul 13 2018, 2:33 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 13 2018, 2:33 AM

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 added a subscriber: Anomie.

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

Anomie removed a subscriber: Anomie.Jul 13 2018, 2:45 PM

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}

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

matmarex closed this task as Resolved.Jul 18 2018, 12:10 AM
matmarex removed a project: Patch-For-Review.