Last modified: 2013-09-04 15:50:04 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 T36356, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34356 - list=watchlistraw does not set the result under "query"
list=watchlistraw does not set the result under "query"
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All All
: Low normal (vote)
: Future release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: api-2.0
  Show dependency treegraph
 
Reported: 2012-02-12 19:35 UTC by db [inactive,noenotif]
Modified: 2013-09-04 15:50 UTC (History)
7 users (show)

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


Attachments

Description db [inactive,noenotif] 2012-02-12 19:35:01 UTC
list=watchlistraw adds its result to the api tag and not to query tag like all other query modules (in core). It is possible to change this? That makes a easy design on client site a harder (Each action module adds its result under its module name). Thanks.

Using list=watchlistraw gives 

<?xml version="1.0"?>
<api>
  <watchlistraw>
    <wr ns="?" title="?" />
  </watchlistraw>
  <query-continue>
    <watchlistraw wrcontinue="?|?" />
  </query-continue>
</api>

but using (for example) list=watchlist gives

<?xml version="1.0"?>
<api>
  <query>
    <watchlist>
      <item pageid="?" revid="?" old_revid="?" ns="?" title="?" />
    </watchlist>
  </query>
  <query-continue>
    <watchlist wlstart="?" />
  </query-continue>
</api>
Comment 1 Sam Reed (reedy) 2012-02-13 16:13:23 UTC
Changing this would be a breaking change... Errrrr

This has been in since October 2008
Comment 2 db [inactive,noenotif] 2012-02-13 20:36:28 UTC
Your choice. Maybe you can discussion this, with other developers knowing about the api. You can make this as INVALID or WONTFIX, than is this for documentation only. That is ok, but the assumption is another (at least from me, because all other modules handles as that).
Comment 3 Antoine "hashar" Musso (WMF) 2012-02-15 16:16:38 UTC
maybe add a new parameter (rawwatchlist?) with the correct behavior and mark the current one as deprecated ?
Comment 4 db [inactive,noenotif] 2012-02-18 18:03:40 UTC
I have note this fact - https://www.mediawiki.org/w/index.php?title=API:Watchlistraw&diff=501122&oldid=463738

Marking as WONTFIX, due to breaking change.
Comment 5 Antoine "hashar" Musso (WMF) 2012-02-18 18:27:59 UTC
Reopening, it is a valid bug and we can fix it without breaking back compatibility
Comment 6 Svick 2012-04-27 23:13:05 UTC
(In reply to comment #5)
> Reopening, it is a valid bug and we can fix it without breaking back
> compatibility

How do you propose to do that? The only way I can imagine would be outputting everything twice: once with query and once without, but that doesn't seem like a good solution to me.

BTW, I have proposed this change (currently under review): https://gerrit.wikimedia.org/r/#change,5588
Comment 7 db [inactive,noenotif] 2012-06-07 23:39:02 UTC
Having a parameter does not make sense, because you have to add things to your framework, that this parameter is always set for that module. In that case you can add things to your framework, which change the position in the result (or get it from the current place). Setting this to wontfix and all is good, because all what you can do, needs extra work in your framework or is a breaking change for other fremeworks.
Comment 8 Svick 2012-06-08 00:21:10 UTC
(In reply to comment #7)

The last version of my patch creates new module rawwatchlist, which correctly has the "query" element and marks the old watchlistraw as deprecated. It's not a great solution, but I can't think of a better one.
Comment 9 Antoine "hashar" Musso (WMF) 2012-06-11 08:25:24 UTC
Assigning bug to Sam Reed since he is:
- the API maintainer
- already reviewing Gerrit change #5588

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


Navigation
Links