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)
OpenPublic

Description

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>

Version: 1.20.x
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=73184

bzimport added a project: MediaWiki-API.Via ConduitNov 22 2014, 12:58 AM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz39492.
Reedy created this task.Via LegacyAug 19 2012, 10:22 PM
Umherirrender added a comment.Via ConduitAug 20 2012, 7:35 PM

It is wrong, that the api follows the redirect, see bug 26865

Anomie moved this task to Needs Code on the MediaWiki-API workboard.Via WebFeb 19 2015, 8:27 PM
Umherirrender removed a subscriber: Umherirrender.Via WebFeb 24 2015, 7:56 PM
Reedy edited the task description. (Show Details)Via WebFeb 28 2015, 8:36 PM
Reedy set Security to None.
Reedy added a project: AutoWikiBrowser.Via WebMar 7 2015, 7:12 PM
Josve05a moved this task to General bugs (unsorted) on the AutoWikiBrowser workboard.Via WebJun 2 2015, 7:57 PM
jayvdb added a project: pywikibot-core.Via WebJun 9 2015, 4:11 AM
Restricted Application added a subscriber: Unknown Object (MLST). · View Herald TranscriptVia HeraldJun 9 2015, 4:11 AM
jayvdb moved this task to Upstream issues on the pywikibot-core workboard.Via WebJun 9 2015, 4:11 AM
Reguyla moved this task to Third party apps (AWB) on the MediaWiki-Redirects workboard.Via WebJun 16 2015, 5:05 PM
Nemo_bis added a subscriber: Nemo_bis.Via WebJun 16 2015, 6:19 PM

Per https://old-bugzilla.wikimedia.org/show_bug.cgi?id=26865#c7 , if special pages are in wgInvalidRedirectTargets then this bug sounds invalid?

Aklapper moved this task to Backlog on the MediaWiki-Redirects workboard.Via WebJun 17 2015, 8:44 AM
Josve05a added a project: WorkTypeMaintenance.Via Bulk EditSat, Aug 22, 8:51 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptVia HeraldSat, Aug 22, 8:51 PM
Josve05a moved this task to Make list on the AutoWikiBrowser workboard.Via WebSat, Aug 22, 9:40 PM
Josve05a moved this task to General bugs (unsorted) on the AutoWikiBrowser workboard.
Josve05a moved this task to Backlog on the AutoWikiBrowser workboard.Via WebSat, Aug 22, 10:30 PM

Add Comment