Page MenuHomePhabricator

Expired blocks can appear as applied to users in several MediaWiki interfaces
Closed, ResolvedPublic

Description

My block expired on sr.wikipedia.org on July 3, 2017 (17:04 CEST).

However, it is still written "(blocked)" on https://sr.wikipedia.org/w/index.php?title=Special:UserList&limit=1&username=Obsuser, and also on https://tools.wmflabs.org/xtools-ec/?user=Obsuser&project=sr.wikipedia.org there is "Current block: 20170703150424" notice even that current timestamp is 20170714094930 i.e. after this one and that I've been actively contributing with no problems since block expiration.

Details

Event Timeline

Urbanecm lowered the priority of this task from Medium to Lowest.Jul 14 2017, 7:31 PM
Urbanecm subscribed.

Lowest, that isn't anything that can't wait. Also it will require direct database touching probably and this won't be processed. You may ask local sysops to block you and then unblock you (so everything will be processed again), don't know if it will solve anything, just an idea.

OK. I was thinking if this weird thing happens maybe to other accounts too, so that's why triage was set to Normal. I would not like to have block log filled anymore, especially not with unneeded other-purpose-and-temporary blocks; the log already contains two extra rows for when there was block made by mistake (and instantly removed) but also many unjustified ones removed by other admins shortly after being imposed...

This can wait if it's only problem for me but it would be useful to check if anyone else had similar problem on other Wikipedias and what is the cause.

It definitely isn't a issue in the tool itself. Just some Mediawiki internal problem which got replicated to labs.

Aklapper raised the priority of this task from High to Needs Triage.Jul 21 2017, 11:15 AM

@Bugreporter: If you disagree with the urgency/priority of this, replying to the arguments in T170659#3440021 is welcome instead of changing the task priority without providing reasons. "One more affected user" does not make tasks more urgent. :)

I don't see either of those accounts as being marked as (blocked) anymore. Either the bug has been resolved (maybe due to the OOUI upgrade, not sure when that happened) or some layer of caching has cleared.

TBolliger renamed this task from Removing "blocked" status for users whose block expired to Defect: "blocked" status still displays for users whose block expired.Jan 12 2018, 11:10 PM

API also returned (already passed) block status:

https://www.wikidata.org/w/api.php?action=query&list=allusers&aufrom=GZWDer%20(flood)&auprop=blockinfo&aulimit=1

This may confuse other bots and external tools which do not check blockexpiry.

Aklapper raised the priority of this task from Medium to Needs Triage.May 11 2025, 7:23 AM
Aklapper added a subscriber: WikanBoy123.

Change #1196947 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] pagers: Filter out expired blocks for user pagers

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

Dreamy_Jazz renamed this task from Defect: "blocked" status still displays for users whose block expired to Expired blocks can appear as applied to users in several MediaWiki interfaces.Oct 17 2025, 5:05 PM

API also returned (already passed) block status:

https://www.wikidata.org/w/api.php?action=query&list=allusers&aufrom=GZWDer%20(flood)&auprop=blockinfo&aulimit=1

This may confuse other bots and external tools which do not check blockexpiry.

API handles block expiry correctly since 2016 (commit 0bf5f49), as far as I can see.

Example of EXPLAIN query outputs as requested on Gerrit:

image.png (966×2 px, 259 KB)

The only MediaWiki interfaces listed in the task that have issues are the following:

Other interfaces listed are toolforge tools etc. so should be handled separately to this ticket, either as separate Phab tickets or using their bug reporting system. However, it seems that by fixing the API those tools are likely fixed too.

Therefore, this should be able to be resolved once https://gerrit.wikimedia.org/r/1196947 has been merged

+2'd the associated patch and will resolve this task

Change #1196947 merged by jenkins-bot:

[mediawiki/core@master] pagers: Filter out expired blocks for user pagers

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