Jump to content

Project:Support desk

Add topic
From mediawiki.org
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".

Creating custom skins

[edit]

Hello. I have a custom CSS (also JS but not entirely mine) for the Vector 2022 skin as I find it terrible at its default, but CSS restricts me to narrow customizations as I can't change the HTML structure, and I think changing the HTML structure with JS that much without causing big problems would be very hard as it will be done over an existing structure (even the CSS side causes many hard-to-solve problems for the same reason). Also, the updates the skin gets can break my customizations, very annoyingly. So, I want to create my own MW skins and use them in WMF wikis. How can I do that without too much difficulty? RuzDD (talk) 18:25, 10 February 2025 (UTC)Reply

@RuzDD Manual:How to make a MediaWiki skinTheDJ (Not WMF) (talkcontribs) 16:10, 11 February 2025 (UTC)Reply
Thanks, I will write here if I have problems. RuzDD (talk) 19:40, 11 February 2025 (UTC)Reply
@TheDJ The links I saw don't help, how can I install or enable intl? RuzDD (talk) 19:56, 11 February 2025 (UTC)Reply
@RuzDD Basic (web) development knowledge is required for those who want to develop skins, there is no 'easy' way to learn how to develop skins. Maybe ask AI to help you if you still need to learn. I'm not sure what prompted you to ask about intl, but most likely it refers to php intl, which are additional features for php itself, that you have to enable or install for you PHP install. —TheDJ (Not WMF) (talkcontribs) 09:09, 12 February 2025 (UTC)Reply
@TheDJ I got an error message saying I need to install or enable intl, but these pages don't tell how can I install or enable it in XAMPP's Apache. I already have basic web developement knowledge. Can you help me for installing or enabling php intl in XAMPP's Apache? RuzDD (talk) 10:51, 12 February 2025 (UTC)Reply
https://www.google.com/search?q=php+intl+in+XAMPP%27s+Apache&client=safari&sca_esv=0fc7dd398656b67a&source=hp&ei=0JGsZ_XIAZaI9u8Pxp-amQI&iflsig=ACkRmUkAAAAAZ6yf4ASJVi6QszO4AkILzyDjydPwh0QF&ved=0ahUKEwj18LGfj76LAxUWhP0HHcaPJiMQ4dUDCBE&oq=php+intl+in+XAMPP%27s+Apache&gs_lp=Egdnd3Mtd2l6IhpwaHAgaW50bCBpbiBYQU1QUCdzIEFwYWNoZTIHECEYoAEYCjIHECEYoAEYCkj2EFAAWABwAHgAkAEAmAFloAFlqgEDMC4xuAEMyAEA-AEC-AEBmAIBoAJrmAMAkgcDMC4xoAeuAw&sclient=gws-wizTheDJ (Not WMF) (talkcontribs) 12:20, 12 February 2025 (UTC)Reply
I uncommented ";extension=intl" (there was no ";extension=php_intl.dll") in php.ini and looks like it worked, thanks. I will write here if I have another problem. RuzDD (talk) 14:00, 12 February 2025 (UTC)Reply
I got this error:
Cannot access the database: :real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES).
Check the host, username and password and try again. If using "localhost" as the database host, try using "127.0.0.1" instead (or vice versa).
I tried both but they don't work. (I ran XAMPP as admin and both Apache and MySQL are running.) What can I do @TheDJ? RuzDD (talk) 14:12, 12 February 2025 (UTC)Reply
I solved this problem and completed the installation and I will write here again if I have a problem creating the skin. RuzDD (talk) 13:06, 13 February 2025 (UTC)Reply
@TheDJ The page you linked first tells three ways, but I don't know anything about the mustache templates or whatever gives the data. To clarify, with my current knowledge, I can make an HTML structure giving the look of the skin but can't make the skin show any data. Can you please help me about that? RuzDD (talk) 13:49, 13 February 2025 (UTC)Reply
@wargo Can you help me about that? RuzDD (talk) 18:08, 23 February 2025 (UTC)Reply
Note: A bot archived this topic disruptively and I undid it. RuzDD (talk) 14:22, 10 March 2025 (UTC)Reply
Not disruptive at all - the bot archives discussions that have been untouched for two weeks, so is working as designed. I think you've exhausted the knowledge and willingness to engage of the regulars here so leaving this discussion unarchived will be futile, but whatever. * Pppery * it has begun 16:15, 10 March 2025 (UTC)Reply
@Brooke Vibber Can you help me about that? RuzDD (talk) 16:10, 22 March 2025 (UTC)Reply

Location Map Error

[edit]

I'm having an issue while attempting to implement a location map on my wiki. (Currently running MediaWiki version 1.43.0 after being updated as the result of a previous help request.) Instead of properly displaying a box and floating the map right, it does neither of those things and instead displays the text "class=notpageimage|" below the image. (Screenshot) This error does not occur in the implementation on Wikipedia sandbox. Also, whether or not the PageImages extension is enabled in LocalSettings.php doesn't seem to make a difference. –Noha307 (talk) 05:10, 24 February 2025 (UTC)Reply

Try to export all templates related to the Location map and import to your wiki. It can help. Fokebox (talk) 09:33, 24 February 2025 (UTC)Reply
I tried updating both the Location map+ and Location map~ templates with the import/export function, but it unfortunately didn't help. I also tried inserting a regular image thumbnail from Wikimedia Commons, since I hadn't tested that yet and it worked fine. I also tried reducing the number of entries and amount of syntax in the template to the bare minimum, but that didn't help either. I did find one discussion that suggested running something called "initImageData.php" might help, but I am not familiar with what that is. –Noha307 (talk) 05:00, 3 March 2025 (UTC)Reply
I got exaclty same problem, also running MediaWiki version 1.43.0. I noticed that when i changed skin from Vector to Cologne Blue everything works correctly. Can't find really source of this problem. Screenshot SANtosito (talk) 12:11, 13 March 2025 (UTC)Reply
The only solution for now I found is to delete notpageimage| from Module:Location ma and add this to Mediawiki:Commons.css to recareate thumbails:
.tright {
  float: right;
}
.thumbinner {
  text-align: left;
  font-size: 90%;
  border: 1px solid #c8ccd1;
  padding: 3px;
  background-color: #f9f9f9;
}
Still think it's a problem with Vector Skin but can't find what's causing it SANtosito (talk) 11:27, 26 March 2025 (UTC)Reply

Mylittlewiki.org

[edit]

This part of wiki is an important place for collectors and neerds.

Problem is, the original author does not seem to exist any longer. She disappeared years ago.

There is only a few people over the world that can update now. And they're drowning in information that should be added.

Is it only the original author that can expand the group of administrators? Or is it possible to make some more people admin?

Please help. We're getting desperate.

Christine Tomtlund. Paintdelicious (talk) 15:54, 7 March 2025 (UTC)Reply

You need a "bureaucrat" account to create admin accounts, and it looks like the owner is the only one with this right on that site. If you absolutely must have more admins and the owner can't be reached, maybe you should consider using Special:Export to export the articles and a spider to download the 8.48 GB worth of images and then replicate the wiki under a new domain. Tactica (talk) 03:01, 8 March 2025 (UTC)Reply
heyyy unrelated, but my sis wants to like add a bunch of infos + a new page to the my little wiki!!
okay, so like I started using this MediaWiki thing today and I have like no idea how it works.
Anyways, I wanted to log in to My Little Wiki, since I got a media wiki account, but even though the password and username are correct, I keep getting the error "The supplied credentials could not be authenticated."
I have no idea how to script or anything uh, what do I do? Skwurpiederp (talk) 12:45, 21 March 2025 (UTC)Reply
@Skwurpiederp: Sorry, what I meant below was that you need to talk to the people in charge of MyLittleWiki.org, not people here on MediaWiki.org. There's a message on the main page there saying that you should contact User:Absol (there's an email address given). I'd recommend doing that. There's nothing we can do to help here. Sam Wilson 00:54, 22 March 2025 (UTC)Reply

Upgrading Mediawiki through export and import

[edit]

Dear all,

I want to upgrade my Mediawiki installation from 1.42.1 to the latest LTS 1.43.0.

I've read the upgrade documentation and it seems to me quite difficult and error prone.

Considering that:

  • my wiki is really small (20 pages more or less);
  • I only modified 4-5 lines in LocalSettings.php;
  • I only installed a couple of extension and I'm using the default skin;

I'm thinking of:

  • creating a new subdomain;
  • making a fresh installation of 1.43.0 on the new domain; with all extensions I'm using on 1.42.1;
  • merging the old LocalSettings.php (1.42.1) into the new LocalSettings.php (1.43.0);
  • copying the images directory;
  • export all pages an importing them in the new wiki (Special:Export + Special:import)

Do you think this could be easier than following the upgrade procedure?

Regards,

Massimiliano 94.32.36.29 00:25, 8 March 2025 (UTC)Reply

For a wiki with 20 articles and a couple of extensions, your plan sounds overkill. It would be far simpler to just overwrite your MW installation with 1.43.0 and updated versions of those extensions, backup the database just in case and then run maintenance/update.php to upgrade it. This presumes you have all the requirements to run MW 1.43. Tactica (talk) 02:37, 8 March 2025 (UTC)Reply
It's not meant to be a great idea to overwrite the files. But it would be nearly as easy to use a separate directory to download the 1.43 files and compatible versions of the two extensions, copy the images and LocalSettings.php across, and run update.php. Jonathan3 (talk) 23:28, 8 March 2025 (UTC)Reply
Thanks for your reply. What do you mean by "run maintenance/update.php"?
If I run now mysiteaddress/maintenance/update.php I get
Forbidden
You don't have permission to access this resource.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Is the "maintenance/update.php" something that's contained in the update package?
Regards,
Massimiliano 193.207.202.129 01:12, 16 March 2025 (UTC)Reply
See Manual:Update.php. You probably need sudo for it to work, even if the documentation here doesn't say so explicitly:
$ cd maintenance
$ sudo php run.php update.php
Jonathan3 is right BTW, it's safer to install 1.43 in a separate directory and work with that. Tactica (talk) 13:15, 17 March 2025 (UTC)Reply

Unable to import wiki dump using Special:Import or importDump.php

[edit]

Hi, I'm trying to fork my Fandom wiki, eventually to a custom domain, but for now only locally hosted. I'm having many issues importing the xml dump of my wiki to my new database. I'm in way over my head, I have no experience with mysql or php, just the frontend stuff.

Initially I tried using the maintenance scripts such as importDump.php as per the Manual:ImportDump.php article, but I keep getting this error in return:

PS D:\Wiki Files\htdocs\wiki\maintenance> php importDump.php --conf ../LocalSettings.php /destinycollect_pages_current.xml --username-prefix="w:c:destinycollect"

*******************************************************************************

NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead! Running scripts directly has been deprecated in MediaWiki 1.40. It may not work for some (or any) scripts in the future.

*******************************************************************************

PHP Warning: fopen(/destinycollect_pages_current.xml): Failed to open stream: No such file or directory in D:\Wiki Files\htdocs\wiki\maintenance\importDump.php on line 296 Warning: fopen(/destinycollect_pages_current.xml): Failed to open stream: No such file or directory in D:\Wiki Files\htdocs\wiki\maintenance\importDump.php on line 296 fopen(/destinycollect_pages_current.xml): Failed to open stream: No such file or directory

I'm not sure if I'm doing something wrong, or if the script just no longer works as the warning suggests. I see it's apparently having trouble finding my xml file, though I placed it in the maintenance folder for simplicity's sake, but like I said, I don't know if that's the actual problem or not. I also couldn't find anything explaining how to work run.php for this purpose.

Next I tried the Special:Import page of my wiki. I have had multiple different errors with this method, the following being the latest one:

[1b039779a0e57e43db782d99] /wiki/index.php?title=Special:Import&action=submit Wikimedia\Rdbms\DBTransactionStateError: Cannot execute query from LCStoreDB::get while transaction status is ERROR

Initially, I was running into issues with the maximum execution time, which was defaulted to 120 seconds in my php.ini file. I changed it to 3600 (really not sure how long it should take, my wiki is ~320 articles with various categories and templates), and after a couple errant issues like the attached one, I eventually ran into a problem with the memory limit being exceeded. I changed that from 512M to 1024M. Then I set it to run overnight, and this morning it had reached the time limit again, which I increased again to 24 hours. Now I'm running into the attached error each time.

The approach used in the Manual:Importing XML dumps article is appealing, but I honestly have little clue what I'm looking at here. It's clearly intended for those with more experience.

I tried to provide my LocalSettings.php and php.ini files for reference, as well as screencaps of my error messages, but external links are unallowed it seems. In any case, help would be greatly appreciated. As I said, I don't know what I'm doing! If anyone has any up to date learning resources as well, I'd be glad to be pointed in the right direction. Thanks! Ironybee523 (talk) 17:58, 8 March 2025 (UTC)Reply

@Ironybee523: It looks like one issue is that you're missing a leading dot in the filename: /destinycollect_pages_current.xml doesn't exist, but ./destinycollect_pages_current.xml presumably does? Sam Wilson 08:58, 9 March 2025 (UTC)Reply
Thank you for the reply. I'm not sure what the deal was, but the Special:Import page eventually worked when I wasn't looking. Well, it didn't say it worked, but when I checked the site, everything had loaded up. Ironybee523 (talk) 15:41, 14 March 2025 (UTC)Reply

Problem

[edit]

On the MediaWiki page, clicking on the "..." in the top right corner and clicking "(learn more) will take you to Help:Introduction, a nonexistent page. 73.31.42.97 01:00, 12 March 2025 (UTC)Reply

On what wiki are you seeing this? (You're posting on mediawiki.org, and you might've come here from a link in the sidebar of some other wiki; we're not part of that wiki.) Sam Wilson 01:24, 12 March 2025 (UTC)Reply
This is on MediaWiki. 73.31.42.97 21:10, 12 March 2025 (UTC)Reply
MediaWiki.org, or which website address? MediaWiki is a software which is ran on numerous machines out there. On MediaWiki.org, I do not see any "..." in the top right corner. A screenshot might be helpful. Malyacko (talk) 06:25, 13 March 2025 (UTC)Reply

identifying Author's Comments

[edit]

Hello everyone,

I'm new here and just set up the Comments Extension. I'm working on T155466 and looking to highlight author's comments on blogs while excluding comments on articles (if enabled).

I previously asked about this on mw:Extension talk:Comments, but there doesn't seem to be any activity there.

Could someone advise on:

  • Identifying the author's comments programmatically.
  • Differentiating between blog and article comments.

Any guidance would be appreciated. Thanks! Parv ch (talk) 12:12, 13 March 2025 (UTC)Reply

No revisions imported (all were either already present, or skipped due to errors).

[edit]
Product Version
MediaWiki 1.39.11
PHP 8.3.17 (fpm-fcgi)
MariaDB 10.6.21-MariaDB
ICU 67.1
Lua 5.1.5
Elasticsearch 7.10.2

The xml import file was exported from the same wiki a few days ago, with 5 pages, which had changed since then. However, these were not updated with the uploaded file versions giving the above notice. Spiros71 (talk) 15:14, 13 March 2025 (UTC)Reply

The error report is pretty much self-explanatory and matches the documentation. ImportDump is supposed to skip imports where the current content is more recent than the content being imported, and only populate the history if appropriate in this case. Tactica (talk) 20:17, 15 March 2025 (UTC)Reply

Is there way way to mass delete a list of bot users?

[edit]

Hey Everyone. My wiki has been slowly invaded by bots since last March. There are a little over 1000 bots. They haven't made any edits or created pages to my knowledge, but I do have a bunch of dead accounts that I'd like to get rid of. There were only supposed to be about 10 uses in my wiki at the point I noticed the bots. I tried the built-in mediawiki remove unused accounts script, RemoveUnusedAccounts.php, but it only returns three accounts, which is a lot less than the 1000 I need removed. User merge is another option to delete accounts, but doing that for each bot would be super time-consuming.

Is there any way to just input a list of accounts you want gone and have them blocked and/or removed?

I'm on Mediawiki 1.41. Thanks for any input in advance. 71.185.78.14 17:58, 13 March 2025 (UTC)Reply

One of the first things that came to my mind was the blockUsers.php maintenance script , which (IIUC) would allow you to provide a list of accounts to mass-block. However, that script doesn't currently support blocking accounts with the hideuser option enabled (which, while not deleting the accounts from the database, would result in MediaWiki pretending that they don't exist). (I've filed T388841 to request that this functionality is added to blockUsers.php.)
Someone else might have an idea about how to mass-delete/mass-hide the accounts in the current situation - apologies that I can't be more help myself! All the best, ‍—‍a smart kitten[meow] 07:25, 15 March 2025 (UTC)Reply
What about Manual:RemoveUnusedAccounts.php? Jonathan3 (talk) 23:40, 15 March 2025 (UTC)Reply
@Jonathan3 The OP mentions that they’d already tried that maintenance script, unfortunately. Best, ‍—‍a smart kitten[meow] 08:37, 16 March 2025 (UTC)Reply
Oops :-) Jonathan3 (talk) 23:34, 16 March 2025 (UTC)Reply

MySql shut down unexpectedly

[edit]

I had been using MediaWiki with XAMPP for a few days without issues, but now MySQL suddenly won't start. It stops with the following error message:

21:25:39 [mysql] Error: MySQL shutdown unexpectedly.  

21:25:39 [mysql] This may be due to a blocked port, missing dependencies,  

21:25:39 [mysql] improper privileges, a crash, or a shutdown by another method.  

21:25:39 [mysql] Press the Logs button to view error logs and check  

21:25:39 [mysql] the Windows Event Viewer for more clues.  

21:25:39 [mysql] If you need more help, copy and post this  

21:25:39 [mysql] entire log window on the forums.  

I've checked the basics, but I'm unsure how to resolve this. Any guidance would be appreciated! Parv ch (talk) 16:21, 14 March 2025 (UTC)Reply

I would try a forum that focuses on support for mysql/mariadb —TheDJ (Not WMF) (talkcontribs) 10:29, 15 March 2025 (UTC)Reply
i reinstalled xampp and mediawiki not facing this issue anymore but now I'm facing an issue with the Comments extension on my MediaWiki setup. After reinstalling XAMPP, the Comments extension stopped working, showing
[10c8bd3be1b4b96233873a77] 2025-03-15 13:08:16: Fatal exception of type "Error"
Other extensions like Quiz are functioning correctly. Parv ch (talk) 13:08, 15 March 2025 (UTC)Reply
See Manual:How to debug how to provide a stacktrace. Please also read "Post a new question" at the top of this page. Malyacko (talk) 18:26, 15 March 2025 (UTC)Reply

FileImporter configuration question

[edit]

My question, see Help talk:Extension:FileImporter#File with en:Template:CC BY 4.0 not acknowledged as importable. ZandDev (talk) 17:17, 14 March 2025 (UTC)Reply

option not to display the group name in <ref> tag ?

[edit]

is it possible to reduce the scope of the <references/> tag to a section only, without using the printed group name before the index which overloads the contents where the <ref> tag are used ? That means that the [1][2][3]...would concern the section (paragraph). The 'group=' principle is still used but group name is not displayed in this case. This is useful when references are used in an array of contents and the URLs are displayed just below. Thanks. -- Christian 🇫🇷 FR 🚨 (talk) 07:44, 15 March 2025 (UTC)Reply

That's an enhancement request for Extension:Cite, not something related to MediaWiki itself. Tactica (talk) 13:12, 15 March 2025 (UTC)Reply
I didn't follow your question completely so might have missed the point... but I have a feeling that if you transclude a page, and that page has a "references" tag, it only shows references relating to the transcluded page. You could do that for each of your sections. Jonathan3 (talk) 22:30, 15 March 2025 (UTC)Reply
My understanding is that he simply wants e.g. <ref group="Blah" name="myref"/> to display [1] rather than [Blah 1] in an article, hence my comment. Tactica (talk) 23:24, 15 March 2025 (UTC)Reply
Thanks. My suggestion above would still work for that, in an unwieldly way! But it looks like it's not an enhancement request: it's all described at Help:Cite#Grouped_references. If you create the page "MediaWiki:Cite_link_label_group-Blah" with "1 2 3 4" etc then the word "Blah" won't be displayed. Jonathan3 (talk) 23:38, 15 March 2025 (UTC)Reply
Yup, you're right. I never used customization so I didn't even think it could be done this way, oops! Tactica (talk) 12:51, 17 March 2025 (UTC)Reply
There is NO question of transclusion here. The array is already in the page, in any paragraph under a title == and I would like it light and with the references just after for immediate reading. so @Tactica yes you are right it is what would be nice. Thanks. may be i m more clear now. --Christian 🇫🇷 FR 🚨 (talk) 08:53, 18 March 2025 (UTC)Reply
Read on. I think your question might subsequently have been answered. Jonathan3 (talk) 13:05, 18 March 2025 (UTC)Reply

blending transclusion with numbering

[edit]

I am using version 1.36.1, and I am trying to figure out if there is a way to transclude text without breaking numbering. I have found a lot of information about numbering and bullets and indents, and also much about transcluding, but nothing about how—or if it's even possible—to transclude a block of text within a formatted list. Thanks for any guidance.True Pagan Warrior (talk) 14:57, 17 March 2025 (UTC)Reply

Give us an example of what you've tried. There's some useful information here: Help:Lists. I think that anything that can be done on the page can be done with transclusion. Jonathan3 (talk) 00:45, 20 March 2025 (UTC)Reply

Setting a default tabber

[edit]

Dear ∀,

In our wiki we employ extension:tabberNeue to present different versions of elements of an XML schema.

Some elements have been deprecated in the newest version, so we would prefer to set the last existing version as the default view. E.g. on https://wiki3.railml.org/wiki/IS:infrastructureState we would like to set #3.2-0 as the default view.

Is there a way to achieve this?

Thank you in advance.

yours, Ciciban (talk) 15:57, 17 March 2025 (UTC)Reply

Issue: CirrusSearch and Elasticsearch Configuration - "Couldn't Resolve Host" Error After Days of Debugging

[edit]

System Information

[edit]
  • MediaWiki Version: 1.43
  • Elasticsearch Version: 8.17.3
  • CirrusSearch Version: Latest (as of March 2025)
  • Elastica Version: 8.0.0
  • Server Environment: Windows 11 + XAMPP
  • PHP Version: (your PHP version)
  • Database Type & Version: (MySQL, MariaDB, etc.)

Problem Description

[edit]

We have been trying to configure CirrusSearch with Elasticsearch 8.17.3, but every attempt to run indexing commands fails with the same error: Ricklach (talk) 21:30, 17 March 2025 (UTC)Reply

Trying to create my own wiki in MediaWiki, but there is an error

[edit]

Hello!

I installed MediaWiki and configured the wiki, but I encountered the following problem after the installation was complete.

[c41c5a9a9395a239c7007829] /jayandrewboy-mediawiki/mw-config/index.php?page=Install Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?

Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.

Error 1044: Access denied for user 'jayandrewboy-mediawiki'@'localhost' to database 'main_wiki'

Function: MediaWiki\Installer\MysqlInstaller::setupDatabase

Query: CREATE DATABASE `Main_Wiki`CHARACTER SET utf8

Backtrace:

from E:\xampp\htdocs\jayandrewboy-mediawiki\includes\libs\rdbms\database\Database.php(1198)

#0 E:\xampp\htdocs\jayandrewboy-mediawiki\includes\libs\rdbms\database\Database.php(1182): Wikimedia\Rdbms\Database->getQueryException(string, int, string, string)

#1 E:\xampp\htdocs\jayandrewboy-mediawiki\includes\libs\rdbms\database\Database.php(1156): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, int, string, string)

#2 E:\xampp\htdocs\jayandrewboy-mediawiki\includes\libs\rdbms\database\Database.php(647): Wikimedia\Rdbms\Database->reportQueryError(string, int, string, string, bool)

#3 E:\xampp\htdocs\jayandrewboy-mediawiki\includes\installer\MysqlInstaller.php(337): Wikimedia\Rdbms\Database->query(Wikimedia\Rdbms\Query, string)

#4 [internal function]: MediaWiki\Installer\MysqlInstaller->setupDatabase(MediaWiki\Installer\MysqlInstaller)

#5 E:\xampp\htdocs\jayandrewboy-mediawiki\includes\installer\Installer.php(1744): call_user_func(array, MediaWiki\Installer\MysqlInstaller)

#6 E:\xampp\htdocs\jayandrewboy-mediawiki\includes\installer\WebInstallerInstall.php(47): MediaWiki\Installer\Installer->performInstallation(array, array)

#7 E:\xampp\htdocs\jayandrewboy-mediawiki\includes\installer\WebInstaller.php(257): MediaWiki\Installer\WebInstallerInstall->execute()

#8 E:\xampp\htdocs\jayandrewboy-mediawiki\mw-config\index.php(93): MediaWiki\Installer\WebInstaller->execute(array)

#9 E:\xampp\htdocs\jayandrewboy-mediawiki\mw-config\index.php(43): wfInstallerMain()

#10 {main}

I'm not sure how to solve this issue, let me know in the comments.

P.S. You can ignore that my name was inscribed. JayAndrewBoy (talk) 09:25, 18 March 2025 (UTC)Reply

There's some stuff at Manual:Installing_MediaWiki#Set_up_the_database that might help. Jonathan3 (talk) 13:08, 18 March 2025 (UTC)Reply
It didn't work at all. I feel my mind is blank. :'( JayAndrewBoy (talk) 14:13, 18 March 2025 (UTC)Reply
Well, the error message says you need to grant permissions for a given user in your database:
Error 1044: Access denied for user 'jayandrewboy-mediawiki'@'localhost' to database 'main_wiki'
See https://dev.mysql.com/doc/refman/8.4/en/grant.html Osnard (talk) 14:19, 18 March 2025 (UTC)Reply

Search suggestions not working

[edit]

Hello, On our wiki if you type in the search field you don't get search suggestions. This worked before but no longer for a while now. Can someone help me troubleshoot this? Where do I start trying to find out the cause? Thanks PKFP (talk) 10:09, 18 March 2025 (UTC)Reply

Hi, please see "Post a new question" above, and also check the web browser's developer tools' console when this happens. Malyacko (talk) 14:50, 18 March 2025 (UTC)Reply
Hey,
Sorry for the missing info. Our tech team fixed it by now. It was an error in the ngnx settings and in the rest.php file.
So this topic can be closed. Thanks. PKFP (talk) 16:33, 19 March 2025 (UTC)Reply

too many files

[edit]

I am running a wiki for 9 years now, but recently have the problem that my hoster tells me that I have reached a limitation of file numbers (it says 260,000, but actually it is 262,144). The wiki has about 48,000 uploaded files (mainly images), but of course there are all the thumbnails, some archived and some deleted files.

What is the safest and easiest way to get rid of (somewhat) unnecessary files? And how much would that help in the medium to long term? Kommunalflaggen.eu (talk) 23:44, 18 March 2025 (UTC)Reply

and I should perhaps add, that it took me some time to find out that this limitation created my login, edit and file upload problems.
Not consistently, but intermittedly I had got the following error messages:
Manual:Common_errors_and_symptoms#Login_page_warns_about_cookies_disabled
Manual:Common_errors_and_symptoms#Error:_Could_not_open_lock_file_for_"mwstore://local-backend/local-public/./../image.png
These error messages were not helpful! Kommunalflaggen.eu (talk) 23:52, 18 March 2025 (UTC)Reply
I'm fairly certain you can just delete all the thumbnails. Unless you change settings, they'll eventually regenerate themselves. It might reduce your file number by quite a lot, as (for example) maybe you've got a thumbnail for every page of thousands of PDF documents. Jonathan3 (talk) 00:36, 20 March 2025 (UTC)Reply
Yeah deleting thumbnails could save a bit, as well as reducing the number of sizes in $wgImageLimits maybe? Although I must say, I'd be more inclined to move to a better host! Sam Wilson 05:20, 21 March 2025 (UTC)Reply

How to add custom font in Commons.css?

[edit]

Hello!

I recently installed MediaWiki and it works just perfect. 👍👌

I'm in the process of customizing the wiki and would like to add any custom font to Common.css. Although I tried, it didn't seem to work. I've sought help from ChatGPT, but I'm still not sure what I'm doing wrong.

Here's the code I put in Common.css:

@font-face {

    font-family: 'MyCustomFont';

    src: url('/path/to/mycustomfont.woff2') format('woff2'),

         url('/path/to/mycustomfont.woff') format('woff');

    font-weight: normal;

    font-style: normal;

}

body {

    font-family: 'MyCustomFont', sans-serif;

}

Please leave any comments on how I can improve this. JayAndrewBoy (talk) 10:05, 19 March 2025 (UTC)Reply

Something like @import url( 'https://fonts.googleapis.com/css?family=...' ); should work. Then you can use the ... part in "font-family".
Also, I'm not sure but think you might need to list other elements as well as "body" to get everything to work, e.g. h1, h2, h3, button etc. Jonathan3 (talk) 00:33, 20 March 2025 (UTC)Reply
But I probably did it or tested it like this.
@font-face {
    font-family: 'Murs Gothic Key';
    src: url('MursGothic-KeyBold.woff2') format('woff2'),
        url('MursGothic-KeyBold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
} JayAndrewBoy (talk) 06:44, 20 March 2025 (UTC)Reply
If you only probably tested that way then try it and see :-) Maybe experiment with the path to the files. Jonathan3 (talk) 10:11, 20 March 2025 (UTC)Reply
Could you please send me some sample code on how to add custom fonts like in Fandom? 🙂🙏 JayAndrewBoy (talk) 14:24, 20 March 2025 (UTC)Reply
I don't know anything about Fandom. You can use @import. Read something like https://stackoverflow.com/questions/14676613/how-to-import-google-web-font-in-css-file Jonathan3 (talk) 11:28, 26 March 2025 (UTC)Reply

Error in BootstrapHelperFunctions.php prevents upgrade to MW 1.43

[edit]

Hello,

I've just completed preparing a new copy of MediaWiki 1.43 (i.e. downloaded the release, copied over images/LocalSettings/skins from the old folder) and when I ran (in terminal) php maintenance/run.php update I got the following error message:

Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /tmp/newwiki/includes/BootstrapHelperFunctions.php on line 30

Any idea what I should do, please? Bozla (talk) 12:34, 19 March 2025 (UTC)Reply

@Bozla Out of interest, do you know what version of PHP you're running? (You should be able to find this out from the terminal by running php -v) Best, ‍—‍a smart kitten[meow] 09:15, 20 March 2025 (UTC)Reply

How do I remove a user group?

[edit]

Not from a user, but how do I remove it's existence? A extension, Commentbox, created a group called "comment-admin". I removed the extension but how do I remove the group? 66.99.20.66 14:36, 19 March 2025 (UTC)Reply

I'm not 100% sure if it'll help in your case, but have a look at Manual:User rights and check your LocalSettings.php for "comment-admin". Jonathan3 (talk) 00:22, 20 March 2025 (UTC)Reply
I am on a hosting service. I don't have access to localsettings.php. That's why I made this 66.99.20.66 13:23, 20 March 2025 (UTC)Reply
Change your hosting service :-) Jonathan3 (talk) 18:37, 20 March 2025 (UTC)Reply
How did you remove the extension if you don't have access to LocalSettings.php? Sam Wilson 04:15, 21 March 2025 (UTC)Reply
The hosting service has an extension called "ManageWiki" with allows me to edit LocalSettings.php with a GUI interface. I just cannot remove user groups. That is not included in the GUI. 66.99.20.66 13:28, 21 March 2025 (UTC)Reply
In that case, my (personal) instinct would be that you may need to ask your hosting service if there’s anything they can do to remove the group. Best, ‍—‍a smart kitten[meow] 17:33, 21 March 2025 (UTC)Reply
I take it back: Extension:ManageWiki is a Miraheze thing and they are meant to be good. The suggestion above of asking them for help sounds best. Jonathan3 (talk) 11:33, 26 March 2025 (UTC)Reply

foreach error from MimeAnalyzer

[edit]

The error log on my wiki's server has lately been filled with constant repetitions of this PHP error, always citing MimeAnalyzer:

PHP Warning: foreach() argument must be of type array|object, string given in /var/www/my.wiki/public_html/mediawiki-1.43/includes/libs/mime/MimeAnalyzer.php on line 129, referer: https://my.wiki/Some_article

I see the line it references in MimeAnalyzer.php is in this block:

foreach ( $this->mimeToExts as $mime => $exts ) {
    foreach ( $exts as $ext ) {
        $this->extToMimes[$ext][] = $mime;
    }
}

I'm not sure how to diagnose this, so I was curious if anyone might know the cause. Any insights are much appreciated!

System details:

Product Version
MediaWiki 1.43.0
PHP 8.3.19 (apache2handler)
ICU 66.1
MySQL 8.0.33
Pygments 2.17.2
Lua 5.1.5

Huwmanbeing (talk) 18:50, 19 March 2025 (UTC)Reply

How about making MediaWiki run offline like XOWA but newer and with a visual editor

[edit]

I've been using XOWA to make my own wikis but the MediaWiki version is outdated. How about if those that want to have a wiki but cant afford and host their wiki wanted to have a wiki application like XOWA but it was made by the Wikimedia Foundation? Wikipedian2025 (talk) 12:04, 20 March 2025 (UTC)Reply

This is a support forum for MW and your "problem" isn't related to MW, so you'd be better off requesting the company or development team behind that app to update MW and that's it. Tactica (talk) 13:56, 20 March 2025 (UTC)Reply
oh okay, i already figured out how to use XOWA Wikipedian2025 (talk) 09:19, 21 March 2025 (UTC)Reply

Need to reduce SQL DB Size

[edit]

My hosting company (SiteGround) has a max db size of 1000 MB and I'm 4MB from hitting it. I have MediaWiki 1.42.3, php 8, MySQL 8.0.39-30. I contacted their support team and they tried several things to reduce the db size, but they were only able to reduce by about 30MB. They even ran the DeleteOldRevisions.php script and compressOld.php, but this didn't do much. I thought for sure this would make a huge difference. FYI, I don't know anything about MySQL. I do have access to the database through SiteGround's interface. I'd appreciate any suggestions. Scott216 (talk) 12:20, 20 March 2025 (UTC)Reply

Manual:Reduce size of the database --Malyacko (talk) 16:53, 20 March 2025 (UTC)Reply
It is possible that your database is also used as the caching layer for either interface message caching or for the object cache. Switching those caches to another layer might help reduce the size as well. —TheDJ (Not WMF) (talkcontribs) 21:13, 25 March 2025 (UTC)Reply

edit api with oauth javascript (not nodejs) (not mediawiki js) example

[edit]

Hello, https://www.mediawiki.org/wiki/API:Edit#JavaScript actually is nodejs. Could you please share with me an example, that allows to auth using OAuth and create a page with content I have in my variable in JavaScript, for client-side in-browser JavaScript without involving nodejs? Gryllida 03:06, 21 March 2025 (UTC)Reply

And is pkce supported instead of oauth? Thanks. Gryllida 03:06, 21 March 2025 (UTC)Reply
https://github.com/panva/oauth4webapi is this related? Thanks Gryllida 03:39, 21 March 2025 (UTC)Reply
CC this query, Gryllida 04:27, 21 March 2025 (UTC)Reply

My Little Wiki login

[edit]

okay, so like I started using this MediaWiki thing today and I have like no idea how it works.

Anyways, I wanted to log in to My Little Wiki, since I got a media wiki account, but even though the password and username are correct, I keep getting the error "The supplied credentials could not be authenticated."

I have no idea how to script or anything uh, what do I do? Skwurpiederp (talk) 12:05, 21 March 2025 (UTC)Reply

@Skwurpiederp: Is this related to the #Mylittlewiki.org thread above? You're posting here on mediawiki.org, which is the site for the software. You should probably be asking someone on your wiki. Note that your username here is unrelated to your username there, and you (hopefully) have a different password. Sam Wilson 12:31, 21 March 2025 (UTC)Reply
ohhh ok, I'm so sorry!!! Skwurpiederp (talk) 12:39, 21 March 2025 (UTC)Reply

I don't know how to change the font of the second heading and the others.

[edit]

When I tried to change the font for the second heading and other headings, the font did not change.

.mw-heading2, h2 {

  font-family: "Roboto Flex", sans-serif;

  font-optical-sizing: auto;

  font-weight: 700;

  font-style: normal;

  font-variation-settings:

    "WGHT" 700

    "SLNT" 0,

    "WDTH" 100,

    "GRAD" 0,

    "XOPQ" 96,

    "XTRA" 468,

    "YOPQ" 79,

    "YTAS" 750,

    "YTDE" -203,

    "YTFI" 738,

    "YTLC" 514,

    "YTUC" 712;

} JayAndrewBoy (talk) 13:16, 22 March 2025 (UTC)Reply

Probably your css selector is not specific enough and thus doesnt have a high enough priority. Google ‘css specificity’. —TheDJ (Not WMF) (talkcontribs) 21:08, 25 March 2025 (UTC)Reply
Maybe it depends on what you mean by second heading. The page title is h1, the ==Heading== is h2 and the ===Heading=== is h3, as far as I remember anyway! Jonathan3 (talk) 12:06, 26 March 2025 (UTC)Reply
I give up. Editing on a wiki with Common.css is hard and challenging, and in Fandom is easy and simple to use. ☹️😞 JayAndrewBoy (talk) 12:50, 27 March 2025 (UTC)Reply

What does notitleconvert actually do, in it's code?

[edit]

I'm guessing I need to have this in order to finally complete the Belarusian converter.
It originally had provisions for making sure that NS_FILE, NS_USER and NS_USER_TALK:

			$title = RequestContext::getMain()->getTitle();
			if ( $title?->getNamespace() === NS_FILE ) {
				$imagename = $title->getNsText();
				if ( str_starts_with( $text, "$imagename:" ) ) {
					return $text;
				}
			}
		if ( is_object( $nt ) ) {
			$ns = $nt->getNamespace();
			if ( $ns === NS_USER || $ns === NS_USER_TALK ) {
				return;
			}
		}

so I don't want to just get rid of them, even though they're broken and nobody else does this.
However, no matter what I did, nothing worked to fix it. I suspect that I might be able to fix it by getting the code of notitleconvert and using it to make it so that this works once more.
But I can't find the code anywhere. Maybe I'm just not looking hard enough, but I somewhat doubt that. I must get the code, and I have a feeling someone here may know where it is; or even have it themselves.
So please, place the code (or if I actually *was* not looking hard enough, the location of it) over here. (Sorry if I look selfish doing this)

Thanks, Kxeon (talk) 00:16, 24 March 2025 (UTC)Reply

I was right

: if ( !$options->getDisableTitleConversion() : && !isset( $this->mDoubleUnderscores['nocontentconvert'] ) : && !isset( $this->mDoubleUnderscores['notitleconvert'] ) : && $this->mOutput->getDisplayTitle() === false : ) { : $titleText = $this->getTargetLanguageConverter()->getConvRuleTitle(); : if ( $titleText !== false ) { : $titleText = Sanitizer::removeSomeTags( $titleText ); : } else { : [ $nsText, $nsSeparator, $mainText ] = $this->getTargetLanguageConverter()->convertSplitTitle( $page ); : // In the future, those three pieces could be stored separately rather than joined into $titleText, : // and OutputPage would format them and join them together, to resolve T314399. : $titleText = self::formatPageTitle( $nsText, $nsSeparator, $mainText ); : } : $this->mOutput->setTitleText( $titleText ); : } :

includes/parser/Parser.php Kxeon (talk) 20:45, 25 March 2025 (UTC)Reply

#GoogleLogin unable to access with automatic account creation. Bringing back to login every time without access

[edit]

Hi,

I'm trying to set-up google login on a private wiki

I think I've done all correctly, but when I login I only get back to login page, without any privilege granted.

If I disable google login I did not see any new users

I get NO error or exception


I don't know how to look to have a clue, anyone have suggestions? :)


Thanks a lot


(here the configuration)


wfLoadExtension( 'GoogleLogin' );

$wgGLAppId = '<the right appID>';

$wgGLSecret = '<the right secret>';

$wgGLAllowedDomains = [ 'company.it'];

$wgWhitelistRead = [ 'Speciale:Entra' ];

$wgWhitelistRead = [ 'Speciale:GoogleLoginReturn' ];

$wgWhitelistRead = [ 'Speciale:GoogleLoginAllowedDomains' ];

$wgGLAuthoritativeMode = true;

$wgInvalidUsernameCharacters = ':~';

$wgUserrightsInterwikiDelimiter = '~';

$wgGroupPermissions['*']['autocreateaccount'] = true;

$wgGLAllowedDomainsDB = true;

$wgGroupPermissions['sysop']['managegooglelogindomains'] = true;

$wgGLAllowedDomainsStrict = true;

$wgAuthManagerConfig = [

    'primaryauth' => [

        GoogleLogin\Auth\GooglePrimaryAuthenticationProvider::class => [

            'class' => GoogleLogin\Auth\GooglePrimaryAuthenticationProvider::class,

            'sort' => 0

        ]

    ],

    'preauth' => [],

    'secondaryauth' => []

]; TolimMcLugen (talk) 12:28, 24 March 2025 (UTC)Reply

제 위키 반달이 심한데 아이피 조회가능할까요?

[edit]

There is a lot of document damage on my wiki, can you look up IP for people who damaged it? 218.235.215.33 14:42, 24 March 2025 (UTC)Reply

No as we cannot break into your server. Only you can. Malyacko (talk) 17:18, 24 March 2025 (UTC)Reply
@Malyacko: I don't know if they were asking us to do it, but rather using the indefinite personal pronoun.
To the OP: if you're getting lots of vandalism, you might want to look at extensions such as Extension:ConfirmEdit . Sam Wilson 05:32, 26 March 2025 (UTC)Reply

Error 500 while Uploading a Image in Text Editor

[edit]

Hello,

i can't include a web adress because our Company wiki is only internal.


When we try to upload a Image to a (new) Site, we get the Error: HTTP 500. In german: Der Server hat einen Fehler zurückgegeben: HTTP 500

BUT

When we Upload a Image via the standard Upload page it works just fine.

The images directory has the permissions 755, so just like the FAQ said. File/Image Uplaod is enabled in php.ini and Localsettings.php

I also tried the "$wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 );" and there was no Error Number anymore. Just a "The server returned an invalid response".

Schulzii (talk) 14:14, 25 March 2025 (UTC)Reply

There can be many reasons. Have you checked the server is actually receiving the request ? Perhaps a company application firewall is in the way —TheDJ (Not WMF) (talkcontribs) 21:01, 25 March 2025 (UTC)Reply
i don't think that the firewall is the problem. Like i said, uploading via the standard Upload Page works fine. Why would the firewall let this Upload happen, but not the one in the Editor? I mean you could be right, i'm just a trainee and don't know anything perfectly^^ Schulzii (talk) 06:54, 26 March 2025 (UTC)Reply
I forgot to mention, that the last changes made on the wiki, you could normally see are not visible.
It's just empty. Maybe it's the database? If yes, what could i do to find the problem there? Schulzii (talk) 08:43, 26 March 2025 (UTC)Reply
[edit]

MediaWiki 1.39

I added own custom Namespace "Model". Now when I add link to page Model:Page I need to print "Model:" before. There is way to search in all content namespaces by default? Dimka665 (talk) 14:18, 25 March 2025 (UTC)Reply

Take a look at Manual:$wgNamespacesToBeSearchedDefault. Tactica (talk) 19:27, 25 March 2025 (UTC)Reply

Extension:EasyTimeline font configuration - $wgTimelineFontFile - suitable font for latin languages

[edit]

I use Extension:EasyTimeline without issues except when displaying links with utf8 values. Instead of correct letters, garbage is shown. For example, François-André Danican Philidor is shown as FranǍ§ois-AndrǍŠ Danican Philidor. Obviously it is a font issue.

For comparison, the en.wikipedia template w:Template:Timeline_Classical_Composers_Classical shows the names correctly, the same timeline from the template when saved on the wiki displays the above problem. An alternate font can be specified via $wgTimelineFontFile, but no experiments with the fonts brought successful solution (neither gnu-free-fonts nor ttf-dejavu). Does anyone know wikipedia font setting for timeline extension that would solve the above issue? Thanks. Pspviwki (talk) 09:57, 27 March 2025 (UTC)Reply