Page MenuHomePhabricator

Parsoid doesn't include the main image for a File page
Closed, ResolvedPublic

Description

https://en.wikipedia.org/api/rest_v1/page/html/File%3ARon_Rivera_(cropped).jpg does not show the main image the File page is about.
(It redirects to https://commons.wikimedia.org/api/rest_v1/page/html/File%3ARon_Rivera_(cropped).jpg. Not sure if that is pertinent here.)

https://en.wikipedia.org/wiki/File:Ron_Rivera_(cropped).jpg shows an image.

This is a followup task of T135242: [BUG] Image not shown for Content Service file pages, where the Android app added a workaround by not using Parsoid for File pages.

Event Timeline

bearND created this task.Oct 14 2016, 5:51 AM
bearND moved this task from Incoming to Tracking on the Mobile-Content-Service board.

I think there are good reasons for keeping the skin responsible for composing special pages like those for images. This keeps things flexible, and avoids mixing actual user-controlled content (image description) with auto-generated content (image itself, category trees etc).

That said, we could provide a default, "skinned" view for such pages that works for most use cases.

@GWicke I'm not sure I follow. The skin cannot be responsible when the page is formatted like so - the image url doesn't appear to be anywhere.

Any reason we cannot provide an array of urls for the different resolutions?

GWicke added a comment.EditedOct 31 2016, 4:55 PM

@Jdlrobson, I'm not at all opposed to setting up a nice API exposing the metadata needed to render such a page in the skin, or even provide a basic default rendering. To avoid providing a limited list of resolutions, we have been looking into a proper thumb & image info API that lets clients select resolutions in T66214.

My point is that Parsoid shouldn't be in the business of implementing random skin functionality, like rendering image pages, special pages, or category pages.

So @bearND it sounds like the MCS might want to do a fetch to mwApi and enrich the response with that information.

@Jdlrobson Good idea. I'll move it to the backlog.

Arlolra moved this task from Backlog to Non-Parsoid Tasks on the Parsoid board.Nov 24 2016, 2:27 AM

Change 326178 had a related patch set uploaded (by Jdlrobson):
Add additional information to file and user pages for rendering

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

Change 326178 merged by jenkins-bot:
Add additional information to file and user pages for rendering

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

bearND closed this task as Resolved.Jan 4 2017, 9:34 PM
bearND claimed this task.

deploy/2017-01-04/c39bd1f

Change 392078 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[marvin@master] Update: show image on image File pages

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

Change 392078 merged by jenkins-bot:
[marvin@master] Update: show image on image File pages

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