We cannot get thumbnails rendered for media file names that contain a plus sign (+). The error we see is: "Error generating thumbnail - The source file for the specified thumbnail does not exist." (but the original file is there).
We found a web discussion of the problem, but without an solution. We are using an Apache’s rewrite to process thumbs upon usage (rather than at page saving time). Is this the culprit? The WMF/Commons have solved it, but we cannot find a copy of the Apache rewrite WMF is using (and the problem may be elsewhere anyways).
Has anyone encountered this problem and solved it?
-- Example Thumbnails that do not render: * http://species-id.net/openmedia/File:Agrostis%2BMibora_sp_Sturm14.jpg (fetched from commons) * http://species-id.net/openmedia/File:Amphibienlaich_%2B_Larven_Plustest.jpg (manually uploaded)
Technical details: Our mediwiki $wgIllegalFileChars setting includes ":" and "&", no "+" We use a debian 6 server with standard php, apache2, mysql and mediawiki 1.18.1.
On 17/04/12 14:36, Gregor Hagedorn wrote:
We cannot get thumbnails rendered for media file names that contain a plus sign (+). The error we see is: "Error generating thumbnail - The source file for the specified thumbnail does not exist." (but the original file is there).
We found a web discussion of the problem, but without an solution. We are using an Apache’s rewrite to process thumbs upon usage (rather than at page saving time). Is this the culprit? The WMF/Commons have solved it, but we cannot find a copy of the Apache rewrite WMF is using (and the problem may be elsewhere anyways).
Has anyone encountered this problem and solved it?
-- Example Thumbnails that do not render:
(fetched from commons)
(manually uploaded)
Yes, + in filenames is problmetic. How are you doing the rewriting to thumb.php?
The following is our apache config for the site:
Alias /wiki /var/www/v-species/w/index.php Alias /openmedia /var/www/v-species/o/index.php <IfModule mod_rewrite.c> RewriteEngine on RewriteLogLevel 0 # permanent redirect "www.xxx.net/wiki/" to "xxx.net/wiki/" ALL OLD URLs RewriteCond %{HTTP_HOST} !^species-id.net [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/?(.*) http://species-id.net/$1 [L,R=301,NE] # redirect wrong uppercase: RewriteRule ^(.*)(/WIKI/)(.*)$ $1/wiki/$3 [R]
# Thumb generation (see Manual:Thumb.php) RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteRule ^/w/media/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2 [L,QSA]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteRule ^/o/media/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /o/thumb.php?f=$1&width=$2 [L,QSA]
I very much appreciate it if you can see what needs to be changed so that "&" and "+" are working. We have analyzed it and searched for people having similar problems. Both work fine for uploading and full size image, but thumb generation fails. We use a standard imagemagick thumb generator, nothing special as far as I know. Thumb generation from command line works fine, which is why we suspect the apache rewrites to be involved.
Gregor
mediawiki-l@lists.wikimedia.org