Page MenuHomePhabricator

Patch for T210937 needs backporting to 1.32 (API list=users mistakenly reports user as missing)
Closed, ResolvedPublic

Description

In an installation of MediaWiki 1.32, performing an API query in the format of:

{
	"action": "query",
	"format": "json",
	"list": "users",
	"usprop": "editcount|groups|rights|emailable|registration",
	"ususers": "Void-bot"
}

Provides the expected information on the user

{
    "batchcomplete": "",
    "query": {
        "users": [
            {
                "userid": 6440,
                "name": "Void-bot",
                ... Truncated for sake of task ...
            }
        ]
    }
}

However, performing the same API query, but including the usprop blockinfo:

{
	"action": "query",
	"format": "json",
	"list": "users",
	"usprop": "editcount|groups|rights|emailable|registration|blockinfo",
	"ususers": "Void-bot"
}

Returns the following:

{
    "batchcomplete": "",
    "query": {
        "users": [
            {
                "name": "Void-bot",
                "missing": ""
            }
        ]
    }
}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 5 2019, 6:51 PM
Paladox added a subscriber: Paladox.Feb 5 2019, 6:58 PM

Change 488236 had a related patch set uploaded (by Reedy; owner: Anomie):
[mediawiki/core@REL1_32] API: Use parenthesized join in ApiQueryBase::showHiddenUsersAddBlockInfo

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

Reedy added a subscriber: Reedy.Feb 6 2019, 5:05 AM

Kind of a "dupe" of T210937: API query for userprops not working on group0 wikis (maybe because comment migration read-new), but more the patch needs backporting to REL1_32, so not marking as a dupe

Anomie moved this task from Unsorted to Non-Code on the MediaWiki-API board.Feb 6 2019, 2:35 PM
Anomie renamed this task from API list=users mistakenly reports user as missing MW 1.32 to Patch for T210937 needs backporting to 1.32 (API list=users mistakenly reports user as missing).Feb 6 2019, 2:39 PM

Change 488236 merged by jenkins-bot:
[mediawiki/core@REL1_32] API: Use parenthesized join in ApiQueryBase::showHiddenUsersAddBlockInfo

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

Reedy closed this task as Resolved.Feb 6 2019, 8:46 PM
Reedy claimed this task.
Reedy removed a project: Patch-For-Review.