The API has long had difficulty in reporting the redirects to a title:
the best that could be done was to use
list=backlinks&blfilterredir=redirects, but that has issues if the
redirect has additional wikilinks in the non-redirect content (e.g.
bug 57057[1]). It also had issues with file and category redirects
(e.g. bug 27621[2]).
With the merge of Gerrit change 104764,[3] the API has a new
prop=redirects to query the redirects table directly. There is also a
new list=allredirects, corresponding to existing modules such as
list=alllinks. This should be deployed to WMF sites with 1.23wmf16.[4]
In addition, since Gerrit change 105829 (deployed with 1.23wmf10[4])
file and category redirects will no longer show up when using
list=imageusage or list=categorymembers, unless the target file or
category is also included in the non-redirect content. They will be
reported in list=backlinks instead.
[1]:
https://bugzilla.wikimedia.org/show_bug.cgi?id=57057
[2]:
https://bugzilla.wikimedia.org/show_bug.cgi?id=27621
[3]:
https://gerrit.wikimedia.org/r/#/c/104764/
[4]:
https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap
[5]:
https://gerrit.wikimedia.org/r/#/c/105829/
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce