Last modified: 2014-11-09 13:21:26 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 T41492, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39492 - prop=info doesn't behave consistently when given a Special Page, vs when given a non special page which redirects to a special page (in comparison to another redirect)
prop=info doesn't behave consistently when given a Special Page, vs when give...
Status: NEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-19 22:22 UTC by Sam Reed (reedy)
Modified: 2014-11-09 13:21 UTC (History)
7 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-08-19 22:22:44 UTC
So, on enwiki:
https://en.wikipedia.org/wiki/Template:Categorytree_mode

#REDIRECT [[Special:CategoryTree]]

Points to https://en.wikipedia.org/wiki/Special:CategoryTree

If I ask the API for information on Special:CategoryTree

https://en.wikipedia.org/w/api.php?action=query&prop=info|revisions&intoken=edit&titles=Special:CategoryTree&rvprop=timestamp|user|comment|content&redirects=

We get

<api>
  <query>
    <pages>
      <page ns="-1" title="Special:CategoryTree" special="" />
    </pages>
  </query>
</api>


If I ask for a normal redirect, I get a pages entry for the target

https://en.wikipedia.org/w/api.php?action=query&prop=info|revisions&intoken=edit&titles=WP:AWB&rvprop=timestamp|user|comment&redirects=

<api>
  <query>
    <normalized>
      <n from="WP:AWB" to="Wikipedia:AWB" />
    </normalized>
    <redirects>
      <r from="Wikipedia:AWB" to="Wikipedia:AutoWikiBrowser" />
    </redirects>
    <pages>
      <page pageid="3619512" ns="4" title="Wikipedia:AutoWikiBrowser" touched="2012-08-18T16:12:20Z" lastrevid="506905280" counter="" length="15308" starttimestamp="2012-08-19T22:21:24Z" edittoken="a835be486a973279fa19914f0eabf91d+\">
        <revisions>
          <rev user="Klutzy" timestamp="2012-08-11T16:30:40Z" comment="-[[Category:Windows software]]; category for main namespace" />
        </revisions>
      </page>
    </pages>
  </query>
</api>


If I ask for a page which redirects to a special page, we don't get the pages information at all, which is inconsistent.

https://en.wikipedia.org/w/api.php?action=query&prop=info|revisions&intoken=edit&titles=Template:Categorytree%20mode&rvprop=timestamp|user|comment|content&redirects=

<api>
  <query>
    <redirects>
      <r from="Template:Categorytree mode" to="Special:CategoryTree" />
    </redirects>
  </query>
</api>



The desired result should be something along the lines of:

<api>
  <query>
    <redirects>
      <r from="Template:Categorytree mode" to="Special:CategoryTree" />
    </redirects>
	<pages>
      <page ns="-1" title="Special:CategoryTree" special="" />
    </pages>
  </query>
</api>
Comment 1 Umherirrender 2012-08-20 19:35:41 UTC
It is wrong, that the api follows the redirect, see bug 26865

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


Navigation
Links