Project:Support desk

Jump to: navigation, search

About this board

Edit description
vde   Welcome to's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Q&A etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Database error when trying delete page

Summary by Thachakrit

Resolved by run update.php

Thachakrit (talkcontribs)

I installed mediawiki 1.28.2 on a server Ubuntu 16.04 / Apache 2.4.18 / PHP 7.0 / MariaDB 10.0.29.

Everything work fine until I got an error message when trying delete page from my wiki.

Database error

A database query error has occurred. This may indicate a bug in the software.

[23f939656076e62453b3960b] 2017-06-23 04:49:43: Fatal exception of type "DBQueryError"

Picture :

How to fix this issue ?

Thachakrit (talkcontribs)

I just run php update.php on terminal. It works fine now. (talkcontribs)

We have a project wiki that requires authentication to access any page other than the login page (already in place), we would like to log every page accessed by user. Extension:Access Log mentions it has that capability, I would be fine with just logging to a file.. any suggestions?

Reply to "Logging every page accessed v1.24.1"
2602:301:777F:F860:574:C9E9:DBB7:52A (talkcontribs)

cant login

Reply to "cant login"

Some of Bizagi's Thumbnails didn't display on Mediawiki

Pmt-it (talkcontribs)

Hello everyone,

When I export my Bizagi's procedure to MediaWiki, some of Bizagi's Thumbnails display and some other not display and there's an error message instead of a thumbnail on Mediawiki.

I read a blog that dealt with image size. It said that if the image size was important, mediawiki could not resize it to become Thumbnails, but a setting exist to fix it.

My question is, what's the setting to fix my problem please?

Malyacko (talkcontribs)

What is Bizagi? What is "my Bizagi's procedure"? And if there is an error message, what is the error message? And which MediaWiki version is used? Have you checked Manual:Errors and symptoms#Image Thumbnails not working and.2For appearing already?

Pmt-it (talkcontribs)

Hi Malyacko,

Bizagi is an app in which we can export procedure to Wiki format compatible Mediawiki.

I use the latest version of Mediawiki.

The error message isː "Erreur lors de la création de la miniature :" (french) and translate by "Error creating thumbnail:".

I had to add those settings below to LocalSettings in order to display images from Bizagi to Mediawikiː

$wgAllowImageTag = true;

$wgGroupPermissions['*']['upload'] = true;

$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg');

$wgEnableUploads = true;

$wgHashedUploadDirectory = true;

$wgUrlProtocols[] = "data:";

What I've done to try to correct thumbnail's error is those settings below but it doesn't workː

$wgUseImageResize = true;

$wgUseImageMagick = true;

#I copied ImageMagick portable folders in $IP/extra/convert.

$wgImageMagickConvertCommand = "$IP/extra/convert";

# For SVG image support

$wgFileExtensions[] = 'svg';

$wgAllowTitlesInSVG = true;

$wgSVGConverter = 'ImageMagick';

$wgSVGConverters = array(

    'ImageMagick' => '"$IP/extra/convert" -background white -geometry $width $input $output',


Please help, I'm a novice...thanks a lot

Ciencia Al Poder (talkcontribs)

We need a more descriptive error than a generic "Error creating thumbnail". Try setting $wgShowExceptionDetails to true.

If you don't get a more descriptive error message, you'll need to query your thumb.php script with a file that has this problem, for example http://yourwikisite/thumb.php?f=Image_with_problems.png&w=200 and it should give the error directly.

Pmt-it (talkcontribs)

Hi Ciencia Al Poder,

I set $wgShowExceptionDetails to true. i got the error message ː"The source file 'picture._namepng' does not exist.". I noticed inside ./mediawiki/images/thumb, images that haven't been converted to thumbnail are not displayed in mediawiki website. I think that's the problem.

Is it because mediawiki don't manage large images ? So do I have to find a setting to help to convert them ?

Thanks for help

AhmadF.Cheema (talkcontribs)

Is your $wgGenerateThumbnailOnParse set to true?

Pmt-it (talkcontribs)

For other articles I had this error at the place of thumbnails ː

Error Creating Thumbnail: Unable to Save Thumbnail to Destination

I set this $wgGenerateThumbnailOnParse = true;

But still have the problem.

I don't understand why in some Bizagi's procedure thumbnails display and in other nothing?

please help

Reply to "Some of Bizagi's Thumbnails didn't display on Mediawiki"

Links to fails for some repos

Jeblad (talkcontribs)

It seems like a lot of extensions on GitHub have failing links to TranslateWiki. These links should be something like mwgithub-something, but are ext-something. Extensions with this problem can be found in Category:Extensions in GitHub version control, and it seems to be several of them. The extension where I first saw this problem was Extension:Pickle.

Could anyone fix this?

Jeblad (talkcontribs)

Fixed it for Extension:Pickle, but all extensions listed in the category should be checked.

Reply to "Links to fails for some repos"
Stitchill (talkcontribs)

I am trying to log in as Крепкий чай, which used to be my main identity for creating and editing wikipedia pages. I haven't logged in for ages, but remember (I am fairly certain) the password - however it isn't letting me log in - I get this message, which I do not understand

Central user log in

No active login attempt is in progress for your session.

Please advise what I can do to log in once again as Крепкий чай. Thanks. Stitchill

Stitchill (talkcontribs)

PS - I am still able to log in and out as Stitchill.

Reply to "Log-in problem"
Kenjiraw (talkcontribs)

I have installed mediawiki on my webserver and when I try to upload any file, it say:

Error creating thumbnail:

Error: -1

The image work and is uploaded, but can't use the thumbnail that doesn't work. What I can do ?

AhmadF.Cheema (talkcontribs)

See if anything here helps: Thread:Project:Support desk/Error creating thumbnail Error code: -1

Kenjiraw (talkcontribs)

But the variables $wgMaxShellMemory and $wgMaxShellFileSize are in wich file ? oO

AhmadF.Cheema (talkcontribs)

These ($wgMaxShellMemory and $wgMaxShellFileSize) can be inserted in your LocalSettings.php file.

What is the size of your image files?

Kenjiraw (talkcontribs)

~ 700x700 and less than 1MB

Kenjiraw (talkcontribs)

Editing value of the variables does nothing. =/

AhmadF.Cheema (talkcontribs)

Try Manual:How to debug and see if you can get more information about the error.

Also, can you tell what kind of hosting you are on, what OS is your Wiki running on and whether ImageMagick is installed for your hosting or not?

Kenjiraw (talkcontribs)

Hosting: OVH

System: Linux 3.14.60-grsec-hosting-web-3.14 #1 SMP Wed Jun 1 13:57:11 UTC 2016 x86_64

There is ImageMagick used with Imagick

When I set on the display of PHP Errors, there is no error displayed.

Ciencia Al Poder (talkcontribs)

Set up a debug log, preview a page with a thumbnail, modifying its size, and see in the debug log what's trying to do to create the thumbnail

Kenjiraw (talkcontribs)

I tried to setup the debug log but don't understand where the file is saved.

I can't preview a page with thumbnail because the thumbnail is not created and can't add a bugged thumbnail to a page.

Regardless of size, the thumbnail is never created. I tried it many times, many image. =(

Ciencia Al Poder (talkcontribs)

In Manual:How to debug there are instructions about how to set up a debug log. Note that it needs to be set up to a location with proper permissions, so the server can write to it.

With preview I mean you edit an existing page or create a new one, put an image on it with a specific size that will trigger a thumbnail, and hit preview, so you don't need to put the broken thumbnail on a public page.

Kenjiraw (talkcontribs)

I already followed the instructions on Manual:How to debug but it isn't clear.

I don't know what "/var/log/mediawiki/debug-{$wgDBname}.log"; refer to.

I don't know how to set up the correct permissions to MediaWiki.

In my folders, there is no log file.

After some other try, it seems to work fine with low resolution of image like 50x50.

Sometimes the image is displayed in full size when I try to add "File:myfile.ext" but often I can't put an image on a page because its thumbnail is bugged and the page return the error "Some parts of the edit form did not reach the server; double-check that your edits are intact and try again."

I tried to create a log folder with chmod 775 on and set in my LocalSettings "$wgDebugLogFile = "/log/debug-{$wgDBname}.log";" butnothing happen, I think I did not understand how to do.

Ciencia Al Poder (talkcontribs)

> it seems to work fine with low resolution of image like 50x50

Do you mean when the original image is 50x50 and you're generating a thumbnail of a greater size (like 120px)? If yes, it means MediaWiki is not generating a thumbnail for them, just serving the original file and the browser is scaling it. Otherwise, it means your server is having problems resizing some images, usually because of server limitations about memory or CPU usage. If you changed $wgMaxShellMemory and $wgMaxShellFileSize, the limitation may be imposed by your hosting, you may need to get a better hosting plan.

About the Some parts of the edit form did not reach the server; double-check that your edits are intact and try again problem, it may be also further limitations on the server, cutting down the request body at a few bytes. Again, check with your hosting provider.

Kenjiraw (talkcontribs)

Ok thank you for the help, bad new to know that OVH doesn't allow this. I will use another method then ($wgAllowExternalImagesFrom).

Rodrigogodoysi (talkcontribs)

For me, works later add the command in LocalSettings.php:

$wgGenerateThumbnailOnParse = true;

Reply to "Error creating thumbnail"

Error creating thumbnail Error code: -1

Dlwnsgud0819 (talkcontribs)

Error creating thumbnail Error code: -1

Some images say Error creating thumbnail Error code: -1. Not display that error in all images, but some display that error or is too late to create thumbnail.

Version is like this:

MediaWiki : 1.24.2

PHP : 5.4.39 (apache)

MySQL : 5.0.45-log

ImageMagick : 6.9.1-1

Ciencia Al Poder (talkcontribs)

If that happens with some images, it may be that they're large or complex enough which makes the thumbnail to fail. It may be that it requires more memory than the available memory of the server, or the allowed memory to use by PHP. See Manual:$wgMaxShellMemory and Manual:$wgMaxShellFileSize, and try using higher values.

Dlwnsgud0819 (talkcontribs)

I already set that paramiter($wgMaxShellFileSize = 307200; $wgMaxShellMemory = 409600;), but It doesn't work. Also php limit is already 128M (I checked by memory_limit in phpinfo.)

Ciencia Al Poder (talkcontribs)

Best you can do then is follow Manual:How to debug to set up a debug log, that will print the exact command used to create the thumbnail, and execute that same command from the shell to see if it gives any error message.

Dlwnsgud0819 (talkcontribs)

This is the log which shows error:
wfShellExec: /bin/bash '/home/xxxwiki/user/w/includes/' 'OMP_NUM_THREADS='\''1'\'' '\''/usr/local/bin/convert'\'' '\''-background'\'' '\''white'\'' '\''/home/xxxwiki/user/w/images/2/2d/gggg.gif'\'' '\''-thumbnail'\'' '\''418x600!'\'' '\''-set'\'' '\''comment'\'' '\''File source:'\'' '\''-depth'\'' '\''8'\'' '\''-rotate'\'' '\''-0'\'' '\''/tmp/transform_e203a7abc952-1.gif'\''' 'MW_INCLUDE_STDERR=1;MW_CPU_LIMIT=0; MW_CGROUP='\'''\''; MW_MEM_LIMIT=409600; MW_FILE_SIZE_LIMIT=307200; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'

[thumbnail] thumbnail failed on error -1 "" from "'/usr/local/bin/convert' '-background' 'white' '/home/xxxwiki/user/w/images/2/2d/gggg.gif' '-thumbnail' '418x600!' '-set' 'comment' 'File source:' '-depth' '8' '-rotate' '-0' '/tmp/transform_e203a7abc952-1.gif'"

[thumbnail] Removing bad 95389-byte thumbnail "/tmp/transform_e203a7abc952-1.gif". unlink() succeeded

Ciencia Al Poder (talkcontribs)

Do you have shell access? You should try to paste that command on the shell and see if it gives an error message. The strange thing is that apparently it succeeds in creating the file, because it says it was removing a bad thumbnail from the temp directory, which is the same it was trying to create.

Gus38000 (talkcontribs)

I have the same problem

The logs with the error :

File::transform: Doing stat for mwstore://local-backend/local-thumb/4/4b/IMAGE.png/400px-IMAGE.png

FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/4/4b/IMAGE.png/400px-IMAGE.png does not exist.

TransformationalImageHandler::doTransform: creating 400x381 thumbnail at /home/HOST/www/wiki/images/temp/transform_56e28eca10ad-1.png using scaler im

TransformationalImageHandler::doTransform: called wfMkdirParents(/home/HOST/www/wiki/images/temp)

BitmapHandler::transformImageMagick: running ImageMagick: '/usr/bin/convert' '-quality' '95' '-background' 'white' '/home/HOST/www/wiki/images/4/4b/IMAGE.png' '-thumbnail' '400x381!' '-set' 'comment' 'File source:' '-depth' '8' '-rotate' '-0' '/home/HOST/www/wiki/images/temp/transform_56e28eca10ad-1.png'

wfShellExec: /bin/bash '/home/HOST/www/wiki/includes/' 'OMP_NUM_THREADS='\''1'\'' '\''/usr/bin/convert'\'' '\''-quality'\'' '\''95'\'' '\''-background'\'' '\''white'\'' '\''/home/HOST/www/wiki/images/4/4b/IMAGE.png'\'' '\''-thumbnail'\'' '\''400x381!'\'' '\''-set'\'' '\''comment'\'' '\''File source:'\'' '\''-depth'\'' '\''8'\'' '\''-rotate'\'' '\''-0'\'' '\''/home/HOST/www/wiki/images/temp/transform_56e28eca10ad-1.png'\''' 'MW_INCLUDE_STDERR=1;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'

[thumbnail] thumbnail failed on error -1 "" from "'/usr/bin/convert' '-quality' '95' '-background' 'white' '/home/HOST/www/wiki/images/4/4b/IMAGE.png' '-thumbnail' '400x381!' '-set' 'comment' 'File source:' '-depth' '8' '-rotate' '-0' '/home/HOST/www/wiki/images/temp/transform_56e28eca10ad-1.png'"

[thumbnail] Removing bad 97208-byte thumbnail "/home/HOST/www/wiki/images/temp/transform_56e28eca10ad-1.png". unlink() succeeded

I've tried the command on shell :
$ /bin/bash '/home/HOST/www/wiki/includes/' 'OMP_NUM_THREADS='\''1'\'' '\''/usr/bin/convert'\'' '\''-quality'\'' '\''95'\'' '\''-background'\'' '\''white'\'' '\''/home/HOST/www/wiki/images/4/4b/IMAGE.png'\'' '\''-thumbnail'\'' '\''400x381!'\'' '\''-set'\'' '\''comment'\'' '\''File source:'\'' '\''-depth'\'' '\''8'\'' '\''-rotate'\'' '\''-0'\'' '\''/home/HOST/www/wiki/images/temp/transform_56e28eca10ad-1.png'\''' 'MW_INCLUDE_STDERR=1;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'
$ echo $?

And only the convert command :
$ '/usr/bin/convert' '-quality' '95' '-background' 'white' '/home/HOST/www/wiki/images/4/4b/IMAGE.png' '-thumbnail' '400x381!' '-set' 'comment' 'File source:' '-depth' '8' '-rotate' '-0' '/home/HOST/www/wiki/images/temp/transform_56e28eca10ad-1.png'
$ echo $?

In the 2 case the thumbnail is created in temporary folder.
As you can see the exit code is ok (0)

My configuration :
MediaWiki 1.24.2
PHP 5.5.22 (fpm-fcgi)
$ convert --version
Version: ImageMagick 6.6.0-4 2014-11-22 Q16
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP

Akn87 (talkcontribs)

I've got the same error and already tried to increase $wgMaxShellFileSize, $wgMaxShellMemory and memory_limit in php.ini

@Dlwnsgud0819 , @Gus38000 maybe your problem was solved in the mean time and you can tell me what your solution was?

My system configuration:

MediaWiki : 1.23.11

PHP : 5.6.5 (Apache)

MySQL : 5.6

ImageMagick : 6.7.8-2

Ciencia Al Poder (talkcontribs)

To get a solution, the problem must be diagnosed properly.

Set up a debug log as I explained in one of the messages to see the exact command that's being executed. Look at it, and see if the paths it uses make sense, wiki has permissions to write to the resulting file, etc. Also, try executing the command yourself on the server.

Stefahn (talkcontribs)

Hi all, Hi Cienca,

I ran into the same issue: "Error creating thumbnail Error code: -1"

My setup: MediaWiki 1.27.0, PHP 5.6.18 (cgi-fcgi), MySQL 5.6.29, ImageMagick 6.9.2-0 Q16 i686

Here's what my debug file says:

File::transform: Doing stat for mwstore://local-backend/local-thumb/0/05/260.jpg/70px-260.jpg
FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/0/05/260.jpg/70px-260.jpg does not exist.
TransformationalImageHandler::doTransform: creating 70x70 thumbnail at /tmp/transform_4c3f03fe95f1.jpg using scaler im
TransformationalImageHandler::doTransform: called wfMkdirParents(/tmp)
TransformationalImageHandler::{closure}: Running convert -version
wfShellExec: /bin/bash '/html/' ''\''/usr/local/bin/convert'\'' -version' 'MW_INCLUDE_STDERR=;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'
BitmapHandler::transformImageMagick: running ImageMagick: '/usr/local/bin/convert' '-quality' '80' '-background' 'white' '-define' 'jpeg:size=70x70' '/html/' '-thumbnail' '70x70!' '-set' 'comment' 'File source:' '+set' 'Thumb::URI' '-depth' '8' '-sharpen' '0x0.4' '-rotate' '-0' '-sampling-factor' '2x2,1x1,1x1' '/tmp/transform_4c3f03fe95f1.jpg'
wfShellExec: /bin/bash '/html/' 'OMP_NUM_THREADS='\''1'\'' '\''/usr/local/bin/convert'\'' '\''-quality'\'' '\''80'\'' '\''-background'\'' '\''white'\'' '\''-define'\'' '\''jpeg:size=70x70'\'' '\''/html/'\'' '\''-thumbnail'\'' '\''70x70!'\'' '\''-set'\'' '\''comment'\'' '\''File source:'\'' '\''+set'\'' '\''Thumb::URI'\'' '\''-depth'\'' '\''8'\'' '\''-sharpen'\'' '\''0x0.4'\'' '\''-rotate'\'' '\''-0'\'' '\''-sampling-factor'\'' '\''2x2,1x1,1x1'\'' '\''/tmp/transform_4c3f03fe95f1.jpg'\''' 'MW_INCLUDE_STDERR=1;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=307200; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes'
[thumbnail] thumbnail failed on error -1 "" from "'/usr/local/bin/convert' '-quality' '80' '-background' 'white' '-define' 'jpeg:size=70x70' '/html/' '-thumbnail' '70x70!' '-set' 'comment' 'File source:' '+set' 'Thumb::URI' '-depth' '8' '-sharpen' '0x0.4' '-rotate' '-0' '-sampling-factor' '2x2,1x1,1x1' '/tmp/transform_4c3f03fe95f1.jpg'"
[thumbnail] Removing bad 1499-byte thumbnail "/tmp/transform_4c3f03fe95f1.jpg". unlink() succeeded

I also tried the 3 commands on Putty. After the second one (the command after BitmapHandler::transformImageMagick: running ImageMagick:) the file "transform_4c3f03fe95f1.jpg" is successfully generated.

So I guess it must be something wrong with the third command. However I didn't get any error message on Putty...

I hope you can help...

PS: If I set $wgUseImageMagick = false; thumbnailing works fine.

Ciencia Al Poder (talkcontribs)

That's strange, because the thumb seems to be created anyway, since at the end it says bad 1499-byte thumbnail "/tmp/transform_4c3f03fe95f1.jpg"

I'm not sure what does the -1 error means. If you can, another thing you can try is to execute that same command but with sudo, as the apache user (or the user executing PHP on the server), to see if it makes any difference. Also check if SELinux or similar may be interfering with that.

Rodrigogodoysi (talkcontribs)

For me, works fine later add the command in LocalSettings.php:

$wgGenerateThumbnailOnParse = true;

Reply to "Error creating thumbnail Error code: -1"


Summary by SolidBlock


SolidBlock (talkcontribs)

My preference language is zh-hans (中文(中国大陆)). When I click a Special:MyLanguage link, it won't take me to the place with "/zh" and "大陆简体" various. For example, when I click Special:MyLanguage/Help:Navigation, I will be took to Help:Navigation (the English page), instead of Help:Navigation/zh with zh-cn various. Please fix the problem soon.


I'm not good at English

Ciencia Al Poder (talkcontribs)

What language have you set in Special:Preferences?

SolidBlock (talkcontribs)


Ciencia Al Poder (talkcontribs)

The problem may be that Help:Navigation/zh exists, but not Help:Navigation/zh-cn

You can try setting Assistant languages: adding zh

It may be task T55789, although zh-cn variants seem to be different, in the sense that MediaWiki can automatically convert between such variants.

It may be very valuable if you can comment on that task the problem. I can do that for you if you're not sure.

SolidBlock (talkcontribs)

Thanks. I am not good at English. I have already set Assistant languages adding zh, but it may not work. (谢谢。我不太擅长英语。我已经在辅助语言加入zh了,但是没用。)

Ciencia Al Poder (talkcontribs)

Yes, I've reproduced the issue changing my language in preferences. I've added a new comment in the task explaining this situation. Feel free to subscribe yourself there if you want to be notified about updates.

Olds98 (talkcontribs)

Hello all. I am not a software programmer or a web designer.. I have a basic wiki running for my company and every time I try to set up an extension like PDFHandler or now Visual Editor and each time i follow the directions only to get errors. Clearly these setups are designed for people who do this stuff regularly. Now I am getting an error VisualEditorHooks::onBeforePageDisplay.... and SkinTemplateNavigation... and onResourceLoaderRegisterModules... and all refer to Hooks.php... is there someone i can pay to remote in and make this stuff work? Thank you

Ciencia Al Poder (talkcontribs)

If you're interested in professional consulting, look at Professional development and consulting.

Visual Editor is rather complex to setup, and latest version usually works only with latest MediaWiki version, which is probably the hook errors you're getting, because there are lots of hook changes to add new features for Visual Editor

Reply to "VirtualEditor"