Project:Support desk

Jump to: navigation, search

About this board

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

How to make UploadWizard fields unrequired?

Tribly (talkcontribs)

I installed UploadWizard extension on my wiki and everything seems to be working fine, but I stuck with tinkering with it's configuration. How do I setup in $wgUploadWizardConfig in the LocalSettings.php to make the "Source" and "Author(s)" fields and other required fields unrequired? We upload a lot of memes from the internet to our wiki and the wast majority of those memes have unknown authors or just unoriginal, Those required fields also slow down the upload time of our images.

AhmadF.Cheema (talkcontribs)

In your UploadWizard.config.php, try changing:

// Min author string length
'minAuthorLength' => 1,

// Min source string length
'minSourceLength' => 5,


'minAuthorLength' => 0,


'minSourceLength' => 0,

Maybe this will work.

Tribly (talkcontribs)

I tried to change those but it didn't had any effect.

AhmadF.Cheema (talkcontribs)

OK, scratch the previous edits, there is no need for them.

  • Open file "mw.UploadWizardDeedThirdParty.js" in directory $IP/extensions/UploadWizard/resources
  • Comment out the following lines:
if ( text === '' ) {
				errors.push( mw.message( 'mwe-upwiz-error-blank' ) );
			} else if ( text.length < minLength ) {
				errors.push( mw.message( 'mwe-upwiz-error-too-short', minLength ) );
			} else if ( text.length > maxLength ) {
				errors.push( mw.message( 'mwe-upwiz-error-too-long', maxLength ) );


if ( text === '' ) {
				errors.push( mw.message( 'mwe-upwiz-error-blank' ) );
			} else if ( text.length < minLength ) {
				errors.push( mw.message( 'mwe-upwiz-error-too-short', minLength ) );
			} else if ( text.length > maxLength ) {
				errors.push( mw.message( 'mwe-upwiz-error-too-long', maxLength ) );
  • This should work.
  • Note that I don't know php, so I am unsure whether it will break something else or not, but I think it should be fine.
Tribly (talkcontribs)

Thank you very much! This worked perfectly. But by any chance do you know how can I do the same in the Describe section for the "Description" and "Date created" fields as well?

AhmadF.Cheema (talkcontribs)

Wouldn't it be easier to just use some other extension like: Extension:MsUpload?

If bulk uploading is the only feature you want.

AhmadF.Cheema (talkcontribs)


  • Open file "mw.UploadWizardDetails.js" in directory $IP/extensions/UploadWizard/resources
  • Comment out the following lines:



		this.descriptionsDetailsField = new uw.FieldLayout( this.descriptionsDetails, {
			label: mw.message( 'mwe-upwiz-desc' ).text(),
			help: mw.message( 'mwe-upwiz-tooltip-description' ).text(),
			required: descriptionRequired
		} );
		this.mainFields.push( this.descriptionsDetailsField );


		this.dateDetailsField = new uw.FieldLayout( this.dateDetails, {
			label: mw.message( 'mwe-upwiz-date-created' ).text(),
			help: mw.message( 'mwe-upwiz-tooltip-date' ).text(),
			required: true
		} );
		this.mainFields.push( this.dateDetailsField );
Tribly (talkcontribs)

Thank you very much! :)

Reply to "How to make UploadWizard fields unrequired?"
Arturmafezzoli (talkcontribs)

Bom dia.

Já ativei o html no meu localSettings Quando vou editar a pagina principal ele carrega corretamente o html. Mas quando salvo a página ele volta como era antes. Já aconteceu com alguém isso ? Alguém também sabe o que possa ser feito para ficar o html direto ? (talkcontribs)

When you edited the page, it displayed html correctly, but when you tried to save it, the edit had not been saved. Instead you still saw the old version of the page. Please check the History tab of that page. Has a new revision with your changes been created?

You say that you have activated html in LocalSettings.php. How did you do that?

(Are we speaking about a problem with pages, which get delivered from cached and outdated HTML files?)

Ciencia Al Poder (talkcontribs)

That may be a caching problem on your browser. Try CTRL + SHIFT + R

Reply to "Wiki com html"
Roots06 (talkcontribs)

Dear all

it seems that the users in my mediawiki ( do not appear in phpMyAdmin (Version information: 4.1.14) making it difficult to manage privileges etc... Anyone know where does this come from ?

Thank you in advance

Ciencia Al Poder (talkcontribs)

Users are stored in the user table

Roots06 (talkcontribs)

Thank you for your quick answer.

But, this is precisely my problem. Users don't appear in my users tables

I just have a number appearing 4572696b but this doesn't match any username

It is like my phpmyadmin (access via wamp) don't communicate with the online medawiki ?

Thank you for any help

Ciencia Al Poder (talkcontribs)

Your wiki seems to have currently 4 users. That means the user table should contain 4 rows. If that's not the case, maybe you're querying the wrong server/database

Roots06 (talkcontribs)

Thank you afain for your prompt answers !

I have 5 database

When I select the user table of "surveillance_citoyenne" database, I only have one row with user name : 4572696b ?? Other tables only have user "root" ...

Thank you in advance

Ciencia Al Poder (talkcontribs)

You may be pointing to a wrong mysql server (a testing one or whatever). That's easy to test, just rename some of the tables like user and page, to something else, and if the wiki is not completely broken after that you're definitively not querying the same database/server as the wiki.

Roots06 (talkcontribs)

Thank you ! Indeed renaming the tables don't affect the wiki.

So how can I access the good mysqlserver? (I currently click on the green wampicon on my pc and then on phpmyadmin; or http://localhost/phpmyadmin/)

Ciencia Al Poder (talkcontribs)

That's tricky to explain. In LocalSettings.php there are the database connection settings like Manual:$wgDBserver. In phpmyadmin you should look at the server settings in the,php file, and see if they match.

Roots06 (talkcontribs)

Thank you !

What is supposed to match ? I can't find find Database server or name in my,php file (See below).

$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';

//$cfg['Servers'][$i]['auth_type'] = 'cookie';

$cfg['Servers'][$i]['auth_type'] = 'config';

$cfg['Servers'][$i]['user'] = 'root';

$cfg['Servers'][$i]['password'] = '';

/* Server parameters */

$cfg['Servers'][$i]['host'] = '';

$cfg['Servers'][$i]['connect_type'] = 'tcp';

$cfg['Servers'][$i]['compress'] = false;

/* Select mysql if your server does not have mysqli */

$cfg['Servers'][$i]['extension'] = 'mysqli';

$cfg['Servers'][$i]['AllowNoPassword'] = true; (talkcontribs)

From your file, the server ($wgDBserver) is and the username ($wgDBuser) is root. For this user, a password ($wgDBpassword) is not used. The only thing, which you do not find in is the database name, which your wiki is using ($wgDBname).

Reply to "users don't appear in my phpMyadmin"

Upgrading from 1.26 to 1.27 breaks putting pages in a category

7 (talkcontribs)

I upgraded my wiki from 1.26 to 1.27. Now, when I put a page in a category, I get the category at the bottom of the page. However, it is not placed in that category. I'm not sure why this has happened. I have narrowed it down to the upgrade. Any suggestions on how to fix this?


AhmadF.Cheema (talkcontribs)

Browse to:


If there are "jobs" remaining, then until the category job has not been executed, the category page will not update.

See Manual:Job queue

MwColin (talkcontribs)

Thanks. There are 5040 jobs. Is there a way to force it to run. As I am using SMW and forms, I want it in the correct category so that it can be immediately edited with the form.

AhmadF.Cheema (talkcontribs)

In SSH, go to the MediaWiki directory and run: php maintenance/runJobs.php

Note that 5000+ jobs will take quite some time to execute.

Also, for future purposes better to setup a cron job for this.

MwColin (talkcontribs)

Thanks again. This cleared the queue and didn't take long. I read somewhere else that this piece of code has been moved to the job queue in 1.27. Therefore the behaviour has changed. With 1.26 it was added immediately to the category, now you have to wait for the job to run. I would like the previous behaviour, so will look at methods to get the queue to be cleared as quickly as possible.

AhmadF.Cheema (talkcontribs)

You can try setting $wgRunJobsAsync = false; in LocalSettings.php.

MwColin (talkcontribs)

Thanks again. I tried this but the page is still not "instantly" added to the category. It appears to be added about 5 minutes later. I suppose this is a new "feature". And perhaps my way of doing things, adding it to a category and then immediately wanting to edit the page, is not a common way of working. I like to save page that is automatically generated with a form, and then edit it to add text. However, I can live with this. Thanks a lot for the help.

Reply to "Upgrading from 1.26 to 1.27 breaks putting pages in a category"

Exception encountered, of type "LocalFileLockError"


Whenever I want upload new image I get this error.

Exception encountered, of type "LocalFileLockError"

Ubuntu Server (Apache2) (talkcontribs)

In which wiki is this happening?

Which version of MediaWiki is this wiki using?

(Possibly T135485, T132921...)


Newest one (talkcontribs)

What is the "newest version"? Is that 1.27, which is the newest LTS version? Or 1.28wmf..., which is the newest point release? Or even something completely different, because you installed this from some strange repository, which only has outdated stuff anyways?


1 2 7 (talkcontribs)

Had the same issue but it was only a permission problem. MediaWiki was not able to write to the images subdirectory. Could be the same issue on your system.

Nicolas NALLET (talkcontribs)

try to put www-data as owner recursively

chown -R  www-data images (talkcontribs)

Same problem here. We don't have a www-data user or group (talkcontribs)

How do I fix this? When I try to upload an image on 1.27 I get the same "Exception encountered, of type "LocalFileLockError":

Already had issues with caching which I was able to resolve.

Reply to "Exception encountered, of type "LocalFileLockError""

Mediawiki/php:add an icon to my wiki

נועם ימיני (talkcontribs)

I use mediawiki 1.27.0 and I want to add an icon to my wiki, like the 'W' on Wikipedia.

How can I do it? (talkcontribs)

In your LocalSettings.php, set the $wgLogo with the correct path to your image.

$wgLogo = $wgScriptPath . '/images/4/47/mylogo.png';
2002:43F4:3ABB:1234:6057:F7D0:17AF:F4C3 (talkcontribs)

@נועם ימיני, Specify "$wgFavicon" to the ".ico" file of your choice in LocalSettings.php.

@, they mean the site icon, not the logo.

נועם ימיני (talkcontribs)

I installed description2 on my wiki and I saw that if I don't add a metadesc tag there is an auto description.

how can I edit it?

Reply to "description2 extension"
Nanoukaplus (talkcontribs)


I've got a query #ask using the format template, with a template and an introtemplate.

In my introtemplate I want to use some parameters of my #ask for example :


used as


on my introtemplate.

It doesn't work... And of course I use named args = yes

Help please ? Does anyone know why it doesn't work ? Because in a "normal" template it does

Reply to "Ask and introtemplate"

Display images in a query

Summary by Nanoukaplus

Use #if instead of #ifexist (too expensive)

Nanoukaplus (talkcontribs)


I made a query to display images, but if I want more than 100 results in my page, the last images aren't displayed even if they exist.

Does someone know why ? (talkcontribs)

I can't display the images

Nanoukaplus (talkcontribs)

Anybody has an answer ? :(

Malyacko (talkcontribs)

Please reply exact steps to reproduce the problem ("a query to display images" is a bit vague) and MediaWiki version information.

Nanoukaplus (talkcontribs)

On my page I have this code :

{{#ask:|mainlabel=-|?=Objet|?photo droite=Photo|?ref dossier=ref dossier|sort=Modification date|format=template|introtemplate=Header accueil objets|template=Accueil objets|outrotemplate=Table footer|default=Aucun objet existant avec ces critères|named args=yes}}

and on my template "Accueil objets" there is

<nowiki><includeonly>|{{{?Objet}}}|{{#ifexist: File:{{{?Photo}}}|[[File:{{{?Photo}}}|150px]]|Fichier inexistant}}|{{{ref dossier}}}</nowiki>

and I use MediaWIki1.21.2

Collection Extension : setting $wgScriptPath

1 (talkcontribs)

The actual documentation of Collection Extension mention that we should change the "base_url" variable in the function renderCollection of extensions/Collection/Collection.body.php file if changing $wgScriptPath messes up our site (obviously it does).

As there is no "base_url" in the last version of Collection for Mediawiki 1.27 (in Collection.body.php file) and because the issue mentioned date from 2012, and because the code presented in the proposed fixed is completely different from the one that I downloaded here (link from the official Collection Extension page), I wondering if it is still relevant and necessary ?

If someone can tell me which one is the good one, which one is up to date and which one is obsolete.

I hope it will help you to put the documentation up to date !


Reply to "Collection Extension : setting $wgScriptPath"