Page MenuHomePhabricator

Update the code behind the Wikimedia Commons link in the sidebar to use P910 and P1754 instead of P373
Open, HighPublic

Description

The sidebar link to Wikimedia Commons on various Wikipedias currently uses P373. It would be better to use the interwiki sitelinks to Commons instead. The logic in this case would be:

  1. If there is a sitelink to Commons in the attached Wikidata item, use that (optional: unless it is to a gallery page)
  2. If there is a P910 value, follow that to the category item and use the sitelink to Commons from there
  3. If there is a P1754 value, follow that to the category item and use the sitelink to Commons from there
  4. Otherwise, display nothing.

This follows the logic of the "_getCommonslink" function of https://commons.wikimedia.org/wiki/Module:WikidataIB - which is used to display the links in https://en.wikipedia.org/wiki/Template:Commons_category .

This is one of the blockers for the eventual deletion of P373 from Wikidata - see the ongoing discussion at https://www.wikidata.org/wiki/Wikidata:Properties_for_deletion#Property:P373

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptSep 14 2019, 6:14 PM
Reedy updated the task description. (Show Details)Sep 14 2019, 7:36 PM
Reedy edited projects, added Wikimedia-Interwiki-links; removed MediaWiki-Interwiki.

@Lydia_Pintscher Is this within WMDE's scope, or WMF? It would be nice to have this actioned at some point.

Mike_Peel triaged this task as High priority.Apr 4 2020, 7:22 PM

Anyone? There are quite a few commons links that aren't being displayed because the logic here hasn't been updated.

@Jdlrobson I saw you were working on the sidebar recently (for the language vs. other sites order), is this something you/your team would be interested in?

@Mike_Peel we've been working on the architecture of the sidebar not consumers like this. My team doesn't have much knowledge of the Wikidata extension or have it setup.

Without understanding this code is this not simply a config change here ?:
https://gerrit.wikimedia.org/g/operations/mediawiki-config/+/aac5a018905bc07c834af5f310d440ea92613c71/wmf-config/InitialiseSettings.php#21916

Mike_Peel added a subscriber: Jdlrobson.EditedFri, Jun 26, 6:42 PM

@Jdlrobson I think part of it is removing P 373 from that config, and that alone would be a good step forward. However, the other part is to follow P 910/P 1754 items through to a different Wikidata item, and to fetch the Commons sitelink from that - and that's probably more complicated/requires code change rather than just a config change.

If it's not in your team's scope, can you suggest anyone who might be able to look into it? It's been stuck here for a while now, and it's fairly high priority if we want to get rid of P 373 on Wikidata at some point soon.

(Sorry, I don't know how to ping you in reply without re-adding you as a subscriber!)

Because this is Wikibase it suggests WMDE Engineering is the team to look at this.
https://www.mediawiki.org/wiki/Developers/Maintainers

OK, back to pinging @Lydia_Pintscher and @Lea_Lacroix_WMDE then (please?). ;-)

Thanks for the ping, we will have a look more in details and come back to you.