Page MenuHomePhabricator

VE does not display PDF thumbnails: Big empty box and (browser's) broken file icon
Closed, ResolvedPublic0 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 added a subscriber: Magioladitis.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 26 2015, 7:46 PM
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.

Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 3 2015, 10:21 PM
matmarex added a subscriber: matmarex.

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 ...

Arlolra claimed this task.Apr 25 2017, 9:02 PM

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

Arlolra closed this task as Resolved.May 23 2017, 10:29 PM

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

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMay 23 2017, 10:29 PM
Jdforrester-WMF set the point value for this task to 0.May 25 2017, 11:38 AM
Jdforrester-WMF moved this task from Freezer to External and Administrivia on the VisualEditor board.

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