Page MenuHomePhabricator

Make sure the "Account creation" checkbox on the Special:Block form reflects the wpCreateAccount query param
Closed, ResolvedPublic2 Estimated Story Points

Description

https://www.mediawiki.org/wiki/Manual:Block_and_unblock#URL_parameters probably needs an update after the introduction of partial blocks. For example, passing wpCreateAccount via an URL such as https://meta.wikimedia.org/w/index.php?title=Special:Block&wpTarget=Example~metawiki&wpExpiry=infinite&wpHardBlock=0&wpAutoBlock=0&wpCreateAccount=0&wpReason=other&wpReason-other=Test will have the "account creation" checkbox marked despite wpCreateAccount=0. I checked SpecialBlock.php but CreateAccount is still called as such, thus no idea how to fix this.

Another question is to document if it is possible to pass URL parameters to perform partial blocks, its options, etc.

Thank you.

Event Timeline

Niharika set the point value for this task to 2.
Niharika moved this task from Triage/To be Estimated to Zayin - ז on the Anti-Harassment board.

Change 500802 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@master] Fix wpCreateAccount bug when set on Special:Block url params

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

Change 500802 merged by jenkins-bot:
[mediawiki/core@master] Fix wpCreateAccount bug when set on Special:Block url params

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

NB this problem is specific to wpCreateAccount - the fix makes sure we don't override the status of the "Account creation" checkbox if the wpCreateAccount parameter is present.

Tchanders renamed this task from Update URL block parameters after partial blocks to Make sure the "Account creation" checkbox on the Special:Block form reflects the wpCreateAccount query param.Apr 4 2019, 1:11 PM

@MarcoAurelio We have documented the partial blocks params wpEditingRestriction, wpPageRestrictions and wpNamespaceRestrictions at https://www.mediawiki.org/wiki/Manual:Block_and_unblock

dom_walden subscribed.

If wpCreateAccount is set in the url, then "Block account creation" will be checked/unchecked as appropriate and not change when toggling.

Otherwise, the behaviour of "Block account creation" checkbox as it was before: it changes when you toggle between sitewide and partial, unless editing a block or resubmitting the form.

All the parameters in https://www.mediawiki.org/wiki/Manual:Block_and_unblock#URL_parameters modify the form as appropriate, including when not using JS.

Environment:
https://en.wikipedia.beta.wmflabs.or
MediaWiki 1.33.0-alpha (a38af7b) 17:25, 7 April 2019