Last modified: 2011-02-24 09:35:23 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 T23310, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21310 - Errors when a module is used for both generator and prop and limit=max is used for both
Errors when a module is used for both generator and prop and limit=max is use...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.16.x
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-10-27 13:05 UTC by Brad Jorsch
Modified: 2011-02-24 09:35 UTC (History)
4 users (show)

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


Attachments

Description Brad Jorsch 2009-10-27 13:05:22 UTC
When a module is used both as the generator for a query and in the normal "prop", and both limits are set to 'max', the API gives an error because it tries to add the value to the "limits" node in the result twice.

For example, in the URL above I am trying to find all the Wikipedia-namespace pages transcluded onto [[en:WP:BRFA]], along with the revision ID and the templates each one transcludes.
Comment 1 Bryan Tong Minh 2009-10-28 18:49:42 UTC
What should be the correct behaviour? Ignore the second assignment I presume, but is it possible to have different limits in the generator and normal mode?
Comment 2 Roan Kattouw 2009-10-28 20:38:10 UTC
(In reply to comment #1)
> What should be the correct behaviour? Ignore the second assignment I presume,
> but is it possible to have different limits in the generator and normal mode?
> 

Yes, this is possible, but only by using backlinks twice (once with and once without blredirect).

Ignoring the second assignment in the general case would fail per the above, and would remove a valuable telltale sign of bugs. I was thinking we could prefix generators with a 'g' in the <limits> tag, although that would be a breaking change.
Comment 3 Brad Jorsch 2009-10-28 22:10:36 UTC
(In reply to comment #2)
> I was thinking we could
> prefix generators with a 'g' in the <limits> tag, although that would be a
> breaking change.

You could output both the 'g' and non-'g' versions for the (common) cases where this error does not occur, if you really want to avoid the breaking change. OTOH, I wonder how many people actually use <limits> instead of just continuing to specify "max".
Comment 4 Brad Jorsch 2011-02-20 19:02:55 UTC
As written, this bug is fixed as of r70078. If anyone cares enough to ask for Roan's suggestion from comment #2, I'd think that should be filed as a new feature request bug.

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


Navigation
Links