Page MenuHomePhabricator

MobileView returning images from templates that aren't visible
Closed, InvalidPublic

Description

When making this request:

https://en.wikipedia.org/w/api.php?action=mobileview&format=json&noheadings=true&page=Ancillae Assumpta Academy&prop=sections|text|lastmodified|lastmodifiedby|languagecount|id|protection|editable|displaytitle|thumb|description|image|revision&sectionprop=toclevel|line|anchor|level|number|fromtitle|index&sections=all&thumbwidth=640

I get a response containing images that aren't actually visible in the article (and aren't of the subject):

"image": {
  "width": 2592,
  "file": "FLW Beth Sholom exterior.jpg",
  "height": 1944
},
"thumb": {
  "url": "//upload.wikimedia.org/wikipedia/commons/thumb/e/e4/FLW_Beth_Sholom_exterior.jpg/640px-FLW_Beth_Sholom_exterior.jpg",
  "width": 640,
  "height": 480
}

The image is from the "Cheltenham" template which is in the article but not visible in the MobileView HTML.

This query has the same issue:

https://en.wikipedia.org/w/api.php?action=query&format=json&prop=images&titles=Ancillae+Assumpta+Academy

Event Timeline

JoeWalsh updated the task description. (Show Details)

I found another article that has the same problem (with the same incorrect image):

https://en.wikipedia.org/w/api.php?action=mobileview&format=json&noheadings=true&page=Bishop McDevitt High School (Wyncote, Pennsylvania)&prop=sections|text|lastmodified|lastmodifiedby|languagecount|id|protection|editable|displaytitle|thumb|description|image|revision&sectionprop=toclevel|line|anchor|level|number|fromtitle|index&sections=all&thumbwidth=640

Seems incorrect images are being returned by action=query:

https://en.wikipedia.org/w/api.php?action=query&format=json&prop=images&titles=Ancillae+Assumpta+Academy

The images are actually from the "Cheltenham" template, which is on both pages

{{Cheltenham}}
JoeWalsh renamed this task from MobileView returning an incorrect image and thumb for article without any images to MobileView returning images from templates that aren't visible.Jul 25 2016, 7:38 PM
JoeWalsh updated the task description. (Show Details)
JoeWalsh updated the task description. (Show Details)
JoeWalsh updated the task description. (Show Details)
Jhernandez added a subscriber: Jhernandez.

re-adding the backlog, we'll probably track it if you're going to address it.

I've also added pageimages, given it looks like an issue there.

Jdlrobson closed this task as Invalid.EditedJul 27 2016, 4:56 PM
Jdlrobson added a subscriber: Jdlrobson.

The images are in the article.
https://en.wikipedia.org/wiki/Ancillae_Assumpta_Academy#collapsibleTable0
but they are in a nav box which is hidden in mobile due to not being mobile friendly.
The api is doing the right thing.

Doing something better than scrubbing them is tracked in T132560