Project:Support desk

Jump to navigation Jump to search

About this board

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

There are also other places where to ask :

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".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
Other languages: English  العربية čeština Esperanto français 日本語 中文

Simulating chess by using MediaWiki's delete and move features

GeoffreyT2000 (talkcontribs)

Has anyone thought of simulating chess moves by using MediaWiki's delete and move features? The idea is to upload 26 images to depict chess pieces and empty squares. Then, one would create 32 templates showing the initial positions of the pieces (e.g. "Template:A1" would show a picture of a white rook), with a parameter for the square color, perhaps {{{squarecolor}}}. Finally, one would create a "Chess" page transcluding piece position templates 64 times, with the "#ifexist" parser function used to show empty squares in lieu of redlinked templates.

Then, one can start simulating chess moves by moving piece position templates, making sure to always uncheck "Leave a redirect behind" on Special:MovePage. When the target page already exists, it would be asked to be deleted, and deletion would then correspond to capturing a piece. The only exception is with the en passant pawn capture, where the move and the deletion may be done in either order. This is also the only time one needs to manually delete a piece position template. Finally, the only time one needs to edit a piece position template is when promoting a pawn. In this case, the edit and the move may be done in either order.

Reply to "Simulating chess by using MediaWiki's delete and move features"

My band, Get Set Go's, wiki page...

MikeTVGetSetGo (talkcontribs)


I am hoping someone at Wikipedia can help explain things to me. First, let me say that I'm a big supporter of what you do and I have contributed, even though it has been small amounts, but I have contributed every time you have requested it of me. I say that simply because, as a poor-working class musician, I don't really have the largesse to give to anybody but I see the significant advantage Wikipedia brings to the entire world and it is something worth supporting.

That said, my band's page has had a disclaimer on it for years saying something to the effect that our accomplishments or something of that sort aren't notable enough to be included on Wikipedia. Which I find strange as I have encountered countless friends' bands who have profiles who have accomplished significantly less than we have during our 17 years as a band and their pages aren't flagged.

My most notable accomplishment is that I had a very strong relationship with Grey's Anatomy, and over the first decade of the show, they licensed 8 of my songs, and repeatedly licensed Wait and I Hate Everyone, both of which made it onto their first and second soundtracks, respectively. I've also had about 20 other film and tv licenses.

We were one of the founding members of the Mr. T's Bowl scene, in Los Angles, that sprouted up in 1998 and continued til 2006. I was the booker and host of all of that weekly and eventually three-times a week scene.

I stopped courting the press from 2011 til just now because I really do not like the short-shrift most music journalists give not only my music but music in general. It rankles me to have someone dismiss thousands of hours of my work after what was obviously only a cursory listen. But I have been engaging in scores in public facing, popular podcast interviews such as Night Attack, Cord Killers, The Daily Tech News, a handful of Scott Johnson's podcasts, and myriad others over the past decade. Does that exposure not count? Or should I, every time I do something public facing, should I submit it to Wikipedia for consideration?"

And on top of that, there's the music. Certainly I don't court the music press. (Well, I just started doing so for my newest album. In fits and starts. But, I still feel the exact same way. And I'm still getting the same sort of shitty responses. So, I may never again. I mean, there are a few bright spots. And I do have some advocates in the press. And I am planning on leveraging them.) But I have tens of thousands of people who listen to my music every month. Does that count for nothing? Do I really need articles to validate my musical output? Sure, I'm a small working class musician but I work my ass off. The proof is in the pudding. My numbers grow year in and year out. Not super fast but but they do. My audience is growing.

Anyway, this flag has been on Get Set Go's page for years. And it really has begun to stick in my craw. If there's something I need to, if you need to go do three or four interviews, so you've got sources you can cite that aren't podcasts, I'll do it. Please, just let me know what I need to do to remove that flag..

Thank you so much,

Mike TV

Get Set Go

Reply to "My band, Get Set Go's, wiki page..."

deleteOldRevisions.php for subpages or namespaces

1 (talkcontribs)

I understand that I can delete all of my old revisions using php maintenance/deleteOldRevisions.php --delete or I could delete individual old page revisions using php maintenance/deleteOldRevisions.php --delete 1 2 15 38, but is it possible to delete old page revisions for an individual page to include all of its subpages? If not, is there an automated way to get all the ids for the subpages under a specific page?

Also, is there a way to delete all old page revisions for a specific namespace?

Reply to "deleteOldRevisions.php for subpages or namespaces"

How do I change how my wiki looks when shared on a social media site?

Daintiiyt (talkcontribs)

Hello, I am creating a new wiki and I was wondering how to change the text/image that appears when a link from the wiki is shared on a social media site such as Discord, Twitter, etc.

Reply to "How do I change how my wiki looks when shared on a social media site?"

How do I add custom license to Extension:UploadWizard?

Summary by Spas.Z.Spasov

I've achieved the desired result by using of $wgResourceModules, $wgMessagesDirs and $wgHooks['BeforePageDisplay'].

Spas.Z.Spasov (talkcontribs)


In order to add a custom license type for Extension:UploadWizard, I've added the following configuration settings in LocalSettings.php:

$wgUploadWizardConfig = array(
        'debug' => false,

        'altUploadForm' => 'Special:Upload',
        'fallbackToAltUploadForm' => false,
        'enableFormData' => true, 
        'enableMultipleFiles' => true,
        'enableMultiFileSelect' => true,
        'uwLanguages' => array(
                'ru' => 'Русский',
                'bg' => 'Български',
                'en' => 'English'
        'uwLanguages' => empty( $uwLanguages ) ? [ 'bg' => 'Български' ] : $uwLanguages,
        'tutorial' => array( 'skip' => false ),
        'maxUploads' => 15,
        'fileExtensions' => $wgFileExtensions,

        'licenses' => array(
                'cc-by-nc-sa-4.0' => [
                        'msg' => 'mwe-upwiz-license-cc-by-nc-sa-4.0',
                        'icons' => [ 'cc-by', 'cc-nc', 'cc-sa' ],
                        'url' => '//',
                        'languageCodePrefix' => 'deed.'

        'licensing' => array(
                'defaultType' => 'ownWork',
                'ownWorkDefault' => 'choice',
                'ownWork' => array(
                        'type' => 'or',
                        'template' => 'self',
                        'defaults' => 'cc-by-nc-sa-4.0',
                        'licenses' => array(

Everything works except the custom messages for the new license type, as you can see on this screenshot. I've created:

  • MediaWiki:Mwe-upwiz-license-cc-by-nc-sa-4.0
  • MediaWiki:Mwe-upwiz-source-ownwork-assert-cc-by-nc-sa-4.0
  • MediaWiki:Mwe-upwiz-source-ownwork-cc-by-nc-sa-4.0-explain

But Extension:UploadWizard doesn't accept them until they are not registered in $IP/extensions/UploadWizard/extension.json, under the messages section. So my question is:

Is there any elegant way to append (register) my messages to the UploadWizard's messages list without modify its extension.json file?

Spas.Z.Spasov (talkcontribs)

Fortunately I've managed to solve my problem by adding the following code in LocalSettings.php:

# Help:

// register a ResourceLoader module...
$wgResourceModules['myUploadWizardResources'] = array(
        //'scripts' => array( 'resourcesCustom/UploadWizard/myUploadWizard.js' ),

        'styles' => array( 'resourcesCustom/UploadWizard/myUploadWizard.css' ),

        'messages' => array(


// The content of the messages (based on  $IP/extensions/UploadWizard/i18n/*.json)
$wgMessagesDirs['myUploadWizardResources'] = 'resourcesCustom/UploadWizard/i18n';

// ...and set up a hook to add it to every page
function myUploadWizardResourcesLoader( &$out ) {
        $out->addModules( 'myUploadWizardResources' );
        return true;

// Register hook
$wgHooks['BeforePageDisplay'][] = 'myUploadWizardResourcesLoader';

In addition, by myUploadWizard.css I'm creating the new 'cc-nc' icon:

$ ls $IP/resourcesCustom/UploadWizard/
18px-Cc-nc_white.svg.png  i18n/  myUploadWizard.css

$ cat $IP/resourcesCustom/UploadWizard/myUploadWizard.css
.mwe-upwiz-cc-nc-icon {
        /* @embed */
        background: url( 18px-Cc-nc_white.svg.png ) no-repeat center center;

The actual messages are involved and translated by $wgMessagesDirs['myUploadWizardResources'] = 'resourcesCustom/UploadWizard/i18n';:

ls $IP/resourcesCustom/UploadWizard/i18n/
bg.json  en.json  ru.json

$ cat $IP/resourcesCustom/UploadWizard/i18n/en.json
    "mwe-upwiz-source-ownwork-assert-cc-by-nc-sa-4.0": "I, $2, {{GENDER:$4|the copyright holder}} of {{PLURAL:$1|this work|these works}}, irrevocably grant anyone the right to use {{PLURAL:$1|this work|these works}} under the Creative Commons Attribution NonCommercial ShareAlike 4.0 license ([$3 legal code]).",
    "mwe-upwiz-source-ownwork-cc-by-nc-sa-4.0-explain": "(Anyone may use, share or remix {{PLURAL:$1|this work|these works}} with NonCommercial purposes, as long as they credit me and share any derivative work under this license.)",
    "mwe-upwiz-license-cc-by-nc-sa-4.0": "Creative Commons Attribution NonCommercial ShareAlike 4.0 ([$2 legal code])"
Babytigers (talkcontribs)


I'm working on my own extension to download article in pdf.

Is it possible to allow an adress IP to read article? The IP is the wiki server ip.

Or if it's impossible, there is another way ?

Thanks you

Clement (talkcontribs)

You are in a wiki, where people do not have read access, except they are logged in, right?

Babytigers (talkcontribs)


in my localsettings i add :

$wgGroupPermissions['*']['read']    = false;

$wgGroupPermissions['user']['read'] = true; (talkcontribs)

I do not know of a way inside the MediaWiki Core itself to grant access based on the use of a certain IP address. Maybe something like that is possible with an extension.

However, it might be easier to just have your extension log in with a user account, e.g. using the API:Login.

Babytigers (talkcontribs)

ok i am trying this solution .

Thanks you

Jlvale (talkcontribs)

@BabytigersYou managed to do this? I'm doing the same as you were, but I'm stuck in the same problem.

Reply to "Allow an IP adress to read"

mw-render does not embed the WIKI page images in downloaded PDF file

SanjayKSahu (talkcontribs)

We have configured MediaWiki with mwlib server to render HTML pages to PDF using 'mw-render'.

Following is the 'mw-render' command successfully produces a PDF document for the Wikipedia article page Physics

$ mw-render --config --username='xxxx' --password='yyyy' --output test.pdf --writer rl Physics

But, We need to configure same for MediaWiki so that MediaWiki API could render PDF using following configuration in LocalSetting.php .

We are using LDAP setup authentication for our internal wiki site. and I am able to render the PDF file using the following command.

$ mw-render --config  --username='xxxx' --password='yyyy' --output test.pdf --writer rl Apache

But, here the issue is, The downloaded PDF file does not includes the images visible in the WIKI page. And throws following ERROR on shell. Any help appreciated.

"HTTPError: HTTP Error 401: Unauthorized

<Greenlet at 0x7f5973334370: download_to_file(', '/tmp/tmp-mw-renderumcvy4/tmpDnRbLS/nuwiki/images/, '/tmp/tmp-mw-renderumcvy4/tmpDnRbLS/nuwiki/images/)> failed with HTTPError "

Reply to "mw-render does not embed the WIKI page images in downloaded PDF file"

How to keep session after log in with a bot?

Jlvale (talkcontribs)

I'm trying to implement a script do download some html pages from my wiki and convert them to pdf. I'm logging in into my private wiki using a bot, trough the API, and getting the login token, but I can't keep my session (using the same token) to do some actions, like download an article html page using wget. We use LDAP authentication in our server, this can be a complication to use bots?

Malyacko (talkcontribs)

@Jlvale How do you know that you "can't keep my session"? What happens or not? What are error messages or not?

Jlvale (talkcontribs)

@Malyacko Every time I try to download a page using wget with the bot user, I receive the authentication required page, even though I post the bot login, password and the generated login token.

This post was hidden by Jlvale (history)
Reply to "How to keep session after log in with a bot?"

Problem to update MW 1.3 (very Old) until an 1.32

1 (talkcontribs)


we have an MediaWiki 1.3 (works with LATIN1!) on an Server with PHP5.3 (!!) and an older mySQL. Now we want to update. We Copy MW 1.3 to an Server with actual mySQL and PHP5.6. (Final-Server PHP 7.2)

I figured we'd have to update to 1.4 first, then 1.5.

Ok ... Server is too new ...

Manually Change Class Namespace-Entrys to MWNamespace. Change DB-Entrys with TYPE= to ENGINE=

1) Update to 1.4 (via console: php update.php) => Works (ok we CAN'T see an webpage-output ... 100+ deprecated errors ...)

2) Update to 1.5 ... First: php upgrade1_5.php ... no errors ... but it kills the db (Umlauts ÄÖÜß; same on filesystems etc.). I think he recognize the wrong charsets in db und change LATIN1 as UTF8 to UTF8 (the "new" names are typical for this error)

How do I get it clean from 1.4 to 1.32? When do we have to switch to the PHP7.2 server in the update process?

I have an problem to understand whats the different between AdminSettings.php and LocalSettings.php (i think this is the reason for my updateproblem...). I've understand that i must fill the AdminSettings with DB-Infos ... more? $wgUseLatin1 = true to adminsettings for upgrade1_5.php? I don't to this in my last "Update-Run" ...

Thank you

Reply to "Problem to update MW 1.3 (very Old) until an 1.32"

Help!! change the multimedia storage directory to a partition

Emanuelvasilack (talkcontribs)

Hola. Como puedo cambiar el directorio de almacemiento de las imagenes a una particion

Cuales son los pasos a seguir ?

Google translator: Hello. How can I change the file storage directory to a partition?

Which are the steps to follow ?

Ciencia Al Poder (talkcontribs)
  1. Mueve la carpeta de archivos (normalmente la carpeta /images) a la ruta que quieras en el servidor.
  2. En el servidor web (apachem nginx, IIS...), debes mapear esa nueva ruta a un directorio virtual del servidor (podría ser la misma /images por defecto)
  3. Luego debes cambiar Manual:$wgUploadDirectory para que apunte a esa nueva ubicación
  4. Si cambió la ruta de acceso desde el exterior (punto 2) debes cambiar también Manual:$wgUploadPath para que corresponda a esa ruta (esto es la ruta en la URL, no en el sistema de archivos).
Reply to "Help!! change the multimedia storage directory to a partition"