Project:Support desk

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(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 version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. 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.
  4. To start a new thread, click the box with the text "Add topic".

Random page raises: InvalidArgumentException: Wikimedia\Rdbms\Platform\SQLPlatform::makeList: unexpected nested array

I have the latest version: 1.43.1

See all the details at: Sürüm - Nurpedia.org - İman ve İslam Hakikatlerine Dair Nur Ansiklopedisi

I got the following error when I try to pick a random page from the main page: Dahili hata - Nurpedia.org - İman ve İslam Hakikatlerine Dair Nur Ansiklopedisi

[683598d1451c472d2cb20af2] /wiki/%C3%96zel:Rastgele InvalidArgumentException: Wikimedia\Rdbms\Platform\SQLPlatform::makeList: unexpected nested array

Backtrace:

from /home/yonlenco/nurpedia.org/includes/libs/rdbms/platform/SQLPlatform.php(281)

#0 /home/yonlenco/nurpedia.org/includes/libs/rdbms/platform/SQLPlatform.php(273): Wikimedia\Rdbms\Platform\SQLPlatform->makeList()

#1 /home/yonlenco/nurpedia.org/includes/libs/rdbms/platform/SQLPlatform.php(724): Wikimedia\Rdbms\Platform\SQLPlatform->makeList()

#2 /home/yonlenco/nurpedia.org/includes/libs/rdbms/database/Database.php(3305): Wikimedia\Rdbms\Platform\SQLPlatform->selectSQLText()

#3 /home/yonlenco/nurpedia.org/includes/libs/rdbms/database/DatabaseMySQL.php(644): Wikimedia\Rdbms\Database->selectSQLText()

#4 /home/yonlenco/nurpedia.org/includes/libs/rdbms/database/Database.php(1337): Wikimedia\Rdbms\DatabaseMySQL->selectSQLText()

#5 /home/yonlenco/nurpedia.org/includes/libs/rdbms/database/Database.php(1354): Wikimedia\Rdbms\Database->select()

#6 /home/yonlenco/nurpedia.org/includes/libs/rdbms/database/DBConnRef.php(127): Wikimedia\Rdbms\Database->selectRow()

#7 /home/yonlenco/nurpedia.org/includes/libs/rdbms/database/DBConnRef.php(369): Wikimedia\Rdbms\DBConnRef->__call()

#8 /home/yonlenco/nurpedia.org/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(792): Wikimedia\Rdbms\DBConnRef->selectRow()

#9 /home/yonlenco/nurpedia.org/includes/specials/SpecialRandomPage.php(222): Wikimedia\Rdbms\SelectQueryBuilder->fetchRow()

#10 /home/yonlenco/nurpedia.org/includes/specials/SpecialRandomPage.php(169): MediaWiki\Specials\SpecialRandomPage->selectRandomPageFromDB()

#11 /home/yonlenco/nurpedia.org/includes/specials/SpecialRandomPage.php(80): MediaWiki\Specials\SpecialRandomPage->getRandomTitle()

#12 /home/yonlenco/nurpedia.org/includes/specialpage/SpecialPage.php(728): MediaWiki\Specials\SpecialRandomPage->execute()

#13 /home/yonlenco/nurpedia.org/includes/specialpage/SpecialPageFactory.php(1724): MediaWiki\SpecialPage\SpecialPage->run()

#14 /home/yonlenco/nurpedia.org/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#15 /home/yonlenco/nurpedia.org/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()

#16 /home/yonlenco/nurpedia.org/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()

#17 /home/yonlenco/nurpedia.org/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#18 {main}

Your kind help is really appreciated. Thanks. Alyabby (talk) 11:45, 9 June 2025 (UTC)

The problem is around here in the (SQLPlatform.php file) source code:
public function makeList( array $a, $mode = self::LIST_COMMA ) {
$first = true;
$list = '';
$keyWarning = null;
foreach ( $a as $field => $value ) {
.... (several statements here)
} elseif ( is_array( $value ) ) {
throw new InvalidArgumentException( __METHOD__ . ": unexpected nested array" );
what might have caused to this $value to be an array? Alyabby (talk) 16:47, 13 June 2025 (UTC)
I further tried to debug and I see that $mode is 0, and $value is:
Array (
[0] => 3000
[1] => 3002
)
here in the context. Alyabby (talk) 16:22, 14 June 2025 (UTC)
I commented out this and it works quite good:
} /* elseif ( is_array( $value ) ) {
throw new InvalidArgumentException( __METHOD__ . ": unexpected nested array" );
} */
I don't know yet if this has a side effect Alyabby (talk) 16:24, 14 June 2025 (UTC)

I get an error.

You can see the error at bmtbus.infinityfreeapp.com/bmtwiki/index.php?title=Template:Uw-vandalism3&veaction=edit. 23.162.200.138 06:09, 16 June 2025 (UTC)

Please see Manual:How to debug how to provide a stacktrace. Malyacko (talk) 06:49, 18 June 2025 (UTC)
The error is Exception caught: Could not open '/home/vol1_4/infinityfree.com/if0_39222541/tmp_elpkgk/mw-GlobalIdGenerator39222541-UUID-128'. 23.162.200.138 09:14, 20 June 2025 (UTC)

Current events in uzwikiquote

Hello. Please help me write a link to the 'Current Events' page in Uzbek Wikiquote to the home page. Umarxon III (talk) 07:11, 16 June 2025 (UTC).

See meta:Tech for Wikimedia wikis. Over there, please link to your current approach and elaborate what exactly you want to achieve. Maybe https://meta.wikimedia.org/wiki/Small_wiki_toolkits/Starter_kit/Main_page_customization might be useful, maybe not. Malyacko (talk) 06:48, 18 June 2025 (UTC)

Visual editor breaking category tags on 1.43.1

Just updated to 1.43.1 and when editing with the VisualEditor, category tags like "Category: Example" appear as "index.php?title=Category:Example" on the final page. I can edit the page again using source and fix the category tags, but it will break again if someone uses visual again. Any solutions to this? PHP version is 8.3.20. Berimas (talk) 16:01, 16 June 2025 (UTC)

I'm pretty sure that this indicates a misconfiguration... I've seen it before, I just don't remember what the cause of it is... —TheDJ (Not WMF) (talkcontribs) 14:27, 19 June 2025 (UTC)

How can I automate creation of BotPasswords?

I’m managing a MediaWiki instance and need to automate the generation of BotPasswords (from Special:BotPasswords).

Is there a way to achieve this programmatically (e.g., through an API request or another automation method)? Or is manual interaction the only available option?

If anyone has successfully implemented this, I’d appreciate any insights or guidance.

Thanks in advance for your help! 165.51.187.71 13:04, 18 June 2025 (UTC)

Solved, It could be achieved using Mediawiki maintenance script createBotPassword.php. 165.51.187.71 13:45, 18 June 2025 (UTC)

Error: Class "ResourceLoaderSkinModule" not found

Having upgraded Ubuntu from 24.10 to 25.04 my mediawiki stopped to work. I have tried to upgrade to mediawiki 1.43.1 but it still does not work. I get the following result

MediaWiki internal error ... Error: Class "ResourceLoaderSkinModule" not found

I can however not find any reference to the not found class.

How can I solve this problem?

The wiki is internal and can not be reached from outside my LAN. Tommy pollak (talk) 15:47, 18 June 2025 (UTC)

Someone had a similar problem in the past after upgrading to 1.42.3 because they didn't upgrade the extensions. Better double check that. Tactica (talk) 02:24, 19 June 2025 (UTC)
First - both includes and extensions are there.
Second - Question: Do you mean that the extensions must be processed? In that case how can I do that afterwords?
Third - Backtrace: First line is
from /var/www/html/mediawiki-1.43.1/includes/ResourceLoader/ResourceLoader.php(416) Tommy pollak (talk) 16:04, 21 June 2025 (UTC)
I mean the extensions have to match the version of MediaWiki you're using. Upgrading MediaWiki but leaving an odd extension untouched is a common mistake and an easy one to commit especially when the extension isn't bundled with MediaWiki and therefore it won't be updated automatically if you download and install the official package from this site. This may not be a problem when upgrading from 1.43.0 to 1.43.1, but it will if you're upgrading from 1.39 for instance. This includes skins, too.
From that single line backtrace I have no idea what's going on. Broadly speaking I wouldn't use a distro-based MediaWiki package because I've had bad experiences in the past myself, but YMMV. Tactica (talk) 17:34, 21 June 2025 (UTC)

run vs run.php

We don't seem to have a standard way to refer to run.php: it's often php run.php, but sometimes run or php run (note that I'm leaving out ./maintenance/ for clarity). Even the manual page, which is called run.php, then refers to just run, and there are a bunch of other places that do the same.

I've assumed we tell people to use php run.php because it's guaranteed to work on all systems, and then we leave it to people to find out for themselves that they can use run (if they're on a system with /usr/bin/env). But how many systems don't support that? It's certainly neater to not have to type the 'php's.

Anyway, I guess we should standardise the documentation to use php run.php. Sam Wilson 03:56, 19 June 2025 (UTC)

I suggested just that in the past and was told to use AWB since I don't have the required rights for a mass replace using ReplaceText (which isn't even installed here anyway), but never got around to it because it was too much hassle. Still today I presume there is plenty of documentation not even saying that running php foo.php directly is deprecated. Tactica (talk) 04:34, 19 June 2025 (UTC)
@Tactica: I guess I'll just update as I find things! But what do you think about run vs run.php? I sort of seems like it'd be nicer to recommend the former, but that's not a good idea is it? Sam Wilson 05:18, 19 June 2025 (UTC)
I'd suggest going for the foolproof run.php and leave as an exercise for the user to figure a simpler way :) Also, IIRC someone has already been updating the documentation in this respect and they used this approach too. Tactica (talk) 05:50, 19 June 2025 (UTC)
@Tactica: Good idea! Will do. Sam Wilson 06:18, 19 June 2025 (UTC)

open_basedir: restriction in effect...

I upgraded my MediaWiki from 1.39 to 1.43. After running .../mw-config/index.php the Wiki doesn't work correcty. As recommended I changed the name of the .htaccess-file in the /images directory. PHP is set to 8.1.32. But I always get a lot of error messages like this:

Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info-extensions-HitCounters.json) is not within the allowed path(s): (/srv/www/vhosts/tstebler.ch/subdomains/pollen/httpdocs/:/tmp/) in /srv/www/vhosts/tstebler.ch/subdomains/pollen/httpdocs/MediaWiki/includes/utils/GitInfo.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/tstebler.ch/subdomains/pollen/httpdocs/MediaWiki/includes/utils/GitInfo.php:163) in /srv/www/vhosts/tstebler.ch/subdomains/pollen/httpdocs/MediaWiki/includes/Request/WebResponse.php on line 80

Warning: is_readable(): open_basedir restriction in effect. File(/gitinfo/info-extensions-Cite.json) is not within the allowed path(s): (/srv/www/vhosts/tstebler.ch/subdomains/pollen/httpdocs/:/tmp/) in /srv/www/vhosts/tstebler.ch/subdomains/pollen/httpdocs/MediaWiki/includes/utils/GitInfo.php on line 163

I really do not know what I have to do. I have no SSH access to my Web. In the meantime I returned to my old Wiki version.

Could somebody help me? Thanks in advance.

P.S. I just noticed, that I am not able, to unblock the database with the special page "Unlock Database" (see thread below). Are the error messages because of the blocked database?

Thomas

TS (talk) 12:28, 19 June 2025 (UTC)

Your wgCacheDirectory seems to evaluate to empty string. The directory should be in the mediawiki directory and then ./cache by default and it is generally autodetected, but on platforms where temp directories are not well configured in the server's PHP, there can be an issue. I suspect that is the problem and you will either need to manually specify the cache directory in your LocalSettings.php or get the php config of the server corrected. —TheDJ (Not WMF) (talkcontribs) 14:35, 19 June 2025 (UTC)
Thank you for your comment. How can I specify the /cache in my LocalSettings.php? TS (talk) 14:50, 19 June 2025 (UTC)

Unlock database with Special:Unlockdb not possible anymore

For maintenance reason I blocked the database with Special:Lockdb. After finishing maintenance I activated the databse with Special:Unlockdb. After cklicking "Unblock" nothing happend. When I try to change something in my wiki, theres is always the message, that the database is still locked. How can I manually unlock the database? I have a webhosting without SSH access.

TS (talk) 13:29, 19 June 2025 (UTC)

The page essentially adds/removes a file named 'ReadOnly' to your installation. If the unlock doesn't work, I suspect that this permissions doesn't have the correct user permissions for PHP to delete it. —TheDJ (Not WMF) (talkcontribs) 14:38, 19 June 2025 (UTC)
Thank you for your answer. Where can I find this 'ReadOnly' file? I restored the complete MediaWiki from my backup of yesterday (no locked database) but I get always the message, that the database is locked.
Thomas TS (talk) 14:53, 19 June 2025 (UTC)
I found this message im my log-files:
[SQLBagOStuff] DBError: Database is read-only: Wechsel auf die neue Version 1.43 <p>(von Stebler am 19. Juni 2025 um 08:22 Uhr)</p> TS (talk) 15:13, 19 June 2025 (UTC)
@SteblerTh: For the read only file, see $wgReadOnlyFile. It may not be working from the special page because you might be using the database for caching. Sam Wilson 03:54, 22 June 2025 (UTC)

編集できないページが有るのですが?

編集したくても編集できない頁があるので、書き込みました

西園寺かいじ (talk) 00:19, 27 June 2025 (UTC)