Page MenuHomePhabricator

VE does not display PDF thumbnails: Big empty box and (browser's) broken file icon
Closed, ResolvedPublic0 Estimated Story Points

Description

Try to edit

https://en.wikipedia.org/w/index.php?title=User:Magioladitis&veaction=edit&vesection=10

and see what happens with the pdf thumbnails.

(I recall reporting this bug in the past again but I can't find it!)

Event Timeline

Magioladitis raised the priority of this task from to Needs Triage.
Magioladitis updated the task description. (Show Details)
Magioladitis added a project: VisualEditor.
Magioladitis subscribed.
Magioladitis renamed this task from VE does not display PDF thumbanials correctly to VE does not display PDF thumbnails correctly.May 26 2015, 7:46 PM
Magioladitis set Security to None.
Aklapper renamed this task from VE does not display PDF thumbnails correctly to VE does not display PDF thumbnails: Big empty box and (browser's) broken file icon.May 27 2015, 10:19 AM

and see what happens with the pdf thumbnails.

Please describe in this bug report what does happen, or attach a screenshot.
"See yourself" is a bit vague when sometimes different browsers or different times (a week later) might create different results. Thanks! :)

Confirmed on Mozilla/5.0 (X11; CrOS x86_64 6812.88.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.153 Safari/537.36

If [[File:A Quick Guide to AutoWikiBrowser.pdf|A Quick Guide to AutoWikiBrowser]] then it shows as above screenshot
If |thumb is added ([[File:A_Quick_Guide_to_AutoWikiBrowser.pdf|thumb]]) then it shows as a thumb-image.

matmarex subscribed.

This is a problem with Parsoid output, which generates a <img ... src="//upload.wikimedia.org/wikipedia/commons/4/4e/A_Quick_Guide_to_AutoWikiBrowser.pdf" ... /> (with the 'src' pointing directly to the PDF file instead of a thumbnail), which can't be rendered by browsers.

An example from that page is,

[[File:Content Translator in Education.pdf|Using Content Translator in the Educational process]]

If you add the |thumb parameter, Parsoid yields the desired result,

src="//upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Content_Translator_in_Education.pdf/page1-220px-Content_Translator_in_Education.pdf.jpg"

However, if you don't, the batch api seems to be returning an error,

data-mw='{"errors":[{"key":"thumb-error","message":"Error creating thumbnail: Invalid thumbnail parameters or image file with more than 12.5 million pixels"}],"caption":"Using Content Translator in the Educational process"}'

To be investigated ...

Change 350782 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/extensions/ParsoidBatchAPI@master] Handle media returning zero width

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

Change 350830 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/core@master] Perform input validation for file $page at some strategic locations

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

Change 350782 merged by jenkins-bot:
[mediawiki/extensions/ParsoidBatchAPI@master] The default page number should be 1

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

When the patch is deployed, this should be fixed in production, since we use the batching api. So, I'm considering it resolved.

However, without batching, we still get what's in T100453#1588141

Change 350830 merged by jenkins-bot:
[mediawiki/core@master] Perform input validation for file $page at some strategic locations

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