Page MenuHomePhabricator

New Topic tool ignores POSTed value for wpTextbox1
Closed, ResolvedPublicBUG REPORT

Description

It appears like the New Topic tool misses support for preloading the text field with some text. Here is an example tool that relies on this feature: https://steinsplitter.toolforge.org/uv/?specialform=dewiki&username=FooBarBazXyz&lang=en. Press the "Preview" button at the bottom. With the New Topic tool enabled the user runs into an empty form and gets stuck. When the New Topic tool is disabled it works as intended. The form is preloaded with the text the external tool posted via wpTextbox1 in a POST request.

I found a bit of code that disables the tool in similar situations that are not (yet) supported by the new tool: https://phabricator.wikimedia.org/diffusion/EDTO/browse/master/includes/Hooks/HookUtils.php$450. This is tracked in T269310, which is similar, but not the same. It appears like adding something like || $req->getBool( 'wpTextbox1' ) to this code might be an acceptable temporary solution for this specific issue here.

This was reported to the WMDE-TechWish by dewiki volunteers that take care of https://de.wikipedia.org/wiki/Wikipedia:Benutzernamen_ändern. Marking as Regression because this is what it effectively is from the user's perspective.

Event Timeline

You could also add dtenable=0 to the query string as a temporary fix, which would ensure you get the old form.

I found a bit of code that disables the tool in similar situations that are not (yet) supported by the new tool: https://phabricator.wikimedia.org/diffusion/EDTO/browse/master/includes/Hooks/HookUtils.php$450. This is tracked in T269310, which is similar, but not the same. It appears like adding something like || $req->getBool( 'wpTextbox1' ) to this code might be an acceptable temporary solution for this specific issue here.

That makes sense to me. Do you want to submit a patch?

I would love to but currently don't have the capacity to test it.

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

[mediawiki/extensions/DiscussionTools@master] Add 'wpTextbox1' to parameters that disable new topic tool

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

Change 840332 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Add 'wpTextbox1' to parameters that disable new topic tool

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

ppelberg claimed this task.