Topic on Project:Support desk

TraaBBIT (talkcontribs)

Hello.

I added some SVG files.

But now I see on page when that files are added this error:

"Error creating thumbnail"

I have that code in LocalSettings:

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ppt', 'pdf', 'psd', 'mp3', 'xls', 'xlsx', 'swf', 'svg', 'doc','docx', 'odt', 'odc', 'odp', 'odg', 'mpp');

$wgSVGConverter = 'ImageMagick';

$wgAllowTitlesInSVG = true;

$wgSVGConverterPath= "C:/ImageMagic/convert.exe";

$wgLoadFileinfoExtension = true;

$wgMimeDetectorCommand = "file -bi";

I'm not sure about that:

$wgSVGConverterPath= "C:/ImageMagic/convert.exe";

Does that mean that I should have installed ImageMagic on my PC?

87.123.13.181 (talkcontribs)

That means that you should either remove the wrong configuration so that MediaWiki will no longer try using a program, which is not there thus throwing an error. Or you should install ImageMagick and make the path point to it.

The first $wgSVGConverterPath is superfluous and should be removed no matter what you decide to do.

TraaBBIT (talkcontribs)

OK. But should I install ImageMagic on my PC or on server?

87.123.63.88 (talkcontribs)

If, then on the server.

TraaBBIT (talkcontribs)
Ciencia Al Poder (talkcontribs)

Whenever you have /usr/local/bin/convert/convert in your LocalSettings.php, it should probably be /usr/local/bin/convert or even /usr/local/bin

TraaBBIT (talkcontribs)

I have this settings in LocalSettings.php:

#ImageMagic

$wgUseImageMagick = true;

#$wgImageMagickConvertCommand = 'C:/ImageMagick/convert.exe'; # for windows

$wgImageMagickConvertCommand = '/usr/bin/convert'; # for linux

#SVG

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ppt', 'pdf', 'psd', 'mp3', 'xls', 'xlsx', 'swf', 'svg', 'doc','docx', 'odt', 'odc', 'odp', 'odg', 'mpp');

$wgSVGConverter = 'ImageMagick';

$wgAllowTitlesInSVG = true;

$wgSVGConverterPath= '/usr/local/bin/convert';

$wgLoadFileinfoExtension = true;

$wgMimeDetectorCommand = "file -bi";

I got this error on pages:

Błąd przy generowaniu miniatury /bin/bash: /usr/bin/convert: No such file or directory

Error code: 127

http://westeros.com.pl/index.php?title=Milcz%C4%85ce_siostry

87.123.34.155 (talkcontribs)

From the shell, run this command to see where convert actually is:

which -a convert
TraaBBIT (talkcontribs)

[budrysl2@s53:: ~ ]:$ which -a convert

/usr/local/bin/convert

[budrysl2@s53:: ~ ]:$

87.123.34.155 (talkcontribs)

Adjust the path in $wgImageMagickConvertCommand to

$wgImageMagickConvertCommand = '/usr/local/bin/convert';
TraaBBIT (talkcontribs)
87.123.34.155 (talkcontribs)

The value of $wgSVGConverterPath is wrong. It needs to be the path without(!) /convert at the end.

TraaBBIT (talkcontribs)
TraaBBIT (talkcontribs)

Any idea?

87.123.34.37 (talkcontribs)

ImageMagick obviously is filling the black border with black color instead of using the grey color, which it should use.

I would ask that question in an ImageMagick forum like http://www.imagemagick.org/discourse-server/index.php

It surely helps, if you post them the exact command, which MediaWiki is using to convert the image. This will help the people over there to tell, why it's not working correctly!

TraaBBIT (talkcontribs)

And what is that command that Mediawiki use?

Ciencia Al Poder (talkcontribs)

You should create a debug log, it will have the exact command issued to ImageMagick, but the log needs to be enabled when a new thumbnail is created, so you should probably edit a page and preview an edit inserting that image with a size different from the available thumbnails.

TraaBBIT (talkcontribs)
Ciencia Al Poder (talkcontribs)
TraaBBIT (talkcontribs)

I have installed MW in /domains/westeros.com.pl/public_html

So my $wgDebugLogFile should be "/domains/westeros.com.pl/public_html/debug-{$wgDBname}.log";?

121.214.29.136 (talkcontribs)

It should absolutely not be in a publicly accessible folder.

TraaBBIT (talkcontribs)

It doesn't work for me.

How to check which code is using in MediaWiki to create thumbnalis?

Reply to "Issue with SVG file"