Use sitelinks to link to Commons in the Wikipedia sidebar
Problem: At the moment the link to Commons in the sidebars on Wikipedias and other projects is generated using the P373 ('commons category') property on Wikidata where there isn't a sitelink directly in the linked Wikidata item. P373 is frequently outdated and easy to vandalise, however, and using the sitelinks is a better way to provide the link (in particular, it is bi-directional and provides the links from Commons to the Wikipedias, and it is difficult to vandalise). Where there is a category for a topic, though, the Commons category sitelink is stored there rather than in the topic item, and does not get displayed without a P373 value. (For more background, see d:User:Mike Peel/Commons linking).
Who would benefit: Readers and editors going to Commons from Wikipedia articles
Proposed solution: The code should be updated to
If there is a sitelink to Commons in the attached Wikidata item, use that (optional: unless it is to a gallery page)
If there is a P910 ('topic's main category') value, follow that to the category item and use the sitelink to Commons from there
If there is a P1754 ('category related to list') value, follow that to the category item and use the sitelink to Commons from there
Otherwise, display nothing.
More comments: This is probably a straightforward change to implement, and it is an important step towards deleting P373, however it has been stuck on phabricator for over a year.