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 日本語 中文

Can I use QuestyCaptcha and ReCaptcha together?

Utini (talkcontribs)

Hello everyone,

I just finished setting up ReCaptcha and noticed that it creates a Captcha on "Edit" and "Create" of pages as well as "New user registration".

I thought it would be a perfect addition to use QuestyCaptcha for "registration" instead of ReCaptcha

Can I activate both options in my LocalSettings.php or will this give me any problems?


wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/QuestyCaptcha' ]);

$wgCaptchaClass = 'ReCaptchaNoCaptcha';

$wgReCaptchaSiteKey = 'your public/site key here';

$wgReCaptchaSecretKey = 'your private key here';

$wgCaptchaQuestions = [

'What is the capital of France?' => 'Paris',

'What is the capital of Spain' => 'MADRID', // Answers are case insensitive

'What is the name of this wiki?' => $wgSitename, // You can use variables

'How many fingers does a hand have?' => [ 5, 'five' ], // A question may have many answers


$wgMainCacheType = CACHE_ANYTHING;

$wgCaptchaTriggers['createaccount'] = true;

$wgCaptchaTriggers['badlogin'] = true;

$wgCaptchaTriggers['login'] = true;

Reply to "Can I use QuestyCaptcha and ReCaptcha together?"

Show recent page changes on a page

Seehausen (talkcontribs)

I have a question: Is it possible to show the recent changes only for the current page and not for the subpages and how you do it?

I tried the feature Recent Changes but it shows all of the changes in the whole wiki and the related changes show just the changes of links on that page.

I just want to have a recent activity feed for changes that occur on the page the user is on and neither for the whole wiki nor for links or subpages. I would appreciate any help.

Best regards.

Gustave London (talkcontribs)

You add this page in the your watchlist.

Seehausen (talkcontribs)

No, i want in general to show a recent changes feed just of the current page in the upper part on the current page and not user-dependent.

Let´s say i want to include {{ Special:RecentChanges }} , but just showing the recent changes section of the page where i included it and not showing recent changes of the whole wiki.

Is that possible somehow?

Ciencia Al Poder (talkcontribs)

You want to show the page history, not recent changes.

There's no magic word to do that. I don't know if there's an extension to do that. With JavaScript, you can query the API:Revisions to get the info you want and insert it anywhere on the page. Of course, that needs coding skills.

Jonathan3 (talkcontribs)
Seehausen (talkcontribs)

Ok that´s good to know. I tried to test a query with the API-sandbox and the JSON output would be:


   "action": "query",

   "format": "json",

   "prop": "revisions",

   "titles": "Main Page",

   "rvprop": "timestamp|user|comment",

   "rvlimit": "5"


Where do i need to "code" that query/snippet and what would i need to write in the page content text box to refer to the code then and show the page history finally?

Please go slightly in detail.

Best regards and thank you!

Seehausen (talkcontribs)

@Jonathan3I installed the Extension:DynamicPageList (third-party) because according to the manual for my use case it offers some solutions.

But as i installed the extension i didn´t have editing permission on the pages anymore.. So i couldn´t put the any tags /content on the pages.

Does the extension automatically restrict access on the pages and i need to change user rights first?

AhmadF.Cheema (talkcontribs)

Regarding the extension, it probably isn't supposed to, so it might be a bug. First, make sure you have that extension version installed which corresponds to your MediaWiki version; second, make sure Extension:DynamicPageList (third-party) is the problematic extension, it's possible that some other extension is bugging out (a previous version of Extension:Lockdown is known to cause this).

Jonathan3 (talkcontribs)

I have never had that problem so unfortunately can't help you.

I just use the latest extension versions from git whenever I upgrade MediaWiki – but I never keep up to date with MediaWiki – so maybe you're having a problem because you have the current MediaWiki version.

Seehausen (talkcontribs)


I now used the latest extension version of DynamicPageList3 , updated the Wiki and inserted the following code according to the manual:

{{#dpl: title= MainPage

|addeditdate=true |ordermethod=lastedit |order=ascending

|count=10 }}

but it returns the following error:

"Error: no suitable entry found.", although the MainPage was edited recently.

(If i include the line "namespace= |MainPage" instead of "title= MainPage" it shows recently edited subpages, but we just want to display a smaller "history" of the current page (excluding changes of subpages))

Does anyone have an idea what the problem could be?

Best regards and thanks in advance.

Reply to "Show recent page changes on a page"
Summary by Paul Hema

Bawolff: cleanupEmptyCategories.php

Paul Hema (talkcontribs)
Bawolff (talkcontribs)

Newer versions (MW 1.28 and greater) of MW should automatically delete these.

Older versions you can't (short of actual DB manipulation)

Bawolff (talkcontribs)
Paul Hema (talkcontribs)

Nice. Thank you!

Buman (talkcontribs)

MediaWiki 1.33.1

PHP 7.3.11 (cgi-fcgi)

MariaDB 10.3.17-MariaDB-1:10.3.17+maria~bionic

Wiki URL:

Wiki Languate: Norwegian

Updating from 1.25.3 to 1.33.1 there have apparently been som encoding issuses, where pages having titles with non ASCII characters simply won't show. I've managed to locate pages being orphaned by this problem:

Searching for a solution I came to the conlusion that the running of rebuildall.php / refreshLinks.php was needed. Unfortunately I can't get refreshLinks.php to work

> php refreshLinks.php

Refreshing redirects table.
Starting from page_id 1 of 915.
Refreshing links tables.
Starting from page_id 1 of 915.
[ad957bb037931af4f1c02f5b] [no req]   Error from line 3676 of ../httpd.www/includes/page/WikiPage.php: Call to a member function refreshCountsIfEmpty() on bool
#0 ../httpd.www/includes/deferred/MWCallableUpdate.php(34): WikiPage->{closure}()
#1 ../httpd.www/includes/deferred/DeferredUpdates.php(274): MWCallableUpdate->doUpdate()
#2 ../httpd.www/includes/deferred/DeferredUpdates.php(231): DeferredUpdates::runUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactorySimple, string, integer)
#3 ../httpd.www/includes/deferred/DeferredUpdates.php(143): DeferredUpdates::execute(array, string, integer)
#4 ../httpd.www/includes/deferred/DeferredUpdates.php(313): DeferredUpdates::doUpdates(string)
#5 ../httpd.www/includes/deferred/DeferredUpdates.php(104): DeferredUpdates::tryOpportunisticExecute(string)
#6 ../httpd.www/includes/Storage/DerivedPageDataUpdater.php(1601): DeferredUpdates::addUpdate(LinksUpdate, integer)
#7 ../httpd.www/includes/page/WikiPage.php(2134): MediaWiki\Storage\DerivedPageDataUpdater->doSecondaryDataUpdates(array)
#8 ../httpd.www/maintenance/refreshLinks.php(275): WikiPage->doSecondaryDataUpdates(array)
#9 ../httpd.www/maintenance/refreshLinks.php(198): RefreshLinks::fixLinksFromArticle(integer, boolean)
#10 ../httpd.www/maintenance/refreshLinks.php(83): RefreshLinks->doRefreshLinks(integer, boolean, string, boolean, boolean)
#11 ../httpd.www/maintenance/doMaintenance.php(96): RefreshLinks->execute()
#12 ../httpd.www/maintenance/refreshLinks.php(491): require_once(string)
#13 {main}

Any ideas?

Osnard (talkcontribs)

You are right. This is probably some encoding issue. Can you give insight on what is set in your wikis configuration for $wgDBTableOptions and what is actually set in your database (e.g. run SHOW CREATE TABLE page;)?

You might also try to truncate the "secondary links" tables categorylinks, externallinks and pagelinks. Run php maintenance/rebuildall.php afterwards. Make sure you have a backup of your database.

Reply to "Error running refreshLinks.php"

Wiki farm - Images not displayed/requested

Omg nginx (talkcontribs)


We've moved a Wiki farm to a new server (copy-pasting the db content) and upgraded to 1.33.1. One thing we are struggling with are the images, they are not showing.

I checked the following things

- The database entries for the images exist - there are entries in the images, pages (and probably some more tables)

- The files exist on the fs

- Special:MediaStatistics shows a probable distribution of media files

- $wgShellLocale = "C.UTF-8"; (according to the troubleshooting page)

On the other side

- The page does not make a GET request to retrieve the image, in contrast to the previous installation

- Special:ListFiles does not show any files

- checkImages.php returns Good images: 0/0

Thanks for your help!

Bawolff (talkcontribs)
Omg nginx (talkcontribs)

Hi Bawolff

Thanks for your help!

In the meantime I compared a new insert with the existing entries in the images table. All the old entries have 0 as value in the img_description_id, i.e. they don't link to an existing comment. When I try adjust the img_description_id to another comment, I can see the image in the Special:ListFiles page - thus I would assume that is the problem.

Will the cleanupUsersWithNoId.php and migrateActors.php handle that as well? Is there another script doing this?

Sorry, I'm pretty new to MediaWiki - in case cleanupUsersWithNoId.php helps: What would be a reasonable choice for the --prefix parameter?


Bawolff (talkcontribs)

i think prefix can be pretty much anything. "Import>" i think is a common choice.

That will mostly fix if the img_actor field is messed up. If img_description_id is messed up, i guess retry running update.php. you can also try running migrateComments.php maybe with --force option

Reply to "Wiki farm - Images not displayed/requested"

{{msgnw::test}} read raw NS 0 page via Lua

Taylor 49 (talkcontribs)

My module is supposed to read raw wikitext of a page located in namespace 0.

Syntax "{{msgnw::test}}" works somewhat from wikitext. How can I do this from a module?

Function "expandTemplate" fulfills its name and expands a template or even a page in NS 0. How can I seize raw wikitext instead?

Bawolff (talkcontribs)

See the getContent method of Title.

For example: "test" ):getContent()

Taylor 49 (talkcontribs)

Thanks ... this looks promising ... I'll test.

Reply to "{{msgnw::test}} read raw NS 0 page via Lua" (talkcontribs)

i'm a newbie to mediawiki i have installed it on GCP through bitnami, can someone tell me how to integrate slack to mediawiki to get notification, i've followed this Extension:SlackNotifications documentation to install extension, i can see the extension is installed but i was unable to get notification on slack channel. this is my configuration


$wgSlackIncomingWebhookUrl = "Slack_hook_URL";

$wgSlackFromName = $wgSitename;

$wgWikiUrl = "WIKI_URL";

$wgWikiUrlEnding = "index.php?title=";

$wgSlackSendMethod = "curl";

$wgSlackRoomName = "#alerts";

$wgSlackIncludeNotificationsFrom = ["Spark"];

$wgSlackNotificationAddedArticle = true;

$wgSlackNotificationEditedArticle = true;

$wgSlackNotificationRemovedArticle = true;

Reply to "Slack integration"

$wgSMTP with G Suite - MediaWiki is a "Less Secure App"

FreshVegetarian (talkcontribs)

I'm setting up G Suite for sending notifications and password resets according to Manual:$wgSMTP, with some modification according to It seems that sending emails don't work unless I enable "Less Secure Apps" in Google. How can I make it so MediaWiki is not considered a "Less Secure App"? I'm using MW 1.33.1, PHP 7.2 fpm-fcgi, MySQL 5.7.27.

Bawolff (talkcontribs)
Reply to "$wgSMTP with G Suite - MediaWiki is a "Less Secure App""

Module:String additional functions upper, lower and ascii

2001:4DD6:A31E:0:25B1:AD14:6CCD:6C1D (talkcontribs)

It would be nice to have functions lower and upper. Eg requires for the players profiles a lowercase pagename. Currently this requires 26 nested calls to replace. Additionally it would be very helpfull to have a function ascii, which converts all special characters like á into the basic ascii form.

Bawolff (talkcontribs)

Is what you are looking for? mw.language.getContentLanguage():lc( "STRING To Lowercase" ) will do lowercase for all unicode, string.lower( "String" ) will do it for just ascii (and ignore non-ascii)

For converting to ascii. Its not perfect, but the best you can do is the following: string.gsub(mw.ustring.toNFKD( "STRING TO CONVERT TO ASCII HERE éà" ), "[\127-\255]", "" )

Reply to "Module:String additional functions upper, lower and ascii"
Squeak24 (talkcontribs)

Hi, I have recently discovered an issue on all my Wikis where I have two links next to each other pointing to the Help pages. I have only seen this so far happening on the category pages.

Is there anyway to get rid of one of these links?

Squeak24 (talk) 11:48, 18 November 2019 (UTC)

AhmadF.Cheema (talkcontribs)

Where exactly are these "two links" located on the category pages?

Also, what's your MediaWiki version?

Squeak24 (talkcontribs)

In the top right hand side of the page. If you go to the All skins page you will see it once.

Instead of it spearing once, I am seeing it twice. When I inspect the code, I am seeing the HTML twice. I have tried to look at the Vector template files but I can't find where it is called from.

The MediaWiki version is 1.31.

Any help is appreciated

Squeak24 (talk) 10:43, 19 November 2019 (UTC)

AhmadF.Cheema (talkcontribs)

First, try disabling all your extensions to make sure it isn't some old incompatible extension.

Bawolff (talkcontribs)

Can you link to your wiki?

Reply to "Helplink duplication"