Page MenuHomePhabricator

Block form shows options reserved for IPs when blocking a user and viceversa
Closed, ResolvedPublic

Description

Since recently the block form does not hide options reserved for blocking IP addresses when blocking usernames nor viceversa. As such, if you try to block an username, the "Prevent logged-in users from editing from this IP address" (the former "block anonymous users only" option) appears and is not hidden as opposed to the past, when the block form seemed to detect which kind of user you were blocking (anonymous or registered) and showed the appropiate options. The "autoblock" and "hideuser" options, for example, makes no sense when blocking IP addresses for example. Thank you.


Version: unspecified
Severity: normal

Details

Reference
bz35893

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:13 AM
bzimport set Reference to bz35893.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

Since recently

Do you have a date? 2 months? last night?

(In reply to comment #1)

(In reply to comment #0)

Since recently

Do you have a date? 2 months? last night?

Thanks for your quick reply. I'm sorry but I do not have an specific date but I'm experiencing this since, say, 2 months probably. I though it was temporary or that somebody would notice it and report it here. It seems nobody did. So, if I had to choose an interval I'd say in the past 2 months. Regards.

Yes, it's been the same on fr.wikipedia.org, and presumably on all the other WMF wikis, since the MW 1.19 upgrade. Before, only relevant options would show up; now we have 7 boxes to tick, including some that won't change anything to the block.

I can't reproduce. I'm seeing 6 options, from which 5 are shown for usernames and 4 for ips, with the hiding being done with CSS+javascript.

(In reply to comment #4)

I can't reproduce. I'm seeing 6 options, from which 5 are shown for usernames
and 4 for ips, with the hiding being done with CSS+javascript.

At https://es.wikibooks.org/wiki/Especial:Bloquear/Platonides I still can see options reserved for IP addresses such as "Impedir que los usuarios identificados editen desde esta dirección IP".

At https://es.wikibooks.org/wiki/Especial:Bloquear/190.201.78.42 I still can see options reserved for user accounts such as "Bloquear automáticamente la dirección IP usada por este usuario y cualquier IP posterior desde la cual intente editar" and "Ocultar nombre de usuario de ediciones y listas".

Thanks.

alexsm333 wrote:

I confirm the issue.

The problem is that mediawiki.special.block.js is not called from the HTML source.
( https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/mediawiki.special/mediawiki.special.block.js;hb=HEAD )

As a temporary workaround I had to add this
to our local [[ru:MediaWiki:Group-sysop.js]]:
mw.loader.load('mediawiki.special.block')

(In reply to comment #6)

I confirm the issue.

The problem is that mediawiki.special.block.js is not called from the HTML
source.

Good call. Gerrit change 16557 will cause Special:Block to load this file.

Gerrit change 16557 has been merged.

(In reply to comment #8)

Gerrit change #16557 has been merged.

Thank you. Although I still see those options appearing in the block form. Probably the code isn't yet live in the sites?.

In the meanwhile I'll add the script indicated in comment #6 into the Meta's MediaWiki:Common.js file until this is resolved.

(In reply to comment #9)

(In reply to comment #8)

Gerrit change #16557 has been merged.

Thank you. Although I still see those options appearing in the block form.
Probably the code isn't yet live in the sites?.

Yeah. MediaWiki bugs get closed when MediaWiki is fixed, even though the fix doesn't immediately go live on Wikipedia or other Wikimedia sites.

It probably won't make it into 1.20wmf8, so it'll probably have to wait for 1.20wmf9 before it's deployed (which should be 2 weeks from the dates listed for wmf8 in [[mw:MediaWiki 1.20/Roadmap#Schedule for the deployments]]).