Page MenuHomePhabricator

Block form URL parameters not working (wpBlockReason, wpBlockReasonList, etc.)
Closed, DeclinedPublic

Description

It seems like &wpBlockReason= and &wpBlockReasonList= URL parameters are no longer working in MediaWiki 1.18 (whichever version is deployed to Wikimedia wikis right now). And possibly &wpBlockExpiry as well? r83795 seems like the likely culprit.

Sample URL: https://test.wikipedia.org/w/index.php?title=Special:Block&wpBlockAddress=Former+user+9172&wpBlockExpiry=indefinite&wpBlockReasonList=Abusing+%5B%5BWP%3ASock+puppetry|multiple+accounts%5D%5D&wpBlockReason=Please+see%3A+%5B%5BWikipedia%3ASockpuppet+investigations%2FFormer+user+9172%5D%5D


Version: unspecified
Severity: normal

Details

Reference
bz31851

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:47 PM
bzimport set Reference to bz31851.

Already reported. Also have a look at r101464

  • This bug has been marked as a duplicate of bug 30909 ***

Not a dup of that bug.

wpBlockReason, wpBlockReasonList, and wpBlockExpiry have been renamed to wpReason-other, wpReason, and wpExpiry, respectively. So https://test.wikipedia.org/w/index.php?title=Special:Block&wpBlockAddress=Former+user+9172&wpExpiry=indefinite&wpReason=Abusing+%5B%5BWP%3ASock+puppetry|multiple+accounts%5D%5D&wpReason-other=Please+see%3A+%5B%5BWikipedia%3ASockpuppet+investigations%2FFormer+user+9172%5D%5D should work for you.

I'll leave it to someone else to decide whether this should be WONTFIX or if compatibility logic should be added as is already done for wpBlockAddress.

This is a completely unnecessary breaking change to existing URLs. The pre-existing parameters should be re-added / re-implemented.

That special page was migrated to use HTMLForm a modern way to handles form in MediaWiki.

The change of query parameters can cause trouble to people using some javascript to reuse the form. Those scripts should probably be use the API instead.

I am against added a layer of compatibility but maybe we can thrown a warning message when the old parameters are used.

My advice is to migrate to the API calls.

(In reply to comment #4)

The change of query parameters can cause trouble to people using some
javascript to reuse the form. Those scripts should probably be use the API
instead.

It also causes problems for things like enwiki's [[Template:Emergency-bot-shutoff]]. The API can't really be used there. OTOH, it's also easy to fix a template like that.

I don't see any reason the parameters were renamed or removed (I'm not really sure which is the case here, I just know they're broken). Unless there was a valid reason to break the existing parameters, they should continue to work.

(In reply to comment #4)

My advice is to migrate to the API calls.

Moving to low priority as a result.

The main reason for the change was to remove the 'Block' part in variable name which does not make that much sense with the new HTMLForm.

This bug report is a valid one but not going to fix or add a compatibility layer. Most templates have been updated for now.