Page MenuHomePhabricator

Provide all URL/path in meta=siteinfo&siprop=interwikimap
Closed, DeclinedPublic

Description

For now, the module <code>meta=siteinfo&siprop=interwikimap</code> give this :

<iw prefix="XX" local="" language="YYYY" url="https://XX.wikipedia.org/wiki/$1" protorel="" />

Could it be possible to give the other paths (available for example in Special:Version) ?

1.) Complete URLs :

2.) Or like <code>meta=wikibase</code> does :

  • base="//XX.wikipedia.org"
  • scriptpath="/w"
  • articlepath="/wiki/$1"

+

  • loadurl="//bits.wikimedia.org/XX.wikipedia.org/load.php"

Thank you.


Version: unspecified
Severity: enhancement

Details

Reference
bz69575

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:31 AM
bzimport set Reference to bz69575.
bzimport added a subscriber: Unknown Object (MLST).

The problem with both of those suggestions is that fetching that information even for other local sites isn't very easy, and not all sites in the interwiki map are local. That additional data may not even make sense with some entries in the interwiki map, as not all of them are even running MediaWiki.

The interwiki map does have a field "iw_api" which the API will output when populated, but it seems it's generally not populated.

Yes, I saw bug 28558 talking about this "iw_api" field, but this seems to have changed nothing.

The purpose is to have a list of all iw sites with allowed API acces with a centralauthtoken, and what would be needed is :

  1. the API url, or at least the scriptpath ( "/w" )
  2. witch sites are mediawiki powered and readable

N°1 is the major need.
For N°2, if the site is not mediawiki powered or not readable, the Ajax request just won't work, no big deal.

Am I wrong or in fact this interwikimap feature comes from Interwiki extension (even if I didn't see any API feature in the extension code) ?

(In reply to Dr Brains from comment #2)

The purpose is to have a list of all iw sites with allowed API acces with a
centralauthtoken, and what would be needed is :

  1. the API url, or at least the scriptpath ( "/w" )
  2. witch sites are mediawiki powered and readable
  1. Which of these sites are actually in the same CentralAuth "group" as the current wiki.

Am I wrong or in fact this interwikimap feature comes from Interwiki
extension (even if I didn't see any API feature in the extension code) ?

You're wrong. meta=siteinfo&siprop=interwikimap is in core, basically dumping the contents of the 'interwiki' database table. The Interwiki extension appears to merely add a special page for interacting with this same database table.

Anomie claimed this task.

The bottom line is that the information requested isn't actually available to siprop=interwikimap, so this isn't likely to happen without restructuring the database table.