Last modified: 2014-11-15 12:19:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69081, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67081 - SVG thumbnailing doesn't work with $wgResponsiveImages
SVG thumbnailing doesn't work with $wgResponsiveImages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-25 14:24 UTC by Mark A. Hershberger
Modified: 2014-11-15 12:19 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Mark A. Hershberger 2014-06-25 14:24:53 UTC
Adding Brion since I think he has done a lot with this (feel free to correct me!)

From https://www.mediawiki.org/wiki/Thread:Project:Support_desk/$wgResponsiveImages_causing_issues_for_SVG_thumbnailing

  Example of error: http://www.pidgi.net/wiki/File_talk:Mario_Kart_TV_logo_(alt)_-_Mario_Kart_8.svg

  The code speaks for itself. srcset=" 1.5x, 2x" Nothing is being generated for
  these, leaving the image as a broken link in browsers that support the property
  and fit the criteria.
Comment 1 Bartosz Dziewoński 2014-06-25 14:40:33 UTC
It works on Wikimedia wikis. Please provide reproduction instructions.
Comment 2 Bartosz Dziewoński 2014-06-25 15:01:15 UTC
I looked at the linked page and that is not the HTML I see.

<a href="/wiki/File:Mario_Kart_TV_logo_(alt)_-_Mario_Kart_8.svg" class="image"><img alt="Mario Kart TV logo (alt) - Mario Kart 8.svg" src="/wiki/images/thumb/d/d3/Mario_Kart_TV_logo_%28alt%29_-_Mario_Kart_8.svg/1900px-Mario_Kart_TV_logo_%28alt%29_-_Mario_Kart_8.svg.png" width="1900" height="482" srcset="/wiki/images/thumb/d/d3/Mario_Kart_TV_logo_%28alt%29_-_Mario_Kart_8.svg/2850px-Mario_Kart_TV_logo_%28alt%29_-_Mario_Kart_8.svg.png 1.5x,  2x" /></a>

The 2x one is missing, the 1.5x one is there. Maybe your system is just unable to handle such large images?
Comment 3 Mark A. Hershberger 2014-06-25 17:57:29 UTC
Thanks for looking at this more thoroughly.  I don't know much about the srcset params, so maybe I'm missing something here.  Is there a reason the 2x wouldn't be provided?  Doesn't that indicate a bug?
Comment 4 Brion Vibber 2014-06-25 19:07:03 UTC
Might media wiki be configured by default with a max size for svg rendering?

What does the debug log say during rendering?
Comment 5 Mark A. Hershberger 2014-06-26 00:33:16 UTC
(In reply to Brion Vibber from comment #4)
> Might media wiki be configured by default with a max size for svg rendering?

But, in that case, shouldn't 2x be eliminated?

> What does the debug log say during rendering?

I'll try to ask for that.
Comment 6 Gerrit Notification Bot 2014-06-26 00:49:16 UTC
Change 142172 had a related patch set uploaded by Brian Wolff:
Check for error before outputting srcset urls

https://gerrit.wikimedia.org/r/142172
Comment 7 Bawolff (Brian Wolff) 2014-06-26 00:50:26 UTC
That wiki couldn't make thumbs that big ( http://www.pidgi.net/wiki/api.php?action=query&prop=imageinfo&titles=File:Mario_Kart_TV_logo_%28alt%29_-_Mario_Kart_8.svg&iiurlwidth=3800&iiprop=url|mime ). The code didn't check $thumb->isError(), and ->getUrl() on a MediaTransformError object return false, which when cast to a string becomes the empty string.
Comment 8 Mew Regions 2014-06-26 02:37:49 UTC
I'm the owner of the wiki that the error is being shown on. I forgot to mention that it only appears on larger thumbnail sizes, which makes sense with the function of srcset.

Here's all the SVG rendering-related settings in LocalSettings.php:

$wgAllowTitlesInSVG = true;
$wgSVGConverters = array( 'ImageMagick' => '/usr/bin/convert -density $widthx$height -background transparent -thumbnail $widthx$height\! $input PNG:$output');
$wgSVGConverter = 'ImageMagick' ;

The only thing in error log is the following:

mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed, referer: http://pidgi.net/wiki/index.php?title=File:Mario_Kart_TV_logo_(alt)_-_Mario_Kart_8.svg&action=submit

No idea if that could be related.

Brian, would this be related to a limited amount of memory, then? I don't recall having this issue in 1.19 (the previous version this wiki used prior to 1.23).
Comment 9 Gerrit Notification Bot 2014-08-28 07:35:25 UTC
Change 142172 merged by jenkins-bot:
Check for error before outputting srcset urls

https://gerrit.wikimedia.org/r/142172
Comment 10 Andre Klapper 2014-10-17 11:42:21 UTC
All patches mentioned in this report were merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?
Comment 11 Andre Klapper 2014-11-15 12:19:20 UTC
No reply to comment 10 - assuming this bug is FIXED.
If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links