Last modified: 2011-02-18 19:02:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 25508 - Poor API behavior when the SUL account does not exist
Poor API behavior when the SUL account does not exist
Product: MediaWiki extensions
Classification: Unclassified
CentralAuth (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Sam Reed (reedy)
Depends on:
Blocks: noncoreapi
  Show dependency treegraph
Reported: 2010-10-13 01:21 UTC by Brad Jorsch
Modified: 2011-02-18 19:02 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Completely untested patch (1.51 KB, patch)
2010-10-13 01:21 UTC, Brad Jorsch

Description Brad Jorsch 2010-10-13 01:21:22 UTC
Created attachment 7730 [details]
Completely untested patch

When the SUL account does not exist, meta=globaluserinfo returns a fatal error from the API. The core API query modules, on the other hand, normally just set a "missing" property on the appropriate result node, which allows other modules in the same query to return results.

I'd really like to see something like this as a return from the above URL:

<?xml version="1.0"?>
    <globaluserinfo missing="">
        <account wiki="alswiki" editcount="0" />
        <account wiki="arwiki" editcount="0" />
        <account wiki="cowiki" editcount="1" />
        <account wiki="commonswiki" editcount="0" />
        <account wiki="cswiki" editcount="0" />
        <account wiki="dawiki" editcount="0" />
        <account wiki="dewiki" editcount="0" />
        <account wiki="elwiki" editcount="0" />
        <account wiki="enwikibooks" editcount="0" />
        <account wiki="enwikinews" editcount="0" />
        <account wiki="enwiki" editcount="46" />
        <account wiki="yiwiki" editcount="0" />
        <account wiki="zhwiki" editcount="0" />

In other words, still include the "unattached" info even when the SUL account is missing. I have no way to test it, but it might be as simple as the attached patch. You'd want to fix the indentation, of course, but I know MediaWiki devs like to review patches without indentation changes.
Comment 1 Sam Reed (reedy) 2011-02-18 19:02:19 UTC
Done some rough testing, and seems we can get unattached accounts fine when
there isn't a global account

Tweaked and fixed patch applied in r82412

Thankyou! :)

Note You need to log in before you can comment on or make changes to this bug.