Page MenuHomePhabricator

Add more properties to the PageImages list
Closed, ResolvedPublic

Description

Problem:
There is an algorithm to determine the best image to represent an Item in listings like special:nearby and other places. It checks if a specific Property (image) exists on an Item. If it does exist it uses that one. If it doesn't it moves on to other properties according to a configured list. Since the list was created a number of new image Properties have been created and should be added to the configuration.

The following Properties should be added:

Acceptance criteria:

  • new Properties are taken into account for determining the main image of an Item

Notes:
Requested by Jura1 on Contact the development team

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 9 2020, 12:15 PM
hoo added a subscriber: hoo.Apr 9 2020, 12:27 PM

Current order (from wmgWBRepoPreferredPageImagesProperties in mediawiki-config InitialiseSettings.php):

'wikidatawiki' => [
    // Photos
    'P18',
    // Complex graphics
    'P41',
    'P94',
    'P154',
    'P1766',
    // Simple graphics
    'P14',
    'P158',
    'P1543',
    'P109',
    'P367',
    // Multi page content
    'P996',
    // Maps
    'P1621',
    'P15',
    'P1846',
    'P181',
    'P242',
    'P1944',
    'P1943',
    // Diagrams
    'P207',
    'P117',
    'P692',
    'P491',
],

Thank you!

Then let's add them in this order right after the first entry:

'P2716',
'P7420',
'P5775',
'P3451',
'P5252',
Lydia_Pintscher triaged this task as Low priority.Apr 19 2020, 1:36 PM

Change 592939 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[operations/mediawiki-config@master] Add new properties to wmgWBRepoPreferredPageImagesProperties

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

Change 592939 merged by jenkins-bot:
[operations/mediawiki-config@master] Add new properties to wmgWBRepoPreferredPageImagesProperties

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

Mentioned in SAL (#wikimedia-operations) [2020-04-29T11:05:13Z] <hoo@deploy1001> Synchronized wmf-config/InitialiseSettings.php: Add new properties to wmgWBRepoPreferredPageImagesProperties (T249811) (duration: 01m 18s)

hoo added a comment.Apr 29 2020, 11:23 AM

Deployed and verified: After purging with "forcelinkupdate", the page image for "Pudong" (Q125378) changed from "locator map image" (P242) to "collage image" (P2716), as can be seen on https://www.wikidata.org/wiki/Special:Nearby#/coord/31.223056,121.539722.

Query for finding relevant items: https://w.wiki/PRi

Please note that the image used for items will only be changed once these items are edited again (or purged via the API with forcelinkupdate).