Hi,
I have a problem with MediaWiki v1.11.0 (and PHP 5.2.0-8+etch7 (apache2handler)). For some images, the following syntax just doesn't work: [[Image:D8 001.jpg]]
All I get is the alt= text and no image. Here is the source of the resulting page:
,----------------------------------------------------------------------- |<a href="/wiki/index.php/Image:D8_001.jpg" class="image" |title="Image:D8 001.jpg"><img alt="Image:D8 001.jpg" |src="/wiki/thumb.php?f=D8_001.jpg&width=784" width="784" |height="1109" border="0" /></a> `-----------------------------------------------------------------------
Indeed, here is what I get when following /wiki/thumb.php?f=D8_001.jpg&width=784
,----------------------------------------------------------------------- |Error generating thumbnail | |Error generating thumbnail: Image was not scaled, is |the requested |width bigger than the source? `-----------------------------------------------------------------------
But the following syntax works, if I specify manually for every image a pixel size: [[Image:D8 001.jpg|500px]] Surprisingly, if I specify the original pixel size of the picture, it doesn't work. (In this case, [[Image:D8 001.jpg|784px]])
What is the problem ?
Thank you
Le 28.09.2007 15:56, Nicolas STRANSKY a écrit :
Hi,
I have a problem with MediaWiki v1.11.0 (and PHP 5.2.0-8+etch7 (apache2handler)). For some images, the following syntax just doesn't work: [[Image:D8 001.jpg]]
Hi,
No follow up about this ? In short, [[Image:D8 001.jpg]] doesn't work, whatever the image is. But [[Image:D8 001.jpg|80px]] does work (or any size except the original one). Everything used to work fine with MW 1.10.x and before.
Thanks for any help !
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Nicolas STRANSKY wrote:
Le 28.09.2007 15:56, Nicolas STRANSKY a écrit :
Hi,
I have a problem with MediaWiki v1.11.0 (and PHP 5.2.0-8+etch7 (apache2handler)). For some images, the following syntax just doesn't work: [[Image:D8 001.jpg]]
Hi,
No follow up about this ? In short, [[Image:D8 001.jpg]] doesn't work, whatever the image is. But [[Image:D8 001.jpg|80px]] does work (or any size except the original one). Everything used to work fine with MW 1.10.x and before.
There's something very non-standard and possibly broken with your configuration if it's sending non-scaled images through an explicit thumb.php.
Without knowing your configuration, it's hard to guess.
- -- brion vibber (brion @ wikimedia.org)
Le 04.10.2007 16:54, Brion Vibber a écrit :
Nicolas STRANSKY wrote:
No follow up about this ? In short, [[Image:D8 001.jpg]] doesn't work, whatever the image is. But [[Image:D8 001.jpg|80px]] does work (or any size except the original one). Everything used to work fine with MW 1.10.x and before.
There's something very non-standard and possibly broken with your configuration if it's sending non-scaled images through an explicit thumb.php.
No, the scaling is working very fine. It's just the *non* scaled images that don't work. Because of the following error: "Error generating thumbnail: Image was not scaled, is the requested width bigger than the source?"
Attached is my LocalSettings.php. $wgUseImageMagick = true or false have the same effect.
Thanks for your help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Nicolas STRANSKY wrote:
Le 04.10.2007 16:54, Brion Vibber a écrit :
Nicolas STRANSKY wrote:
No follow up about this ? In short, [[Image:D8 001.jpg]] doesn't work, whatever the image is. But [[Image:D8 001.jpg|80px]] does work (or any size except the original one). Everything used to work fine with MW 1.10.x and before.
There's something very non-standard and possibly broken with your configuration if it's sending non-scaled images through an explicit thumb.php.
No, the scaling is working very fine. It's just the *non* scaled images that don't work. Because of the following error: "Error generating thumbnail: Image was not scaled, is the requested width bigger than the source?"
Allow me to detail:
1) It is not the normal configuration for thumb.php to appear directly in <img src> in the HTML output in the wiki.
2) Original-size or larger-size non-rendered thumbs should probably not be using thumb.php with a larger-than-original specified size.
Thus a non-default configuration must be in effect.
Attached is my LocalSettings.php. $wgUseImageMagick = true or false have the same effect.
Attachments are stripped by the mailing list for security.
- -- brion vibber (brion @ wikimedia.org)
Le 04.10.2007 17:40, Brion Vibber a écrit :
Allow me to detail:
- It is not the normal configuration for thumb.php to appear directly
in <img src> in the HTML output in the wiki.
- Original-size or larger-size non-rendered thumbs should probably not
be using thumb.php with a larger-than-original specified size.
Thus a non-default configuration must be in effect.
OK, thanks for this clarification. So I am looking for what produces this problem.
Attached is my LocalSettings.php. $wgUseImageMagick = true or false have the same effect.
Attachments are stripped by the mailing list for security.
OK, so here it is. I am not using other settings and includes/DefaultSettings.php is completely unmodified.
--------------------------------------------------------------------- # This file was automatically generated by the MediaWiki installer. # If you make manual changes, please keep track in case you need to # recreate them later.
$IP = "/usr/local/share/mediawiki/site"; ini_set( "include_path", ".:$IP:$IP/includes:$IP/languages" ); require_once( "includes/DefaultSettings.php" );
# If PHP's memory limit is very low, some operations may fail. ini_set( 'memory_limit', '20M' );
if ( $wgCommandLineMode ) { if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) { die( "This script must be run from the command line\n" ); } } elseif ( empty( $wgNoOutputBuffer ) ) { ## Compress output if the browser supports it if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' ); }
$wgSitename = "WikiOM";
$wgScriptPath = "/wiki"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php";
## If using PHP as a CGI module, use the ugly URLs $wgArticlePath = "$wgScript/$1"; # $wgArticlePath = "$wgScript?title=$1";
$wgStylePath = "$wgScriptPath/skins"; $wgStyleDirectory = "$IP/skins"; #$wgLogo = "/wiki/skins/common/images/wiki.png"; #$wgLogo = "/wiki/images/institut_curie.png"; $wgLogo = "/wiki/images/institut_curie_logo_equipe_wiki.png";
$wgUploadPath = "$wgScriptPath/images"; $wgUploadDirectory = "$IP/images";
$wgEnableEmail = true; $wgEnableUserEmail = true;
$wgEmergencyContact = "Nicolas.Stranskyxxxxx"; $wgPasswordSender = "Nicolas.Stranskyxxxxx";
## For a detailed description of the following switches see ## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent ## There are many more options for fine tuning available see ## /includes/DefaultSettings.php ## UPO means: this is also a user preference option $wgEnotifUserTalk = true; # UPO $wgEnotifWatchlist = true; # UPO $wgEmailAuthentication = true;
$wgDBserver = "localhost"; $wgDBname = "wikidb"; $wgDBuser = "xxxx"; $wgDBpassword = "xxxx"; $wgDBprefix = "";
# If you're on MySQL 3.x, this next line must be FALSE: $wgDBmysql4 = true;
## Shared memory settings $wgMainCacheType = CACHE_NONE; $wgMemCachedServers = array();
## To enable image uploads, make sure the 'images' directory ## is writable, then uncomment this: $wgEnableUploads = true; $wgUseImageResize = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert";
## If you want to use image uploads under safe mode, ## create the directories images/archive, images/thumb and ## images/temp, and make them all writable. Then uncomment ## this, if it's not already uncommented: # $wgHashedUploadDirectory = false;
## If you have the appropriate support software installed ## you can enable inline LaTeX equations: $wgUseTeX = true; $wgMathPath = "{$wgUploadPath}/math"; $wgMathDirectory = "{$wgUploadDirectory}/math"; $wgTmpDirectory = "{$wgUploadDirectory}/tmp";
$wgLocalInterwiki = $wgSitename;
$wgLanguageCode = "fr";
$wgProxyKey = "be8d819d70c74c62103f34c76f7ffed79e50e8e9";
## Default skin: you can change the default skin. Use the internal symbolic ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook': # $wgDefaultSkin = 'monobook';
## For attaching licensing metadata to pages, and displaying an ## appropriate copyright notice / icon. GNU Free Documentation ## License and Creative Commons licenses are supported so far. # $wgEnableCreativeCommonsRdf = true; $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright $wgRightsUrl = ""; $wgRightsText = ""; $wgRightsIcon = ""; # $wgRightsCode = ""; # Not yet used
$wgDiff3 = "/usr/bin/diff3";
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
# Les anonymes sont muets. $wgGroupPermissions['*']['edit'] = false;
# au moins 3 lettres dans le mdp $wgMinimalPasswordLength = 3;
# This is the list of preferred extensions for uploading files. Uploading # files with extensions not in this list will trigger a warning. $wgFileExtensions = array( 'png', 'jpg', 'jpeg', 'ogg', 'xls', 'pdf', 'ppt' );
$wgVerifyMimeType= false;
# This is a flag to determine whether or not to check file extensions on # upload. $wgCheckFileExtensions = true;
# If this is turned off, users may override the warning for files not # covered by $wgFileExtensions. $wgStrictFileExtensions = false;
# Warn if uploaded files are larger than this # 5Mo $wgUploadSizeWarning = 5 * 1024 * 1024;
$wgSiteSupportPage = ''; $wgSiteSupport = '';
/** * Set this to the number of authors that you want to be credited below an * article text. Set it to zero to hide the attribution block, and a negative * number (like -1) to show all authors. Note that this will require 2-3 extra * database hits, which can have a not insignificant impact on performance for * large wikis. */ $wgMaxCredits = 2;
/** If there are more than $wgMaxCredits authors, show $wgMaxCredits of them. * Otherwise, link to a separate credits page. */ $wgShowCreditsIfMax = true;
# Pour avoir le support des file:// $wgUrlProtocols = 'http://|https://|ftp://|irc://|gopher://|news:|mailto:|file://';
/** * Enable AJAX framework */ $wgUseAjax = true;
/** * Enable auto suggestion for the search bar * Requires $wgUseAjax to be true too. * Causes wfSajaxSearch to be added to $wgAjaxExportList */ $wgAjaxSearch = true;
/** * Enable watching/unwatching pages using AJAX. * Requires $wgUseAjax to be true too. * Causes wfAjaxWatch to be added to $wgAjaxExportList */ $wgAjaxWatch = true;
/** Show watching users in recent changes, watchlist and page history views */ $wgRCShowWatchingUsers = true; /** Show watching users in Page views */ $wgPageShowWatchingUsers = false;
$wgShowExceptionDetails = true; ---------------------------------------------------------------------
Nicolas STRANSKY wrote:
Le 04.10.2007 17:40, Brion Vibber a écrit :
- It is not the normal configuration for thumb.php to appear directly
in <img src> in the HTML output in the wiki.
- Original-size or larger-size non-rendered thumbs should probably not
be using thumb.php with a larger-than-original specified size.
Thus a non-default configuration must be in effect.
OK, thanks for this clarification. So I am looking for what produces this problem.
[snip]
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
Ok, I'd first recommend removing this line unless you're sure you need it. Unless $wgGenerateThumbnailOnParse has also been disabled, I'm 99% sure that it doesn't do anything useful for you, so removing it will simply make your bug go away. :)
I did some quick poking and can confirm the described behavior with 1.11; URLs with thumb.php are being output for same-size and larger-size images as well as those that would actually need rendering. That's probably a bug.
Tried briefly to repro on current trunk (1.12) but couldn't get $wgThumbnailScriptPath to do anything at all...
-- brion vibber (brion @ wikimedia.org)
Le 04.10.2007 18:03, Brion Vibber a écrit :
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
Ok, I'd first recommend removing this line unless you're sure you need it. Unless $wgGenerateThumbnailOnParse has also been disabled, I'm 99% sure that it doesn't do anything useful for you, so removing it will simply make your bug go away. :)
Thanks, you spotted it ! I have no idea why this setting was here, it probably always has...
mediawiki-l@lists.wikimedia.org