Yurik created this task.
Yurik added a project: Wikidata.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION

Installing Wikibase as both a repo and a client on the same wiki, and using local sitelinks makes it impossible to get Wikibase item by using the sitelink string via MW API.

For example, in OSM wiki, which is both a client and a wikibase repo, each item has a sitelink:
Q104 -> Key:bridge:movable. Note that the sitelink is shown at the top right corner using a CSS hack. The site name is wiki.

A very common operation is to get the item by knowing the Key:bridge:movable string. A user can navigate to it with the Special:ItemByTitle/wiki/Key:highway. Lua code can get it with mw.wikibase.getEntityIdForTitle( 'Key:bridge:movable' ). But there seems to be no clean way to do that via MW API, which seems like a big omission.

Some (bad) workarounds:

  • Use internal scribunto API module: {action: 'scribunto-console', format: 'json', title: 'Module:Sandbox', question: "=mw.wikibase.getEntityIdForTitle( 'Key:bridge:movable' )"} - try it
  • Create a dedicated protected Lua module, and use action="" to call it

TASK DETAIL
https://phabricator.wikimedia.org/T204788

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Yurik
Cc: Aklapper, Yurik, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to