Page MenuHomePhabricator

Implement alternative `SiteLinkLookup` for MediaInfo entities
Closed, DuplicatePublic

Description

We have this:
It is possible to fetch MediaInfo entities via Lua on Commons, and most of the methods exposed via Wikibase's Lua modules work just fine.
However, it is not currently possible to use those that rely on SiteLinkLookup (getEntityIdForTitle, getSiteLinkPageName and getEntityIdForCurrentPage )
Those should become available as well.

We want this:
Support for mw.wikibase.getEntityIdForCurrentPage, mw.wikibase.getEntityIdForTitle and mw.wikibase.getSiteLinkPageName calls should be implemented, so MediaInfo entities can be found by page title.

Acceptance Criteria:

  • mw.wikibase.getEntityIdForCurrentPage works
  • mw.wikibase.getEntityIdForTitle works
  • mw.wikibase.getSiteLinkPageName works

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 28 2019, 2:23 PM
Jarekt added a subscriber: Jarekt.Nov 1 2019, 2:48 PM

I think mw.wikibase.getSiteLinkPageName is called mw.wikibase.getSitelink according to the documentation. If getSiteLinkPageName is an alternative name than it does not seem to be documented. I apologize for nitpicking, but it is confusing.

I just created T237107, before noticing this task. They have some overlap, but T237107 is more general as it ask for review, testing and documentation of mw.wikibase functions in SDC environment. So maybe this would be the subtask of the other.

Change 550494 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/Wikibase@master] [WIP] Add ByTypeDispatchingEntityIdLookup, allowing other entity id lookup for other types

https://gerrit.wikimedia.org/r/550494

Change 550497 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Register mediainfo-specific EntityIdLookup

https://gerrit.wikimedia.org/r/550497

Change 550494 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add ByTypeDispatchingEntityIdLookup, allowing other entity id lookup for other types

https://gerrit.wikimedia.org/r/550494

Change 556347 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Fix idlookup dropping pageids

https://gerrit.wikimedia.org/r/556347

Change 556353 had a related patch set uploaded (by Ladsgroup; owner: Michael Große):
[mediawiki/extensions/Wikibase@wmf/1.35.0-wmf.10] Fix idlookup dropping pageids

https://gerrit.wikimedia.org/r/556353

Change 556347 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix idlookup dropping pageids

https://gerrit.wikimedia.org/r/556347

Change 556353 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.35.0-wmf.10] Fix idlookup dropping pageids

https://gerrit.wikimedia.org/r/556353

Mentioned in SAL (#wikimedia-operations) [2019-12-11T12:03:46Z] <ladsgroup@deploy1001> Synchronized php-1.35.0-wmf.10/extensions/Wikibase/data-access: [[gerrit:556353|Fix idlookup dropping pageids (T236691 T240410)]] (duration: 01m 03s)

Change 550497 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Register mediainfo-specific EntityIdLookup

https://gerrit.wikimedia.org/r/550497

Change 556743 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@wmf/1.35.0-wmf.10] Register mediainfo-specific EntityIdLookup

https://gerrit.wikimedia.org/r/556743

Change 556743 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@wmf/1.35.0-wmf.10] Register mediainfo-specific EntityIdLookup

https://gerrit.wikimedia.org/r/556743