The checkbox on Special:Block that oversighters have to optionally suppress the username hides upon loading, even when using safemode (https://en.wikipedia.org/wiki/Special:Block/Amory?safemode=1) and regardless of skin; it's div#ooui-php-18 (formerly div#ooui-php-16 before 1.33.0-wmf.12). Thankfully the need to perform this action is rare; I'm not sure when exactly this started, but it's a somewhat recent (as of Nov 3 2018) regression, and behavioraly seems related to T209664.
Description
Related Objects
- Mentioned In
- T209664: "Prevent logged-in users from editing from this IP address" option is visible on Special:Block with accounts
- Mentioned Here
- T133036: Field "hideuser" on Special:Block should be hidden when time field not indefinite
T212808: "TypeError: editingRestrictionWidget is null" on Special:Block
T209664: "Prevent logged-in users from editing from this IP address" option is visible on Special:Block with accounts
Event Timeline
I confirm the bug report. I can reproduce this on a set of random projects with the exception of Meta where I can see the hideuser option.
This behaviour started after the fix for T212808 was merged. (In that sense it is indeed related to T209664.)
Before this fix, the page was encountering an error, and some of the logic on the page was not running - including the logic to show and hide the "hide user" option. Therefore, the "hide user" option was always showing.
Since this fix, the logic is now running. The logic basically says the "hide user" option should only show when "expiration" is set to indefinite and the target of the block is either empty or a username (i.e. not an IP address). This is how it now behaves - it shows when these conditions are met, but not otherwise. (I've checked locally but would be grateful if someone else could confirm on the wikis.)
Is this how the "hide user option" should behave? If not, how should it behave?
Aha. That explains why I saw the box on Meta but not elsewhere. Meta default block expiry is 'infinite' in others it's "Other time". I'll check again in some wikis but this is indeed the expected behaviour for hideuser: infinite blocks.
@Tchanders That makes sense, thanks for clarifying. Was this change documented or noticed somewhere? I think it's a good solution, but was a jarring change.
@Amorymeltzer It looks like the appearing/disappearing behaviour of the "hide user" option was introduced and discussed in T133036. When the page got broken, the option became always visible again; then when the page was fixed (T212808), the appearing/disappearing behaviour resumed. (The fix didn't touch the "hide user" option logic, it just unbroke the page.)
Do you think we should mention the changes brought about by this fix anywhere else, or is the discussion on this task enough?
@Tchanders No, this is good enough for me! Clearly mentioned at https://www.mediawiki.org/wiki/MediaWiki_1.30/wmf.12#Core_changes even if it didn't last long. Appreciate having the history.
I did the tests and indeed once your block lenght is set to 'infinite' the checkbox appears. Thank you.
Thank you MarcoAurelio.
The fix for T212808 is included on https://www.mediawiki.org/wiki/MediaWiki_1.33/wmf.12