Project:Support desk

About this board

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

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  3. To start a new thread, click "Start a new topic".
Usernamekiran (talkcontribs)

Hell. I am running a bot on mrwiki since last few months. I tried to run another bot (different account) on enwiki. Under some particular scenarios, I can edit on enwiki from toolforge successfully. But under some scenarios, I get the error '''no fallback key found in lookup dict for en'''. I went through the comments of the source code of but it did not make much sense. What is the exact meaning/reason of this error? Thanks a lot in advance. Usernamekiran (talk) 16:57, 25 September 2022 (UTC)

Reply to "no fallback key"
Justman10000 (talkcontribs)

The extension UserGroups does not react. Data on my wiki, found in the bottom thread of an answer

Malyacko (talkcontribs)

See "Post a new question" in the sidebar what to provide *here*, plus describe which steps to perform plus what "does not react" mean. Thanks.

Justman10000 (talkcontribs)


I already wrote:

Data on my wiki, found in the bottom thread of an answer

Malyacko (talkcontribs)

If you ask for help it would be a nice courtesy to readers to not make them have to click through random things and try to find other posts by you first.

Justman10000 (talkcontribs)
Justman10000 (talkcontribs)

I've already fixed a bug! The other is that group rights are not inherited...

Reply to "UserGroups not react"

how to transclude automatically the translated page

Wladek92 (talkcontribs)

If I want to transclude a translated subpage I can write:


to transclude Special:MyLanguage/User:Wladek92/save/doc/fr for example but I only get the link to this page as => Special:MyLanguage/User:Wladek92/save/doc .

How can I make the transclusion effective ?

Christian 🇫🇷 FR (talk) 08:37, 25 September 2022 (UTC)

Bawolff (talkcontribs)

Not all special pages are transcludable.

You can sort of do something equivalent using the int: prefix for things in the MW namespace, but its hacky.

Reply to "how to transclude automatically the translated page"
Justman10000 (talkcontribs)

With the extension DataDump this error appears at php maintenance/update.php:

Creating data_dump table...Wikimedia\Rdbms\DBQueryError from line 1606 of /home/web/mediawiki/includes/libs/rdbms/database/Database.php: Error 42601: ERROR:  syntax error at or near "`" LINE 2:  `dumps_completed` INT(1) NOT NULL,

Malyacko (talkcontribs)
Justman10000 (talkcontribs)

Hmm, it seems like DataDump is designed for MySQL/MariaDB only! Here the file that causes the error...

Justman10000 (talkcontribs)

I have now transferred everything from MySQL to PostgreSQL using SQLines! Except for this content:

ALTER TABLE /*$wgDBprefix*/data_dump MODIFY COLUMN dumps_size BIGINT unsigned NOT NULL DEFAULT 0;

SQLines doesn't do anything about it, and PostgreSQL doesn't accept it either

Justman10000 (talkcontribs)
Reply to "SQL Error"

Getting the page tools and personal tools for a skin

ArrakisMiner (talkcontribs)

I'm trying to create a skin in PHP for my wiki, and I'm having issues with getting the page tools (edit, view, history etc) and the user tools (login, watch, talk, contribs etc) to display properly. I've taken a look at some of the skins around, and it seems that the best way, and recommended way, to do this is via this snipped:

$personalTools = $this->getPersonalTools();
foreach ( $personalTools as $key => $item ) {
echo $this->makeListItem( $key, $item );

And for the namespace tools:

$pageNav = $this->data['content_navigation'];
foreach ( $pageNav['namespaces'] as $key => $tab ) {
echo $this->makeListItem( $key, $tab );

This is causing me issues, however, and both variants of the code, for either the page tools or the user tools, display in the top left of the screen and at the top of the skin code (when viewed in Inspect Element) irregardless of where they're placed in the code — how do I get them to respect the div they're placed into and not go to the top left of the page?

TheDJ (talkcontribs)

echo outputs wherever the output position currently is. Perhaps you need to concatenate to a previously generated string variable ? It really depends. Its issues like these which are why we are switching to a mustache template based architecture for skins btw.

ArrakisMiner (talkcontribs)

Hmm, maybe, I'm following the code here and here respectively, so I'm not entirely sure what I'm doing differently?

Reply to "Getting the page tools and personal tools for a skin"

"Passwords must be at least 10 characters" even though I have an 8 character password policy

Vicarage (talkcontribs)

Mediawiki 1.35.0, LocalSettings.php has

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8;

But when I try to change my (administrator account) password, I get the red text 'Passwords must be at least 10 characters', and it won't accept the 8 character password I want

Ammarpad (talkcontribs)

That is the 'default' only as the name suggests. Any more specific policy will override it. You're being asked for 10 because that's the requirement for users in 'sysop' group. You must to change it there too: $wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8;. If you're in interface-admin or bureaucrat groups you must also change it for each group.

Vicarage (talkcontribs)

That occurred to me, though its hardly obvious, as a default I specify should override something set inside code so I added the lines to correspond to Special:ActiveUsers

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8; $wgPasswordPolicy['policies']['administrator']['MinimalPasswordLength'] = 8; $wgPasswordPolicy['policies']['interface administrator']['MinimalPasswordLength'] = 8; $wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 8;

And nothing changed. I even added sysop, in case that was some daft hidden group

Only by editing includes/DefaultSettings.php and changing all the 10s to 8s did I manage to beat it into submission. Grrrr

Bawolff (talkcontribs)

$wgPasswordPolicy['policies'] = [ 'default' => ['MinimalPasswordLength' => 8]];

Alternatively, you can put var_dump( $wgPasswordPolicy); die(); at the very end of LocalSettings.php to figure out the final value and see if its what you expect.

Ammarpad (talkcontribs)

There's no group 'administrator', so that line would not do any anything. The canonical name of the group is 'sysop'. You're not supposed to edit DefaultSettings.php. You better copy the relevant lines to LocalSettings.php

Vicarage (talkcontribs)

Basic information

Username:John: Member of groups:Administrators, Autoconfirmed users, Bureaucrats, Interface administrators, Users

No sign of sysop here

$wgPasswordPolicy['policies'] = [ 'default' => ['MinimalPasswordLength' => 12];

makes my system lock up. I will stick with editing includes/DefaultSettings.php and moaning

TheDJ (talkcontribs)

"No sign of sysop here"

Sysop is the technical name of the administrators group in the software. The 'human' name value of it is "Administrator". This fact is arguably so well hidden in the interface these days, that it is hard to know if you don't know about the old name. A place where you can still see it is in the url of list users: Special:ListUsers/sysop

$wgPasswordPolicy['policies'] = [ 'default' => ['MinimalPasswordLength' => 12];

[] need to be balanced. you are missing a ] at the end there.

Vicarage (talkcontribs) (talkcontribs)

Maybe you solved this by now but if someone else struggle with this like I did today, here's what worked for me (added to LocalSettings.php):

## Change MinimalPasswordLength

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 8;

$wgPasswordPolicy['policies']['interface-admin']['MinimalPasswordLength'] = 8;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 8;

KHFischbach (talkcontribs)


I yesterday installed a local copy of mediawiki and have the same problem as @Vicarage. I have set the the dump as recommended by @Bawolff. Result is:

array(2) {  ["policies"]=>  array(5) {    ["bureaucrat"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(6)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["sysop"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(6)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["interface-admin"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(10)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["bot"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(10)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["default"]=>    array(5) {      ["MinimalPasswordLength"]=>      int(6)      ["PasswordCannotBeSubstringInUsername"]=>      array(2) {        ["value"]=>        bool(true)        ["suggestChangeOnLogin"]=>        bool(true)      }      ["PasswordCannotMatchDefaults"]=>      array(2) {        ["value"]=>        bool(true)        ["suggestChangeOnLogin"]=>        bool(true)      }      ["MaximalPasswordLength"]=>      array(2) {        ["value"]=>        int(4096)        ["suggestChangeOnLogin"]=>        bool(true)      }      ["PasswordNotInCommonList"]=>      array(2) {        ["value"]=>        bool(true)        ["suggestChangeOnLogin"]=>        bool(true)      }    }  }  ["checks"]=>  array(6) {    ["MinimalPasswordLength"]=>    string(48) "PasswordPolicyChecks::checkMinimalPasswordLength"    ["MinimumPasswordLengthToLogin"]=>    string(55) "PasswordPolicyChecks::checkMinimumPasswordLengthToLogin"    ["PasswordCannotBeSubstringInUsername"]=>    string(62) "PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername"    ["PasswordCannotMatchDefaults"]=>    string(54) "PasswordPolicyChecks::checkPasswordCannotMatchDefaults"    ["MaximalPasswordLength"]=>    string(48) "PasswordPolicyChecks::checkMaximalPasswordLength"    ["PasswordNotInCommonList"]=>    string(50) "PasswordPolicyChecks::checkPasswordNotInCommonList"  } }

From my perspective it shows the param is set and accepted.

But still, when trying to change the password for a user (the only user created as admin during setup), i get the message the minimum password length is 10.

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 6;

Any idea why this happens?




when writing the reply I reconcnized the user created during setup might be of role "interface-admin" (makes sense). I added this to the params and now it works for the user where I tested it.

Reply to ""Passwords must be at least 10 characters" even though I have an 8 character password policy"

Excess paragraphs (<p>) on pages

Mukilol (talkcontribs)

Hey! I have had issues with excess paragraphs on my wiki for months. Initially I tried to solve it with CSS but was unable to do so due to how random the content structure can be and thought about asking for help here instead.

We have a template called {{skill}} on our wiki which returns a hoverable image and text inside a div which is set to display: inline-block. Whenever this template is called, any text before and after it gets wrapped in paragraph tags which results in a minimum of 3 rows when it should be 1. This was not always the case and was probably introduced with an upgrade but I can't say for sure.

As a hacky workaround for this we are currently placing all content in lists where the {{skill}} template is used, this prevents the excess paragraphs and makes everything inline.

Has anyone experienced anything like this or knows what could be causing it?

AhmadF.Cheema (talkcontribs)

The {{skill}} template, does it have extra newlines in its beginning or end?

Mukilol (talkcontribs)

The includeonly within that template has no newlines, the noinclude has a few though.

AhmadF.Cheema (talkcontribs)

Are there any between the includeonly and noinclude tags?

Note that even starting the noinclude tags on the next line might cause the template to render with extra newlines. It's better to type the opening noinclude tag on the same line, directly after the previous closing includeonly tag.

Mukilol (talkcontribs)

They are at the same line right now, there are no spaces/newlines at the start, end or between. Would it help if I post a link to the template here? Not sure if it's allowed.

Ciencia Al Poder (talkcontribs)

Yes, please, a link would help

Mukilol (talkcontribs)

I managed to fix the problem which was that the content inside {{skill}} was within a div and MediaWiki decided that everything before and after that should be in separate paragraphs. I changed from div to span and it worked. I initially had display:inline-block on the div but that didn't make any difference.

Ciencia Al Poder (talkcontribs)

This usually happens when you have several div on separate lines:


And can be solved by removing the line break between div:



--><div>something</div> (talkcontribs)

Had the exact same issue, replacing div with span worked, thanks!

And the template did not have a single line break in it, it's just a single line, so that is most definitely not the issue, mediawiki for some reason just seems to wrap everything before and after a div in paragraphs.

Reply to "Excess paragraphs (<p>) on pages"

Eliminating Wiki Markup from Search Results

3 (talkcontribs)

Is there any solution to removing Wiki markup from Search results? (talkcontribs)

If you understand how hooks work (and thus were able to define this hook that's really not documented), that might work.

For mere mortals who understand a little php, edit includes/search/SqlSearchResult.php, define the function strip_tags_content (as found in the comments for strip-tag), and then use it on mText:

$clean = $this->strip_tags_content($this->mText);

 if ( $wgAdvancedSearchHighlighting ) {

  return $h->highlightText( $clean, $this->terms );

 } else {

  return $h->highlightSimple( $clean, $this->terms );


This ensures that you're stripping out the HTML before the highlighting is applied (or else that would get stripped out too!). It looks like getTextSnippet is only/mostly used for search results, so hopefully the impact is limited there.

Maybe someone will add mortal-level doc on how to use that Hook, though it's been 9 years since this question was asked, so...

Reply to "Eliminating Wiki Markup from Search Results"

MediaWiki runtime error:: No such service: HookContainer

Ewaszkow (talkcontribs)

I have installed the very latest mediawiki 1.38.2 and I am running PHP version 8.0.13 under RedHat Linux 9. When I try to run MediaWiki on any brower AND when I try to run php update.php in the /maintenence directory, I get the following error.

PHP Fatal error:  Uncaught Wikimedia\Services\NoSuchServiceException: No such service: HookContainer in /export/mediawiki-1.38.2/vendor/wikimedia/services/src/ServiceContainer.php:468

Stack trace:

#0 /export/mediawiki-1.38.2/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService()

#1 /export/mediawiki-1.38.2/includes/MediaWikiServices.php(294): Wikimedia\Services\ServiceContainer->getService()

#2 /export/mediawiki-1.38.2/includes/MediaWikiServices.php(1024): MediaWiki\MediaWikiServices->getService()

#3 /export/mediawiki-1.38.2/includes/MediaWikiServices.php(282): MediaWiki\MediaWikiServices->getHookContainer()

#4 /export/mediawiki-1.38.2/includes/exception/MWExceptionHandler.php(130): MediaWiki\MediaWikiServices::getInstance()

#5 /export/mediawiki-1.38.2/includes/exception/MWExceptionHandler.php(201): MWExceptionHandler::rollbackPrimaryChangesAndLog()

#6 /export/mediawiki-1.38.2/includes/exception/MWExceptionHandler.php(170): MWExceptionHandler::handleException()

#7 [internal function]: MWExceptionHandler::handleUncaughtException()

#8 {main}

  thrown in /export/mediawiki-1.38.2/vendor/wikimedia/services/src/ServiceContainer.php on line 468


Bawolff (talkcontribs)
Reply to "MediaWiki runtime error:: No such service: HookContainer"

MySQL binlog files filling up rapidly (sometimes)

2003:C2:3F12:5F00:4991:A98C:6259:6575 (talkcontribs)

Ubuntu 20.04, Apache 2.4, PHP 7.4.3, MySQL 8.0 & MediaWiki 1.35.7


usually the binlogs match (roughly) with the activities shown in the recent changes page. Sometimes within the last days I encountered a mysterious phenomenon; the binlog grows rapidly while there is only few activity in the wiki for some hours.


-rw-r-----  1 mysql mysql    3697808 Sep 22 01:25 mysql-bin.001100

-rw-r-----  1 mysql mysql  157288660 Sep 22 18:53 mysql-bin.001101

-rw-r-----  1 mysql mysql  157372133 Sep 22 20:50 mysql-bin.001102

-rw-r-----  1 mysql mysql  157311099 Sep 22 21:25 mysql-bin.001103

-rw-r-----  1 mysql mysql  157388609 Sep 22 21:50 mysql-bin.001104

-rw-r-----  1 mysql mysql  157291160 Sep 22 22:07 mysql-bin.001105

-rw-r-----  1 mysql mysql  157367584 Sep 22 22:34 mysql-bin.001106

-rw-r-----  1 mysql mysql  157343097 Sep 22 22:42 mysql-bin.001107

-rw-r-----  1 mysql mysql  157383979 Sep 22 22:50 mysql-bin.001108

-rw-r-----  1 mysql mysql  157354101 Sep 22 22:57 mysql-bin.001109

-rw-r-----  1 mysql mysql  157420107 Sep 22 23:17 mysql-bin.001110

-rw-r-----  1 mysql mysql  157487073 Sep 22 23:37 mysql-bin.001111

-rw-r-----  1 mysql mysql  157536460 Sep 22 23:55 mysql-bin.001112

-rw-r-----  1 mysql mysql  130376490 Sep 23 00:13 mysql-bin.001113

-rw-r-----  1 mysql mysql  157559320 Sep 23 00:35 mysql-bin.001114

-rw-r-----  1 mysql mysql  157322415 Sep 23 01:02 mysql-bin.001115

-rw-r-----  1 mysql mysql   72729153 Sep 23 01:25 mysql-bin.001116

On September 22th, from 0:01 am till 20:50 pm, I count approx. 130 changes. I don't quite understand why this few changes can produce 2 x 150 MB binlogs, but even worse: from 20:50 pm - 23:55 pm there are no more than 31 edits <-> 10 x 150 MB binlogs!?

Does anyone have any ideas WHAT the database is doing here?

Bawolff (talkcontribs)

I would suggest looking in the binlogs and seeing which tables are being modified.

Reply to "MySQL binlog files filling up rapidly (sometimes)"