Page MenuHomePhabricator

DiscussionTools throws an exception in preferences.
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Make sure that the new topic tool in the Discussion tool is turned off by default and is not enabled in Beta.
  • Visit Special:Preferences.

What happens?: The following exceptions occur:

[7025127ad8d787356a39b016] /wiki/%ED%8A%B9%EC%88%98:%ED%99%98%EA%B2%BD%EC%84%A4%EC%A0%95 DomainException: HTMLForm::getField: no field named discussiontools-newtopictool

Backtrace:

from /var/www/wiki/w/includes/htmlform/HTMLForm.php(444)
#0 /var/www/wiki/w/includes/htmlform/HTMLFormField.php(145): HTMLForm->getField()
#1 /var/www/wiki/w/includes/htmlform/HTMLFormField.php(160): HTMLFormField->getNearestField()
#2 /var/www/wiki/w/includes/htmlform/HTMLFormField.php(277): HTMLFormField->getNearestFieldValue()
#3 /var/www/wiki/w/includes/htmlform/HTMLFormField.php(367): HTMLFormField->checkStateRecurse()
#4 /var/www/wiki/w/includes/htmlform/HTMLForm.php(2065): HTMLFormField->isDisabled()
#5 /var/www/wiki/w/includes/htmlform/HTMLForm.php(577): HTMLForm->loadFieldData()
#6 /var/www/wiki/w/includes/htmlform/HTMLForm.php(629): HTMLForm->prepareForm()
#7 /var/www/wiki/w/includes/specials/SpecialPreferences.php(121): HTMLForm->show()
#8 /var/www/wiki/w/includes/specialpage/SpecialPage.php(688): SpecialPreferences->execute()
#9 /var/www/wiki/w/includes/specialpage/SpecialPageFactory.php(1415): SpecialPage->run()
#10 /var/www/wiki/w/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#11 /var/www/wiki/w/includes/MediaWiki.php(916): MediaWiki->performRequest()
#12 /var/www/wiki/w/includes/MediaWiki.php(570): MediaWiki->main()
#13 /var/www/wiki/w/index.php(50): MediaWiki->run()
#14 /var/www/wiki/w/index.php(46): wfIndexMain()
#15 {main}

What should have happened instead?: Preferences should not cause exceptions.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.: MediaWiki 1.39.0-alpha (a5ab9fb), DiscussionTools 0.0.0 (790ef19). It is presumed to have been caused by a modification that is part of e0f231b.

Event Timeline

Change 803470 had a related patch set uploaded (by Bluehill395; author: Bluehill395):

[mediawiki/extensions/DiscussionTools@master] Show createpage preference only when feature is available

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

Esanders claimed this task.
Esanders subscribed.

Thanks, the original task is still in QA so we can close out this follow up.

matmarex subscribed.

Thanks for noticing this, we were planning to backport the faulty patch today ahead of the config deployment to enable the new topic tool more widely (T309368), so you probably saved us and the users a lot of annoyance.

Change 803470 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Show createpage preference only when feature is available

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

It's my pleasure. I found this issue while building a wiki for testing. I guess I'll have to backport this change to wmf.15 anyway.

Change 802965 had a related patch set uploaded (by Bluehill395; author: Bluehill395):

[mediawiki/extensions/DiscussionTools@wmf/1.39.0-wmf.15] Show createpage preference only when feature is available

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

Change 803528 had a related patch set uploaded (by Bartosz Dziewoński; author: Bluehill395):

[mediawiki/extensions/DiscussionTools@wmf/1.39.0-wmf.14] Show createpage preference only when feature is available

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

Change 802965 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.39.0-wmf.15] Show createpage preference only when feature is available

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

Change 803528 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.39.0-wmf.14] Show createpage preference only when feature is available

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

Mentioned in SAL (#wikimedia-operations) [2022-06-07T20:28:39Z] <urbanecm@deploy1002> Started scap: DiscussionTools backports + r803526 (T310053, T297990)

Mentioned in SAL (#wikimedia-operations) [2022-06-07T20:53:23Z] <urbanecm@deploy1002> Finished scap: DiscussionTools backports + r803526 (T310053, T297990) (duration: 24m 43s)