Page MenuHomePhabricator

Unable to access Special:Preferences on zhwiki(beta cluster): DomainException: HTMLForm::getField: no field named discussiontools-newtopictool
Closed, ResolvedPublicBUG REPORT

Description

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

What happens?:

  • I get an error

For Test page:

Screenshot 2022-02-09 at 08.15.50.png (2×3 px, 1 MB)

For parameters settings:
Screenshot 2022-02-09 at 08.17.04.png (2×3 px, 1 MB)

What should have happened instead?:

  • I should be able to edit preferences

Probably an issue with the path /Special:%E5%8F%82%E6%95%B0%E8%AE%BE%E7%BD%AE

Event Timeline

Aklapper renamed this task from Unable to access the parameters settings page on zhwiki(beta cluster) to Unable to access parameters settings page on zhwiki(beta cluster): DomainException: HTMLForm::getField: no field named discussiontools-newtopictool.Feb 9 2022, 8:42 AM
Aklapper added a project: DiscussionTools.

@EAkinloose: Assuming this task is about the DiscussionTools code project, hence adding that project tag so other people who don't know or don't care about team tags can also find this task when searching via projects. Please set appropriate project tags when possible. Thanks!

Esanders renamed this task from Unable to access parameters settings page on zhwiki(beta cluster): DomainException: HTMLForm::getField: no field named discussiontools-newtopictool to Unable to access Special:Preferences on zhwiki(beta cluster): DomainException: HTMLForm::getField: no field named discussiontools-newtopictool.Feb 9 2022, 1:39 PM
matmarex moved this task from Backlog to Triaged on the DiscussionTools board.
matmarex added subscribers: Func, matmarex.

Probably caused by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/753963 or one of the related patches by @Func, which I've merged yesterday. Thanks for spotting it.

The bug occurs when "sourcemodetoolbar" and "replytool" features are available for everyone, but "newtopictool" is not.

It's also buggy in production, but in a less obvious way – the preference "sourcemodetoolbar" is supposed to be hidden when "replytool" and "newtopictool" are turned off (per T275950), but when "newtopictool" is not available, it isn't. So that patch just exposed an existing bug.

image.png (2×3 px, 344 KB)

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

[mediawiki/extensions/DiscussionTools@master] Don't refer to non-existent fields when using 'hide-if'

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

Change 761348 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Don't refer to non-existent fields when using 'hide-if'

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

Looking sharp now, thanks!
For test page:

Screenshot 2022-02-09 at 17.45.29.png (2×3 px, 605 KB)

For parameters settings page:
Screenshot 2022-02-09 at 17.45.07.png (1×3 px, 620 KB)