Page MenuHomePhabricator

Improved error feedback for SVG thumbnail rendering
Closed, ResolvedPublic

Details

Reference
bz22195

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:51 PM
bzimport set Reference to bz22195.
bzimport added a subscriber: Unknown Object (MLST).

Wikimedia purposefully doesn't render svgs which include another images (in this case it is including [[Image:Friesengebietblank.png]]).

(In reply to comment #1)

Wikimedia purposefully doesn't render svgs which include another images (in
this case it is including [[Image:Friesengebietblank.png]]).

Still, we could do with a less cryptic error message and not show a blank thumbnail in the wikitext (try previewing [[File:Fryskgebiet.svg|thumb]]).

The svg is rendered asynchronously to the page rendering, so I don't see a clean way to do it. Perhaps adding a broken flag to image table?

(In reply to comment #3)

The svg is rendered asynchronously to the page rendering, so I don't see a
clean way to do it. Perhaps adding a broken flag to image table?

Yeah whatever code generates the thumbnail URL could notice the thumbnail is broken (somehow, maybe with that flag, maybe otherwise) and use client-side scaling instead.

We could change the g_error with a return NULL. Hopefully that would just render everything but the image.

However, reusers would be vulnerable.

http://svn.wikimedia.org/viewvc/mediawiki/trunk/debs/librsvg2/debian/patches/no-external-files.patch?view=markup

Renaming this bug to be specifically about the error feedback.

The issue itself with external images is covered by bug 3537

jijiki claimed this task.
jijiki added a subscriber: jijiki.

Please reopen if needed.