Page MenuHomePhabricator

On Special:ChangeContentModel the required field warning is shown before editing form
Closed, ResolvedPublic

Description

I just noticed this tiny bug on Special:ChangeContentModel: if you simply open the page, a couple of aria- warnings will show up, asking to fill the title field, since it's required. However, this happens before even touching the field and without a submitted request, which I'm sure it's not intentional.
Please note that this was noticed from mobile Safari, although I think it shouldn't be related to the problem itself; also, right now I'm not able to check the code myself, but I'll do it tomorrow, especially looking at recent changes (AFAICR it was working fine a few weeks ago).

Event Timeline

Daimona added a subscriber: matmarex.

Well, I found the problem: https://gerrit.wikimedia.org/r/#/c/431632/, with which we already dealt in AbuseFilter in T194425. The reason here is the one expressed in the "ToDo" and in the gerrit comment below. This is the second time that patch is breaking something out of its scope, I'm wondering wether we should revert it and eventually re-apply a nicer version. Adding @matmarex as author.

Ugh, that's unfortunate… I would rather not revert the patch, I think the new way makes much more sense, it's just that we were relying on the old weird behavior in some places :/ I'll submit a fix for Special:ChangeContentModel.

Change 440256 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] SpecialChangeContentModel: Always use POST method for both forms

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

I have just briefly reviewed all other uses of 'type' => 'title' in MediaWiki and extensions and it seems that the other ones should be fine, since the field seems to actually be required in them (or is the only field in the form).

Vvjjkkii renamed this task from On special:changecontentmodel the required field warning is shown before editing form to lkbaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
Daimona renamed this task from lkbaaaaaaa to On special:changecontentmodel the required field warning is shown before editing form.Jul 1 2018, 9:41 AM
Daimona raised the priority of this task from High to Needs Triage.
Daimona updated the task description. (Show Details)
Daimona added subscribers: gerritbot, Aklapper.
Reedy renamed this task from On special:changecontentmodel the required field warning is shown before editing form to On Special:ChangeContentModel the required field warning is shown before editing form.Apr 22 2020, 2:44 PM

Change 440256 merged by jenkins-bot:
[mediawiki/core@master] SpecialChangeContentModel: Always use POST method for both forms

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

Huji assigned this task to matmarex.
Huji triaged this task as Low priority.