Last modified: 2009-12-11 15:48:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23817, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21817 - API returning empty results for list=usercontribs
API returning empty results for list=usercontribs
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-11 08:14 UTC by Gurch
Modified: 2009-12-11 15:48 UTC (History)
4 users (show)

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


Attachments
Proposed fix: Add check for empty 'ucuser=' parameter to ApiQueryUserContributions.php (580 bytes, patch)
2009-12-11 09:36 UTC, P.Copp
Details

Description Gurch 2009-12-11 08:14:38 UTC
The API is returning empty results for list=usercontribs on Wikimedia sites. Example: http://en.wikipedia.org/w/api.php?action=query&list=usercontribs&ucuser=Gurch
Comment 1 Gurch 2009-12-11 08:26:48 UTC
Tested locally with wmf-deployment branch, works fine.

Server admin log for December 11 has:

# 01:26 logmsgbot: midom synchronized php-1.5/includes/api/ApiQueryUserContributions.php
# 00:37 Tim: killed long-running (34ks) API contributions query on db12, apparently filled up /a/tmp

which would be about when the problem started. Either the change is buggy or disabling the query was the intention, if the latter can it at least give an error message rather than blank output, it's breaking various tools.
Comment 2 P.Copp 2009-12-11 09:36:31 UTC
Created attachment 6871 [details]
Proposed fix: Add check for empty 'ucuser=' parameter to ApiQueryUserContributions.php

I suspect this may be the reason why it has been disabled:

api.php?action=query&list=ucercontribs&user=

results in

SELECT /* ApiQueryContributions::execute 127.0.0.1 */  rev_timestamp,page_namespace,page_title,rev_user_text,rev_deleted,rev_page,rev_id,page_latest,rev_comment,rev_len,rev_minor_edit,rev_parent_id  FROM `page`,`revision` FORCE INDEX (usertext_timestamp)   WHERE (page_id=rev_page) AND ((rev_deleted & 4) = 0)  ORDER BY rev_timestamp DESC LIMIT 11

which will filesort the entire revision table due to the missing 'rev_user_text'-condition.
Comment 3 Roan Kattouw 2009-12-11 15:48:06 UTC
(In reply to comment #2)
> Created an attachment (id=6871) [details]
> Proposed fix: Add check for empty 'ucuser=' parameter to
> ApiQueryUserContributions.php
> 
Domas applied this patch as a live hack, and I committed it to trunk in r59953.

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


Navigation
Links