Page MenuHomePhabricator

Foreign files don't get page images
Closed, ResolvedPublic

Description

In English Wikipedia if I request the page image for File:Mahkama du Pacha.jpg I don't get one. Expected: The page image should be itself.
https://en.m.wikipedia.org/wiki/Special:ApiSandbox?useformat=desktop#action=query&prop=pageimages&format=json&piprop=thumbnail&titles=File%3AMahkama%20du%20Pacha.jpg

The page image should be itself.

Note: This impacts Gather collections: https://en.m.wikipedia.org/wiki/Special:Gather/id/657/May

Details

Related Gerrit Patches:
mediawiki/extensions/PageImages : masterInclude foreign files in ApiQueryPageImages
mediawiki/extensions/PageImages : masterInclude foreign files in ApiQueryPageImages

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added projects: PageImages, Gather.
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 11 2015, 9:45 PM
Jdlrobson moved this task from Product triage to Must haves on the Gather board.Jun 10 2015, 7:26 PM
Jdlrobson moved this task from Must haves to Bug backlog on the Gather board.Jul 6 2015, 6:48 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson edited projects, added good first task; removed Gather.
Jdlrobson set Security to None.
Jdlrobson added a project: Readers-Web-Backlog.
Jhernandez triaged this task as Medium priority.Jul 8 2015, 10:09 AM
Jhernandez moved this task from Incoming to 2016-17 Q2 on the Readers-Web-Backlog board.
Jhernandez added a subscriber: Jhernandez.
Jhernandez raised the priority of this task from Medium to High.Aug 14 2015, 9:04 AM

This would make adding File pages to collections work better.

phuedx claimed this task.Sep 30 2015, 9:49 AM
phuedx moved this task from To Do to Doing on the Reading-Web-Sprint-57-The Fifth Element board.

ApiQueryPageImages#execute gets the titles it's going to work with from ApiPageSet#getGoodTitles, which discards, amongst others, all titles corresponding to foreign files.

However, ApiQueryPageImages#execute handles titles in filespace distinctly from titles in any other namespace. In fact, it defers to wfFindFile to both validate the title and fetch the corresponding file, if any, which is ideal. Therefore, we should only have to include missing filespace titles – using ApiPageSet#getMissingTitlesByNamespace – when we're processing filespace titles.

Change 242835 had a related patch set uploaded (by Phuedx):
Include foreign files in ApiQueryPageImages

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

Change 242835 merged by jenkins-bot:
Include foreign files in ApiQueryPageImages

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

Jdlrobson closed this task as Resolved.Oct 1 2015, 8:22 PM

A similar issue seems to impact TextExtracts. T114418
This change is working a charm on http://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Gather/id/167 - thanks!

phuedx added a subscriber: Legoktm.Oct 2 2015, 4:15 AM

Sorry for the headache @Jdlrobson, @greg and thanks for the revert @Legoktm.

Change 243124 had a related patch set uploaded (by Phuedx):
Revert "Revert "Include foreign files in ApiQueryPageImages""

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

Change 243124 merged by jenkins-bot:
Include foreign files in ApiQueryPageImages

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

Jdlrobson closed this task as Resolved.Oct 7 2015, 4:55 PM

Confirmed on beta labs http://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Gather/id/167
Have seen no significant spike in fatals this time (touch wood).