Jump to content

Project:Support desk/Archive 22

From mediawiki.org

Detect use of __NOTOC__ with JavaScript

Is there a way to check if __NOTOC__ is used on a given page via JavaScript? Something akin to mw.config.get() that would tell you if the page uses the magic word. Checking if there's a TOC in the DOM won't work, because a page could have less than four sections and then a TOC wouldn't be generated in most skins. Mr. Starfleet Command (talk) 16:44, 16 February 2025 (UTC)

Tree and Menu not showing up

Hello all. I am using media wiki 1.43. I have installed the extension treeandmenu. It does show up on the version page. When I go to mediawiki:sidebar I do see the menu. The menu does work on that page. The problem I have is not showing up on left side for navigation.

Any help would be great.

https://dragonmoonac.com/index.php/Main_Page Extremeshannon (talk) 04:51, 14 February 2025 (UTC)

Is there any support or help for tree and menu? I feel like this is a dead extension that is broken. Extremeshannon (talk) 06:47, 15 February 2025 (UTC)
Does the patch mentioned here help? Extension_talk:TreeAndMenu#TreeAndMenu_no_longer_works_with_MediaWiki_1.42 (https://github.com/debtcompliance/TreeAndMenu/pull/1) Jonathan3 (talk) 22:12, 16 February 2025 (UTC)
The patch help me getting it to show up on the mediawiki:sidebar page but still not showing up in navigation
https://dragonmoonac.com/index.php/MediaWiki:Sidebar Extremeshannon (talk) 08:09, 18 February 2025 (UTC)

Documentation for extensions maintenance

Hello, I am using version 1.43 and there is a really useful extension (markdown) which requires version 1.35. The error I have is "Class "ResourceLoaderFileModule" not found". This class was removed in version 1.39. Is there any reference documentation to upgrade extensions?

Thank you. Xavi.developer (talk) 08:02, 8 February 2025 (UTC)

See Release notes/1.39 Malyacko (talk) 09:27, 10 February 2025 (UTC)
thanks, I could not find it Xavi.developer (talk) 04:59, 20 February 2025 (UTC)
These classes were moved into namespaces, so you will have to update the references to account for those namespaces. But it's likely there are a lot more issues of course. That's the problem with older extensions that don't have a maintainer any longer. —TheDJ (Not WMF) (talkcontribs) 16:16, 11 February 2025 (UTC)
Thanks for the response. I have managed to make it work in honor to MediaWiki devs, the plugin devs and of course, Aaron Swartz, for designing the markdown format. Here are the changes I have made to the plugin. Of course I am not proud on how I have solved them. I have made it quick due to I don't know if someday it will be fixed nicely. I will post these changes also in the plugin github.
  • in ResourceLoaderWikiMarkdownVisualEditorModule make these changes (as namespaces for these classes have been created):
  • add
```
use MediaWiki\ResourceLoader\Context;
use MediaWiki\ResourceLoader\Module;
```
  • replace "ResourceLoaderModule" per "Module"
  • replace "ResourceLoaderContext" per "Context"
  • in extension.json, modify the ContentHandlers to be an array with key "class"
```
"ContentHandlers": {
"markdown": {"class": "MarkdownContentHandler"}
},
```
  • in MarkdownContentHandler.php, modify __construct to replace the constants per its values (I don't know why it doesn't load the constants on WikiMarkdown::onRegistration())
```
$modelId = 'markdown', $formats = ['text/markdown']
```
  • in WikiMarkdown.php, replace the usage of Linker::makeHeadLine (it was deprecated in 1.43) per self::makeHeadLine and add the method to the class (restored from from 1.42.5, https://github.com/wikimedia/mediawiki/blob/REL1_42/includes/linker/Linker.php :: 1956)
```
public static function makeHeadline( $level, $attribs, $anchor, $html,
$link, $fallbackAnchor = false
)
{
$anchorEscaped = htmlspecialchars($anchor, ENT_COMPAT);
$fallback = '';
if ($fallbackAnchor !== false && $fallbackAnchor !== $anchor) {
$fallbackAnchor = htmlspecialchars($fallbackAnchor, ENT_COMPAT);
$fallback = "<span id=\"$fallbackAnchor\"></span>";
}
return "<h$level$attribs"
. "$fallback<span class=\"mw-headline\" id=\"$anchorEscaped\">$html</span>"
. $link
. "</h$level>";
}
``` Xavi.developer (talk) 07:38, 20 February 2025 (UTC)

Is it normal for a part of the page not yet marked for translation parse tvars wrongly?

I edited the page Manual:Using custom namespaces (revision 7008818), which added some <tvar>s to the page. Other <tvar>s behaved normally, but those I added glitched, showing the raw tag and breaking some links. It is normal for them to behave so? 1F616EMO (talk) 14:09, 8 February 2025 (UTC)

The tvar needs to be within <translate>...</translate> tags to work properly - yours aren't. * Pppery * it has begun 18:10, 8 February 2025 (UTC)
Sorry, didn't notice that. Fixed in revision 7009428. 1F616EMO (talk) 00:29, 9 February 2025 (UTC)
The text statement that consist's of no more than that of the Chord Major (c mjor, cminr-majr].
is a denominator./ 202.36.254.250 01:57, 20 February 2025 (UTC)

Date parsing

Does MediaWiki include a built-in way to convert a JavaScript Date object to a string formatted according to the end-user's preferences, i.e. one of the following:

  • 17:18, 17 February 2025
  • 17:18, February 17, 2025
  • 17:18, 2025 February 17
  • 2025-02-17T17:18:30

So, if you had a date object called myDate, you could do something like mw.dateString(myDate). Mr. Starfleet Command (talk) 17:19, 17 February 2025 (UTC)

You could have a look at Help:Extension:ParserFunctions##time and Extension:Scribunto/Lua_reference_manual#os.date. Jonathan3 (talk) 22:27, 19 February 2025 (UTC)
@Jonathan3 Thanks, but I need something that would work in JavaScript. However, I have found an alternative solution that isn't ideal but works decently well, so I'll just stick with it. Mr. Starfleet Command (talk) 22:31, 19 February 2025 (UTC)
@Mr. Starfleet Command: Good frontend formatting of dates is a bit of a long-standing issue, e.g.: phab:T21992. Sam Wilson 23:52, 19 February 2025 (UTC)

SqliteMaintenance TypeError

mediawiki 1.43.0 fedora f41 [1]

SqliteMaintenance vacuum fail

cd /usr/share/webapps/mediawiki/maintenance
sudo -u apache -g apache php ./run.php SqliteMaintenance --vacuum --integrity
[bd237d1cef6d626ee1badfac] [no req]   TypeError: SqliteMaintenance::vacuum(): Argument #1 ($dbw) must be of type Wikimedia\Rdbms\Databa
seSqlite, Wikimedia\Rdbms\DBConnRef given, called in /usr/share/webapps/mediawiki/maintenance/SqliteMaintenance.php on line 68 
Backtrace: 
from /usr/share/webapps/mediawiki/maintenance/SqliteMaintenance.php(80) 
#0 /usr/share/webapps/mediawiki/maintenance/SqliteMaintenance.php(68): SqliteMaintenance->vacuum() 
#1 /usr/share/webapps/mediawiki/maintenance/includes/MaintenanceRunner.php(703): SqliteMaintenance->execute() 
#2 /usr/share/webapps/mediawiki/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run() 
#3 {main}

Un1Gfn (talk) 04:44, 20 February 2025 (UTC)

bug report #T386891 [2] Un1Gfn (talk) 05:33, 20 February 2025 (UTC)

How to specify the template data in the documentation of a template?

I ever tried editing the template data in my wiki, and I put the data table in the documentation of the template (like Template:XXX/doc). However, the template data was identified incorrectly as belonging to the template Template:XXX/doc, instead of Template:XXX. How could I correct it? BugCatcher2019 (talk) 20:23, 17 February 2025 (UTC)

Transclude /doc to /Template:XXX - noinclude is enough. wargo (talk) 22:15, 22 February 2025 (UTC)

how to right justify a vertical table, with rest of page flowing around?

when i was on mediaWiki 1.34, i could do this:

<div class="tright" style="text-align: right;"> |- | my table elements here |} </div>

and that table whould show on the right edge of my page, all the way down, while the REST of the page showed to its left.

but now that i've updated to 1.43, it stacks above the rest of my page. how do i reimplement the table on the right?

Davecotter (talk) 18:42, 16 February 2025 (UTC)

{| class="wikitable" style="float:right;" ? Not sure what your tright class does, that is not MediaWiki code... Malyacko (talk) 22:28, 16 February 2025 (UTC)
It works fine using the Timeless skin (https://karaoke.kjams.com/w/index.php?title=Sandbox&useskin=Timeless) so maybe the "tright" class doesn't exist in MediaWiki/Vector any more. You could add "clear: right; float: right" to the style above. I'm sure it's possible to achieve the same thing by styling the table itself though. Jonathan3 (talk) 22:34, 16 February 2025 (UTC)
P.S. By "it" I meant the code on the wiki page, which begins:
<div class="tright" style="text-align: right;">
{|cellspacing="0" cellpadding="0"
| ...
Jonathan3 (talk) 22:37, 16 February 2025 (UTC)
The tright class is no longer provided by default. See Manual:$wgUseLegacyMediaStylesTheDJ (Not WMF) (talkcontribs) 14:13, 24 February 2025 (UTC)

external image: how to set size?

i have "$wgAllowExternalImages" set to TRUE, tried the trick explained here, which didn't work. so how do i get my images resized? i used to use the <img> tag, but that no longer is available since i upgraded my installation.

Davecotter (talk) 19:15, 17 February 2025 (UTC)

Really? nobody knows how to do this?
Specifically i need this is to enable HiDPI or Retina Display images. ie: display pic at 50%, but have it show up double high rez.
Davecotter (talk) 19:25, 22 February 2025 (UTC)
i found this:
> you can also embed external images. To do that, simply insert the image's URL:
> http://url.for/some/image.png
> Embedded images can be resized by the CSS transform property. They also may be formatted by surrounding MediaWiki markup or HTML/CSS code.
however there is no example of this "CSS transform property" nor "MediaWiki markup" nor "HTML/CSS code". could someone please provide an example of eahc?
Davecotter (talk) 21:18, 22 February 2025 (UTC)
Maybe TemplateStyles will allow this? Or put to sitewide common.css if you want set fixed size for all images. Surrounding code is any valid code you can use in wikitext. It could be, for example, span or div. These can be sized by inline css or be tagged with classes and ids, so CSS can target them and their content. wargo (talk) 22:04, 22 February 2025 (UTC)
is there example code for that? specifically just to set an image to 50%, or for an svg image, to a pixel width? an external image, with an external link. Davecotter (talk) 21:45, 23 February 2025 (UTC)
wgAllowExternalImages is not used by WMF, and as such doesn't really get feature development. For that reason there are no built in ways to scale the image you are referring to. —TheDJ (Not WMF) (talkcontribs) 14:10, 24 February 2025 (UTC)

Pywikibot/Replace.py - Only target redirect pages

Hello! My bot uses the replace.py script to do some cleanup replacements on wiki articles. Recently my community was thinking to standardize the way redirects are written so I was wondering, is there a way to target only redirect pages? Can't find any way here.

(Is this the correct place to ask this question?) - Klein Muçi (talk) 18:31, 8 February 2025 (UTC)

@Klein Muçi Searching for the redirect text is one option. Leaderboard (talk) 12:30, 10 February 2025 (UTC)
@Leaderboard, yes but the problem was that that text appeared in multiple citation links as well so I would need to spend some time fine-tunning regexes and since redirects can appear in all namespaces I was wondering if there was a cleaner way to filter those pages. It feels like a hack to filter them through regex parsing. - Klein Muçi (talk) 12:15, 12 February 2025 (UTC)
@Klein Muçi Try asking the bot to search through Special:ListRedirects. You can also use AWB for this. Leaderboard (talk) 12:19, 12 February 2025 (UTC)
Ah, so they are filtered somewhere! Any idea how can i specify that through Manual:Pywikibot/Page Generators?
I was hoping to have it as a monthly recurring job run on Toolforge. - Klein Muçi (talk) 12:23, 12 February 2025 (UTC)
@Klein Muçi One quick and dirty way is to use the -randomredirect:n option where n is a very large number, thereby getting all the redirects. Another option is to first get the list of redirects in a file (or in Python itself) and feed that into replace.py as a file. Leaderboard (talk) 12:30, 12 February 2025 (UTC)
I see. Thank you! Is there a way where I can "wish" for an upgrade to the list of generators to include functions with special pages as well? - Klein Muçi (talk) 12:49, 12 February 2025 (UTC)
@Klein Muçi Try IRC or the mailing list at Manual:Pywikibot. Leaderboard (talk) 13:13, 12 February 2025 (UTC)
@Leaderboard, apparently Special:ListRedirects only lists 5000 redirects, which for my homewiki are not enough to go up to letter C in an alphabetical order. :/ - Klein Muçi (talk) 00:33, 13 February 2025 (UTC)
@Klein Muçi Can you try the other option then? Leaderboard (talk) 02:06, 13 February 2025 (UTC)
@Leaderboard, I'm sorry but what is the other way? If you're referring to Another option is to first get the list of redirects in a file (or in Python itself) and feed that into replace.py as a file. the problem still persists: How do I get the list of all redirects of a wiki? I thought I could get it through Special:ListRedirects but apparently that has a hardset limit of 5000 pages. - Klein Muçi (talk) 11:39, 13 February 2025 (UTC)
@Klein Muçi Use the API. See https://www.mediawiki.org/w/api.php?action=help&modules=query%2Ballredirects - an example is at https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&format=json&generator=allredirects&formatversion=2&garlimit=max. That does have a limit of 500 (5000 for bots/sysops), but you can easily tell the API to continue returning the next 500(0) and so on. Leaderboard (talk) 12:33, 13 February 2025 (UTC)
Ugh... That goes way beyond what I was expecting this job to be worth of. I believe my request will have to wait until redirects can be listed in an easier manner. I'll actually request that as a wish on Meta later on. Thank you for all your help, @Leaderboard! :) - Klein Muçi (talk) 12:50, 13 February 2025 (UTC)
To give some closure to this, I was able to generate a list using Quarry. Lists on Quarry are not dynamic by nature so they're not a good option for recurring tasks but at least I can use those to work with AWB every once in a while. I also created this wish for redirect changes. - Klein Muçi (talk) 11:13, 14 February 2025 (UTC)
@Klein Muçi If you can do this using Quarry, it should be pretty straightforward to adapt this as a SQL script. Leaderboard (talk) 09:00, 26 February 2025 (UTC)

What versions of the LDAPAuthorization and LDAPAuthentication2 extensions are compatible with MW 1.43?

What versions of the LDAPAuthorization and LDAPAuthentication2 extensions are compatible with MediaWiki 1.43? We are having issues with the LDAP extensions giving errors when we attempt to login to our Wiki site.

When I look here: Extension:PluggableAuth - MediaWiki it appears that the PluggableAuth extension latest version 7.0.0 is only compatible with the 2.0.0 version of both LDAPAuthorization and LDAPAuthentication2. However, even using the 2.0.0 versions of both of those (with the 1.43 release of MediaWiki) still results in an error ("The supplied credentials could not be authenticated") when we attempt to login to our Wiki site.

Has anyone encountered issues with LDAP and the latest version of MediaWiki? If so how did you resolve these? Jbubz (talk) 16:41, 10 February 2025 (UTC)

There has not been an official release of the LDAP extensions for 1.43 yet. But I am not aware of any incompatibilities so far. The error "The supplied credentials could not be authenticated" can be caused by a lot of things. It is not necessarily a version incompatibility. Did you upgrade from a working setup? Or is is a fresh installation? Osnard (talk) 07:34, 14 February 2025 (UTC)
Apologies, sorry for the delay. I've been out of the office!
So, I learned that it is because the php-cgi.exe process is unable to access the .json file at D:\Websites\Wikis\<sitename>\ldapconfigs\ldapconfigs.json
I migrated a working setup from an older 2016 version server onto a new server with a Windows Server 2022 OS.
I have migrated two different Wiki sites onto this new server to see if they had the same access issue. Neither has had any issues, it's just the one wiki site that for some reason isn't allowing php-cgi.exe to access the .json file.
I'd love any ideas. I used Procmon for some troubleshooting and that is where I uncovered that it's php-cgi.exe that is failing to access the .json file. I have looked at the folder and file permissions between this site and another site that I was able to successfully migrate, and the security permissions look identical. I know they can't be, though. I'm just missing something.
Procmon does list the user that the system is using to run php-cgi.exe, which is listed as IIS APPPOOL\MyAppPoolitrdemocategoriestest.
Here are the versions of everything:
MediaWiki 1.43.0
PHP 8.4.3 (cgi-fcgi)
ICU 75.1
MariaDB 10.5.8-MariaDB
Lua 5.1.5 Jbubz (talk) 20:46, 25 February 2025 (UTC)
Try using a PHP based configuration instead of the JSON file. This will ensure PHP can always read the config Osnard (talk) 07:29, 26 February 2025 (UTC)

Displaying MediaWiki:Moveddeleted-notice for all visitors

In case you've recently lost track, I run a Miraheze wiki.

Whenever pages get deleted, a message (MediaWiki:Moveddeleted-notice) and log overview get shown above the "no page found" reminder. However, neither are shown to IPs and other visitors by default (at least on Miraheze), although WP can already display them. What permission is required to make them show up? --Slgrandson (talk) 03:18, 23 February 2025 (UTC)

@Slgrandson: As far as I'm aware (and judging by some code I found using Codesearch ), there isn't currently a configuration option to show the moveddeleted-notice log overview to unregistered users.
However, my understanding is that - when a page has been recently deleted - the log overview is shown to unregistered users; using the moveddeleted-notice-recent message. I believe that this may have been the message that was displayed to unregistered users on the Wikipedia page you linked.
All the best :) ‍—‍a smart kitten[meow] 20:07, 25 February 2025 (UTC)

SVG

I use [[File:Logo.svg|Fikipedia]] in japanese Mediawiki, but, happen this.

[50925ae0dcedbf26fc1ccec8] /mediawiki/index.php?title=%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8&action=submit RuntimeException: PCRE failure
Backtrace:
from C:\xampp\htdocs\mediawiki\includes\parser\Parser.php(2172)
#0 C:\xampp\htdocs\mediawiki\includes\parser\Parser.php(1629): MediaWiki\Parser\Parser->handleExternalLinks(string)
#1 C:\xampp\htdocs\mediawiki\includes\parser\Parser.php(701): MediaWiki\Parser\Parser->internalParse(string)
#2 C:\xampp\htdocs\mediawiki\includes\content\WikitextContentHandler.php(384): MediaWiki\Parser\Parser->parse(string, MediaWiki\Title\Title, MediaWiki\Parser\ParserOptions, bool, bool, null)
#3 C:\xampp\htdocs\mediawiki\includes\content\ContentHandler.php(1691): MediaWiki\Content\WikitextContentHandler->fillParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, MediaWiki\Parser\ParserOutput)
#4 C:\xampp\htdocs\mediawiki\includes\content\Renderer\ContentRenderer.php(79): MediaWiki\Content\ContentHandler->getParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)
#5 C:\xampp\htdocs\mediawiki\includes\editpage\EditPage.php(4202): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(MediaWiki\Content\WikitextContent, MediaWiki\Title\Title, null, MediaWiki\Parser\ParserOptions)
#6 C:\xampp\htdocs\mediawiki\includes\editpage\EditPage.php(4105): MediaWiki\EditPage\EditPage->doPreviewParse(MediaWiki\Content\WikitextContent)
#7 C:\xampp\htdocs\mediawiki\includes\editpage\EditPage.php(2986): MediaWiki\EditPage\EditPage->getPreviewText()
#8 C:\xampp\htdocs\mediawiki\includes\editpage\EditPage.php(783): MediaWiki\EditPage\EditPage->showEditForm()
#9 C:\xampp\htdocs\mediawiki\includes\actions\EditAction.php(66): MediaWiki\EditPage\EditPage->edit()
#10 C:\xampp\htdocs\mediawiki\includes\actions\SubmitAction.php(38): EditAction->show()
#11 C:\xampp\htdocs\mediawiki\includes\actions\ActionEntryPoint.php(733): SubmitAction->show()
#12 C:\xampp\htdocs\mediawiki\includes\actions\ActionEntryPoint.php(510): MediaWiki\Actions\ActionEntryPoint->performAction(Article, MediaWiki\Title\Title)
#13 C:\xampp\htdocs\mediawiki\includes\actions\ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()
#14 C:\xampp\htdocs\mediawiki\includes\MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()
#15 C:\xampp\htdocs\mediawiki\index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#16 {main}

version is 1.43.0. Chasa 366 (talk) 13:10, 24 February 2025 (UTC)

and this is in localhost Chasa 366 (talk) 13:11, 24 February 2025 (UTC)
この時は少し混乱していました。
[[ファイル:Fikipedia-logo-ja.svg]]が使えませんでした。Wikicommonsにあるファイルは全て使用できました。
エラーは先ほどと同じような感じです。また、ファイルページではsvgが灰色になってしまいました。
$wgFileExtensions = array(
    'tiff', 'tif', 'png', 'gif', 'jpg', 'jpeg', 'webp', 'xcf', 'pdf',
    'mid', 'ogg', 'ogv', 'svg', 'djvu', 'oga', 'flac', 'opus', 'wav', 
    'webm', 'mp3', 'midi', 'mpg', 'mpeg'
);
 $wgEnableSVG = true;
$wgShowExceptionDetails = true;error_reporting( -1 );
$wgMaxUploadSize = 9999999;
ini_set('display_errors', 1);
error_reporting(E_ALL);
$wgGenerateThumbnailOnParse = true;
putenv('TMP=C:\\xampp\\tmp');
putenv('TEMP=C:\\xampp\\tmp');
putenv('TMPDIR=C:\\xampp\\tmp');
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "C:/Program Files/ImageMagick-7.1.1-Q16-HDRI/magick.exe";
$wgMainCacheType = CACHE_NONE;
$wgCacheDirectory = false;
$wgUsePathInfo = true;
Chasa 366 (talk) 10:52, 25 February 2025 (UTC)

Issue with dark mode reporting

I would like to report an issue about reporting dark mode bugs using the link "Report an issue with dark mode" on the appearance menu on the Vector 2022 skin on Wikipedia and other Wikimedia wikis.

Description of the issue: After following said link, and switching to visual editing, the page content will be replaced by the report instead of adding a new section.

To recreate:

1. Find any page to test report dark mode.

2. Click on "Report an issue with dark mode" link in the appearance menu (glasses button or right side of the screen).

3. Switch to visual editing using the pencil menu.

4. Type "this is a test", or something similar.

5. Save the edit.

6. Notice how the page gets replaced by the report, rather than adding it to the bottom of the page.

Thanks Justjourney (talk) 06:21, 25 February 2025 (UTC)

Hi, how to "Find any page to test report dark mode"? Any reason not to provide a specific link? Where does "the link "Report an issue with dark mode"" actually go? Also note that you may want to bring this up on meta:Tech as this page is usually about 3rd party installations of MediaWiki, not about issues on Wikimedia websites. Malyacko (talk) 10:33, 25 February 2025 (UTC)

I created 2 accounts

How do I merge my accounts into one I Am Interested In Words (talk) 06:33, 13 February 2025 (UTC)

Extension:MergeAccount if the wiki in question supports this. Leaderboard (talk) 17:43, 26 February 2025 (UTC)

Sidebar, "tools" section ?

Admin only on a relative default wiki(MW 1.39.10, vector(2010(default),2022), monobook)

The active sidebar shows 3 sections. But the MediaWiki:Sidebar page only specified the first two. But not the last "Tools" section. ???

How/what/? is added it, and can I somehow edit or override it. (was thinking to split it into page-related and global-stuff sections)

MvGulik (talk) 09:42, 25 February 2025 (UTC)

@MvGulik The Tools section has always been special as it is context dependant. For that reason, it was never made customisable. —TheDJ (Not WMF) (talkcontribs) 15:57, 25 February 2025 (UTC)
I'll take it that's 'not customizable' without additional work (bureaucrat/system admin-level), as there are MW wiki's that seems to have alternative/edited/(separate) "Tools" menu's. (but that's not really an option for the target wiki, but good to know). Thanks. MvGulik (talk) 19:28, 25 February 2025 (UTC)
Yes, extensions, skins and javascript tooling can all rearrange the position and the contents of that menu. But you cannot do it via MediaWiki:Sidebar —TheDJ (Not WMF) (talkcontribs) 09:46, 26 February 2025 (UTC)

Getting 409 errors for resources

Product Version MediaWiki 1.40.1 PHP 8.0.30 (litespeed) ICU 69.1 MySQL 5.7.23-23

website: www.jainkosh.org

Hi I have been using MW for years. It had been working great. Recently we are having 409 issues for resources that causes website to not load properly. The JS, CSS files are giving issues. I tried adding $wgCacheEpoch = 20250226090409; so it clears cache. But this didn't help. The resources are still throwing 409 code. can you please guide what can be done to fix? We have not changed anything on the server or in code. It's strange how it has started giving these errors now. It has been about 3 months we are continuously having this issue.


Thanks Vikas Vikasnd (talk) 09:33, 26 February 2025 (UTC)

Etymology from Wiktionary API

Hi, can you please make it possible to retrieve etymology data from the Wiktionary API? 71.184.139.106 03:28, 27 February 2025 (UTC)

Display short list of new pages on the homepage

MediaWiki 1.39.3

Hello. How can I display a short list of recently created pages, on the homepage?

A bit like the dynamicpagelist plugin, but for all pages. X4rtqd6941 (talk) 12:51, 27 February 2025 (UTC)

Actually found it, so I share it here.
Look at the accepted answer at the bottom here https://stackoverflow.com/questions/2419917/embedding-recent-changes-on-main-page-on-mediawiki
And from the comment of the said answer, look here: https://www.mediawiki.org/wiki/Help:Recent_changes X4rtqd6941 (talk) 12:57, 27 February 2025 (UTC)

Error: 1062 Duplicate entry '' for key 'actor_name' (localhost)

Hi,

I'm trying to migrate a very old version of MediaWiki (1.32.6 !!!) and was advised (by this very desk) to run migrateActors.php before. Si I did :

[root@sup-qua-wiki00009 /web/wikipole/wiki]# php maintenance/migrateActors.php 
 Creating actor entries for all registered users
 ... 1 - 54
 Completed actor creation, added 21 new actor(s)
 Beginning migration of revision.rev_user and revision.rev_user_text to revision_actor_temp.revactor_actor
 [...]
 User name "Xhumbert" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
 [...]
 Completed migration, updated 1925 row(s) with 1 new actor(s), 3278 error(s)
 Beginning migration of archive.ar_user and archive.ar_user_text to archive.ar_actor
 ... img_name=Puttygen1.png
 User name "Xhumbert" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
 [...]
 Completed migration, updated 108 row(s) with 0 new actor(s), 166 error(s)
 Beginning migration of oldimage.oi_user and oldimage.oi_user_text to oldimage.oi_actor
 User name "XHumbert" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
 [...]
 ... oi_name=Topase.png oi_timestamp=20170919100858
 Completed migration, updated 31 row(s) with 0 new actor(s), 68 error(s)
 Beginning migration of filearchive.fa_user and filearchive.fa_user_text to filearchive.fa_actor
 ... fa_id=6
 Completed migration, updated 5 row(s) with 0 new actor(s), 0 error(s)
 Beginning migration of recentchanges.rc_user and recentchanges.rc_user_text to recentchanges.rc_actor
 ... rc_id=5390
 Completed migration, updated 88 row(s) with 0 new actor(s), 0 error(s)
 Beginning migration of logging.log_user and logging.log_user_text to logging.log_actor
 ... log_id=100
 [20991d5afb7a4752411ac77e] [no req]   Wikimedia\Rdbms\DBQueryError from line 1506 of /web/wikipole/mediawiki-1.32.6/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
 Query: INSERT  INTO `mw_pole_actor` (actor_name) VALUES ('')
 Function: MigrateActors::addActorsForRows
 Error: 1062 Duplicate entry '' for key 'actor_name' (localhost)
 
 Backtrace:
 #0 /web/wikipole/mediawiki-1.32.6/includes/libs/rdbms/database/Database.php(1476): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
 #1 /web/wikipole/mediawiki-1.32.6/includes/libs/rdbms/database/Database.php(1236): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
 #2 /web/wikipole/mediawiki-1.32.6/includes/libs/rdbms/database/Database.php(2078): Wikimedia\Rdbms\Database->query(string, string)
 #3 /web/wikipole/mediawiki-1.32.6/maintenance/migrateActors.php(193): Wikimedia\Rdbms\Database->insert(string, array, string)
 #4 /web/wikipole/mediawiki-1.32.6/maintenance/migrateActors.php(268): MigrateActors->addActorsForRows(Wikimedia\Rdbms\DatabaseMysqli, string, array, array, integer)
 #5 /web/wikipole/mediawiki-1.32.6/maintenance/migrateActors.php(91): MigrateActors->migrate(string, array, string, string, string)
 #6 /web/wikipole/mediawiki-1.32.6/maintenance/Maintenance.php(1698): MigrateActors->doDBUpdates()
 #7 /web/wikipole/mediawiki-1.32.6/maintenance/doMaintenance.php(94): LoggedUpdateMaintenance->execute()
 #8 /web/wikipole/mediawiki-1.32.6/maintenance/migrateActors.php(587): require_once(string)
 #9 {main}

Worth to be noted, before, the actor table was empty, after it contains that :

MariaDB [pole]> select * from mw_pole_actor;
 +----------+------------+---------------------------+
 | actor_id | actor_user | actor_name                |
 +----------+------------+---------------------------+
 |        1 |          1 | Admin                     |
 |        2 |         29 | Correcteur de redirection |
 |        3 |         36 | Xhumbert                  |
 [...]
 |       22 |       NULL | MediaWiki default         |
 |       23 |       NULL |                           |
 +----------+------------+---------------------------+

Thanks for help

Regards,

Xavier Xavier8854 (talk) 13:33, 27 February 2025 (UTC)

It says: “ User name "XHumbert" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.” Have you done this ? —TheDJ (Not WMF) (talkcontribs) 21:08, 27 February 2025 (UTC)
Yes, I did with no significant result
[root@sup-qua-wiki00009 /web/wikipole/wiki]# php maintenance/cleanupUsersWithNoId.php --prefix mw_pole_
...Update 'CleanupUsersWithNoId' already logged as completed.
[root@sup-qua-wiki00009 /web/wikipole/wiki]# php maintenance/cleanupUsersWithNoId.php --prefix mw_pole_ --force
Beginning cleanup of revision
... rev_timestamp=20081103151542 rev_id=1
Completed cleanup, assigned 0 and prefixed 0 row(s)
Beginning cleanup of archive
... ar_id=26
Completed cleanup, assigned 0 and prefixed 0 row(s)
Beginning cleanup of logging
Completed cleanup, assigned 0 and prefixed 0 row(s)
Beginning cleanup of image
Completed cleanup, assigned 0 and prefixed 0 row(s)
Beginning cleanup of oldimage
... oi_name=Topase.png oi_timestamp=20170919100858
Completed cleanup, assigned 0 and prefixed 0 row(s)
Beginning cleanup of filearchive
... fa_id=6
Completed cleanup, assigned 0 and prefixed 0 row(s)
Beginning cleanup of ipblocks
Completed cleanup, assigned 0 and prefixed 0 row(s)
Beginning cleanup of recentchanges
... rc_id=5390
Completed cleanup, assigned 0 and prefixed 0 row(s)
Xavier8854 (talk) 07:36, 28 February 2025 (UTC)

Running KaTeX at preview in the wiki editor (follow-up)

I am using KaTeX as an external math rendering tool (I need some features that aren't offered by MW's math extension). I want math to be rendered each time the preview of the wiki editor is refreshed. @TheDJ suggested to add a JS hook, but I am not able to get it to work (see here). Does anybody have a hint on how to solve this?

Sorry for bothering again, I'm really stuck... 😬 Also, I wanted to write in the original thread but it has been protected. Sparushau (talk) 15:09, 27 February 2025 (UTC)

Download extensions from Phabricator

Hi, I'd like to download some MW1.16 extensions from SVN. I found UsabilityInitiative · rSVN but can't find a way to download the extensions. Sorry for running such an old version of MW, but I'm really running it locally for curiosity only. FarmerCars789 (talk) 15:12, 8 February 2025 (UTC)

https://phabricator.wikimedia.org/diffusion/SVN/ shows a "Checkout" button. Malyacko (talk) 09:26, 10 February 2025 (UTC)
True, but unfortunately clicking on that button displays the message "Repository has no URIs set." for me. ‍—‍a smart kitten[meow] 12:27, 10 February 2025 (UTC)
@A smart kitten Which button exactly? Leaderboard (talk) 12:30, 10 February 2025 (UTC)
@Leaderboard the green "Checkout" button to the mid-right of the page on https://phabricator.wikimedia.org/diffusion/SVN/. ‍—‍a smart kitten[meow] 12:32, 10 February 2025 (UTC)
@A smart kitten Try downloading the dump (it's a large file) at https://dumps.wikimedia.org/other/misc/. Leaderboard (talk) 13:28, 10 February 2025 (UTC)
I did but i don't know how to open it, it's just an extremely large file with no folders at all. The file itself has no extension also. So i really have no idea. FarmerCars789 (talk) 14:27, 10 February 2025 (UTC)
@FarmerCars789 The file has a .gz extension - try using 7Zip to open the file. Leaderboard (talk) 15:05, 10 February 2025 (UTC)
When I extracted svn-mediawiki.gz it showed me a huge file with no extension whatsoever, unless I've downloaded the wrong file. FarmerCars789 (talk) 17:07, 10 February 2025 (UTC)
@FarmerCars789 That's actually a text-readable file. But you should not be expected to read a 14 GB text file using Notepad, so I'm indeed missing something. @Malyacko any idea if you know what to do here or where I should ask this? Leaderboard (talk) 13:24, 11 February 2025 (UTC)
Does it contain some sort of links or something in there? FarmerCars789 (talk) 13:28, 11 February 2025 (UTC)
@FarmerCars789 It actually contains all the code across all the extensions from what I can see. Leaderboard (talk) 04:25, 12 February 2025 (UTC)
And how could I extract them? FarmerCars789 (talk) 12:36, 12 February 2025 (UTC)
@FarmerCars789 You can use any text editor to view them; what I am not sure is how to extract them in terms of folders and all that, which is why I pinged Malayacko. @A smart kitten also makes a good point. Leaderboard (talk) 13:07, 13 February 2025 (UTC)
Out of my own curiosity, I installed Subversion & started trying to load the MediaWiki Subversion dump file (using svnadmin create mediawiki-svn-repo & svnadmin load mediawiki-svn-repo --normalize-props < svn-mediawiki).
However, I interrupted the svnadmin load command after it became clear how long it was going to take to complete, as - given how long it seemed like it was going to take - I thought that there was probably a better way of doing things that I hadn't thought of. (At the length of time it looked like the command was going to take, I thought it may be quicker to code a quick Python script to scrape the folder structure/file contents from the repo on Phabricator!)
Best, ‍—‍a smart kitten[meow] 19:20, 12 February 2025 (UTC)
Is the python script done? Or it isn't really possible? FarmerCars789 (talk) 16:54, 14 February 2025 (UTC)
To be honest, I haven’t attempted to create such a script myself yet - I only mentioned it as something I thought might be quicker than what I was previously trying. Apologies if the way I worded my last message caused any confusion. Best, ‍—‍a smart kitten[meow] 17:48, 14 February 2025 (UTC)
Ah I understand now. FarmerCars789 (talk) 17:56, 14 February 2025 (UTC)
How long it was to complete the subversion file? hours? days? FarmerCars789 (talk) 10:46, 22 February 2025 (UTC)
I’m not completely sure to be honest, as I interrupted the command early due to the time it was taking. However, extrapolating from the progress I remember seeing while the command was running, I’d probably say at least hours at a guess. Best, ‍—‍a smart kitten[meow] 09:52, 23 February 2025 (UTC)
Either way, how could you download from SVN? FarmerCars789 (talk) 15:39, 23 February 2025 (UTC)
I've also tried to download it with Git, but it always gives me a 403. FarmerCars789 (talk) 18:37, 23 February 2025 (UTC)
I ran the command on the (extracted) svn-mediawiki file downloaded from https://dumps.wikimedia.org/other/misc/ - is this what you're referring to? If not, I'm afraid I'm not personally aware of another way to download the old SVN repos. Best, ‍—‍a smart kitten[meow] 11:57, 24 February 2025 (UTC)
Yeah, we can't really download whole folders from Phabricator, if we could, then I wouldn't be here. I did find the svn export command though. When i tried to use Git I ran the command like this: git clone https://https://phabricator.wikimedia.org/diffusion/SVN/browse/branches/REL1_16/extensions/UsabilityInitiative and gave me a 403. I know Gerrit is meant for Git downloading but on the official Phabricator software documentation it does say somewhere it supports Git. I'm too lazy to link as I'm writing this on my phone. FarmerCars789 (talk) 09:53, 25 February 2025 (UTC)
In my opinion the SVN archive repository should be hosted on Wikimedia Gerrit, where you can download any archive from the site itself or with Git. FarmerCars789 (talk) 17:42, 25 February 2025 (UTC)
@A smart kitten @Leaderboard @Malyacko? FarmerCars789 (talk) 08:44, 26 February 2025 (UTC)
@FarmerCars789 I'm not sure what you mean by "Wikimedia Gitles" - I get references to girls instead? Leaderboard (talk) 08:59, 26 February 2025 (UTC)
Oops, I meant Gerrit. Sorry for the confusion, I wrote that off my mind. Should be fixed now. FarmerCars789 (talk) 11:04, 26 February 2025 (UTC)
Gerrit supports only Git, not SVN. Malyacko (talk) 21:35, 26 February 2025 (UTC)
No, I meant to transfer the SVN archive repo from Phabricator to Gerrit. I'm not referring to the SVN dump that works with SVN. FarmerCars789 (talk) 10:07, 27 February 2025 (UTC)
I might just make a Python/JS script to scrape the file/folders of the repo, just like @A smart kitten suggested. I know the class that holds the file/folder name. ("diffusion-browse-name") FarmerCars789 (talk) 13:16, 1 March 2025 (UTC)

Common.css not loading

Good morning. I am using Media Wiki 1.43. Since I started my wiki I have not been able to use Common.css. I have purged and cleared browser history. I have used, Edge, Chrome, and Firefox to see. Nothing changes at all. I am using Vector Legacy 2010. I am not sure why common.css is not working. Any help would be great Extremeshannon (talk) 19:09, 1 March 2025 (UTC)

The page name is "MediaWiki:Common.css". Maybe you missed out the "MediaWiki:" part. Also you might need to do a hard refresh of whatever other page you're looking at. Jonathan3 (talk) 00:04, 2 March 2025 (UTC)

How to set values for text size, etc. in Appearance menu for logged-out users?

Is there any way to set predetermined values for text size, etc. in the Appearance menu for logged-out users? Maybe by setting something in LocalSettings.php?

I'd like to have certain choices predetermined for people who view my site (https://michaelbeijer.co.uk/) for the first time and are not logged in.

Appearance:

  • Text: Small/standard/large
  • Width: Standard/Wide
  • Color: Dark/Light

~~~ MichaelBeijer (talk) 23:25, 26 February 2025 (UTC)

hmm, no one?
Michaelbeijer (talk) 11:07, 2 March 2025 (UTC)

I need to regenerate slots.ibd

Due to a defective hard drive and my being stupid not keeping backups I'm having serious trouble recovering this MySQL table. Is there a way to regenerate it somehow? With time and patience I was able to salvage all the others but this one will throw a read error every time no matter what. TIA. Tactica (talk) 09:49, 1 March 2025 (UTC)

@Tactica Hi. How is this related to MediaWiki at all? MediaWiki does not have some table called "slots.ibd". Please also read "Post a new question" at the top of the page. Thanks. Malyacko (talk) 17:41, 1 March 2025 (UTC)
Sorry for that... So this table comes from an extension, which basically means it's pretty much irrelevant, at least in my case. Thanks.
Erm... Manual:Slots_table does point to this being a MediaWiki core table? I'm using MW 1.43.0 with MariaDB 11.1.2 to handle a local wiki, and "slots.ibd" is obviously one of the two filenames of the table on disk.Tactica (talk) 23:39, 1 March 2025 (UTC)
this is the core revision table that keeps track of what is stored where. if you lost it, you will have lost your connections between revisions and your content tables. This is really difficult to restore. I wouldn't even know where to start. is the ibd file corrupt, or completely lost ? If if is corrupt, I would advise to peruse mysql/mariadb files on methods for restoring data from corrupt db files. There are some ways usually, where you will just partially loose some data. —TheDJ (Not WMF) (talkcontribs) 15:52, 3 March 2025 (UTC)
Thank you for answering. As far as I can tell, the file is incomplete. It should be around 14 MB but the most I can copy over is about 6 MB. Forcing a low speed copy with rsync goes through the motions as if it was copying everything, but in the end it reports errors too.
The process I followed to copy the old wiki was to have a fresh install of Linux, MariaDB, MediaWiki, etc. on a healthy drive. I created a new database there as instructed in Manual:Installing MediaWiki, then copied over the images and the MariaDB tables from the bad drive (direct copy with cp, not using any kind of export/import as the software versions and even the database name are the same). Everything was copied successfully except for a few thumbnails and the full 14 MB of this table in particular, which has me stuck.
Right now I'm trying with rsync at 1 KB/s, if that fails too I suppose I'll have to try my luck with direct MySQL commands like CHECK TABLE and friends after doing some backups. I was hoping there would be a way for MediaWiki to do this, maybe with a maintenance script. Also, I don't know if I should copy&replace the files stored on the parent directory of the wiki database, in this case /var/lib/mysql/* Tactica (talk) 19:41, 3 March 2025 (UTC)

QuickStatements using Wikibase as MediaWiki extension

Hi, is it possible to use QuickStatements using Wikibase as MediaWiki extension? I couldn't find an installation guide. Thank you! P17-local (talk) 11:32, 3 March 2025 (UTC)

Pagelinks.sql.gz file

I am trying to work with the Pagelinks file in order to extract the number of articles that link to a specific Wiki page (same idea as can be seen in the "What-links-here" tool.

However, when I loop over this sql like file, I find very weird cases of links that doesn't seem to exist in Wikipedia.

For example, the first line in the file indicate that there is a link between page ids 1939 and 2. PageID 2 doesn't even seems to exist.

Even when I look on pageIDs that do exist, the link indicated in the file does not exist in the actual wiki page.

Am I missing anything? Avrahami-isr (talk) 02:07, 1 March 2025 (UTC)

See Manual:pagelinks table and Manual:linktarget table for info about tables structure, their relation and to determine how to extract actual pages. wargo (talk) 13:13, 5 March 2025 (UTC)

Howo do I add images?

60.49.235.92 04:12, 5 March 2025 (UTC)Someone please tell me how to add images to articles please?60.49.235.92 04:12, 5 March 2025 (UTC)

For your own wiki, see Manual:Configuring file uploads and then Help:Images for the syntax. For Wikipedia, you use the upload link on Commons (c:Special:UploadWizard) and then use the same syntax to add the image to the relevant article(s) in any Wikipedia. Tactica (talk) 02:15, 6 March 2025 (UTC)

Category

What is the category Category:Name other category that this category should be included in for? 73.31.42.97 03:27, 3 March 2025 (UTC)

Maybe it's in some sort of tutorial showing that category pages can themselves be categorised. Jonathan3 (talk) 11:45, 6 March 2025 (UTC)

Recent changes missing after migration

Hello all,

I am running multiple MediaWiki 1.43 instances. As a part of my work, I routinely copy Wikis from my PROD to my DEV environment. I do this by copying /images folder, LocalSettings.php and restoring a mysqldump of PROD databases to a DEV MediaWiki instance. This has worked flawlessly for months.

Recently however, "Recent changes" is empty after the restore in DEV, but only for some Wikis. I've tried rebuildrecentchanges.php which did nothing, and rebuildall.php which did "Removing 'recentchanges.rc_timestamp' default value. Modifying rc_timestamp field of table recentchanges...done." Still no recent changes, though. I've tried dumping with --routines and --skip-triggers and a whole lot of other MySQL parameters, but no joy. I've compared the recentchanges table in DEV and PROD, and from what I can see they are identical. I am by no means a MySQL expert, though.

Anyone who has an idea about what is going on? I'm worried about other things going missing during a copy without me noticing.


136.163.203.4 13:21, 6 March 2025 (UTC)

Scala Santa e Oratorio di San Silvestro in Palatio

Stavo modificando il post sulla Scala Santa (https://it.wikipedia.org/wiki/Scala_Santa), inserendo la correzione:

* la cappella di San Lorenzo cui si accede dalla prima rampa di scale a destra;

Prima questa cappella era citata erroneamente come oratorio di San Silvesto in Palatio, con una foto però corretta di S. Lorenzo.

Fatta questa modifica la foto della cappella di S. Lorenzo è sparita e non sono in grado di recuperarla, e cliccandoci mi porta a una pagina di disambiguazione che non cita S. Lorenzo.

Anche la pagina https://it.wikipedia.org/wiki/Oratorio_di_San_Silvestro_in_Palatio contiene molte citazioni errate: questa è la cappella di San Lorenzo alla Scala Santa.

Ho bisogno di aiuto più competente della mia incompetenza, anche perchè in futuro ho intenzione di inserire molte piante di monumenti/siti in formato .bmp e non saprei proprio come fare.

Grazie Sagittarix (talk) 11:44, 4 March 2025 (UTC)

@Sagittarix Hi, this page is for the general MediaWiki software. Please bring up your question at w:it:Wikipedia:Bar instead - thanks! Malyacko (talk) 18:48, 8 March 2025 (UTC)

Unable to import Wikipedia into Unraid MediaWiki Container

Hi,

I am trying to host my own Wikipedia on my unraid server for my family and friends. I am using mariadb for my database. I am very new to this world so apologize if I missed the solution in a previous post or instruction document. When I run php /config/www/mediawiki/maintenance/importDump.php --quiet /config/enwiki-latest-pages-articles.xml, I keep getting these errors:

root@Tower:~# docker exec -it mediawiki bash

root@d1c82999f116:/# export SERVER_NAME="192.168.1.100"

root@d1c82999f116:/# php /config/www/mediawiki/maintenance/importDump.php --quiet /config/enwiki-latest-pages-articles.xml

[aee11a17155abbcb0dc23cf0]

[no req]  

CannotCreateActorException from line 2516 of /config/www/mediawiki/includes/user/User.php: Cannot create an actor for a usable name that is not an existing user Backtrace: #0 /config/www/mediawiki/includes/ActorMigration.php(256): User->getActorId(Wikimedia\Rdbms\DatabaseMysqli)

#1 /config/www/mediawiki/includes/Revision/RevisionStore.php(774): ActorMigration->getInsertValuesWithTempTable(Wikimedia\Rdbms\DatabaseMysqli, string, User)

#2 /config/www/mediawiki/includes/Revision/RevisionStore.php(573): MediaWiki\Revision\RevisionStore->insertRevisionRowOn(Wikimedia\Rdbms\DatabaseMysqli, MediaWiki\Revision\MutableRevisionRecord, Title, integer)

#3 /config/www/mediawiki/includes/Revision/RevisionStore.php(511): MediaWiki\Revision\RevisionStore->insertRevisionInternal(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DatabaseMysqli, User, CommentStoreComment, Title, integer, integer)

#4 /config/www/mediawiki/includes/libs/rdbms/database/Database.php(3988): MediaWiki\Revision\RevisionStore->MediaWiki\Revision{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)

#5 /config/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php(53): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)

#6 /config/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php(613): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#7 /config/www/mediawiki/includes/Revision/RevisionStore.php(519): Wikimedia\Rdbms\DBConnRef->doAtomicSection(string, Closure)

#8 /config/www/mediawiki/includes/Revision.php(1166): MediaWiki\Revision\RevisionStore->insertRevisionOn(MediaWiki\Revision\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)

#9 /config/www/mediawiki/includes/import/ImportableOldRevisionImporter.php(129): Revision->insertOn(Wikimedia\Rdbms\DBConnRef)

#10 /config/www/mediawiki/includes/import/WikiRevision.php(595): ImportableOldRevisionImporter->import(WikiRevision)

#11 /config/www/mediawiki/includes/import/WikiImporter.php(365): WikiRevision->importOldRevision()

#12 /config/www/mediawiki/maintenance/importDump.php(198): WikiImporter->importRevision(WikiRevision)

#13 /config/www/mediawiki/includes/import/WikiImporter.php(502): BackupReader->handleRevision(WikiRevision, WikiImporter)

#14 /config/www/mediawiki/includes/import/WikiImporter.php(939): WikiImporter->revisionCallback(WikiRevision)

#15 /config/www/mediawiki/includes/import/WikiImporter.php(858): WikiImporter->processRevision(array, array)

#16 /config/www/mediawiki/includes/import/WikiImporter.php(800): WikiImporter->handleRevision(array)

#17 /config/www/mediawiki/includes/import/WikiImporter.php(607): WikiImporter->handlePage()

#18 /config/www/mediawiki/maintenance/importDump.php(347): WikiImporter->doImport()

#19 /config/www/mediawiki/maintenance/importDump.php(280): BackupReader->importFromHandle(resource)

#20 /config/www/mediawiki/maintenance/importDump.php(116): BackupReader->importFromFile(string)

#21 /config/www/mediawiki/maintenance/doMaintenance.php(96): BackupReader->execute() #22 /config/www/mediawiki/maintenance/importDump.php(352): require_once(string)

#23 {main}

I have already Checked MediaWiki User & Actor Tables, Attempted to Reset and Fix Actors, Verified MediaWiki Database Status, and tried importing a smaller .xml file.

Any advice? Please let me know if I need to give more info or some logs.

Again sorry if this an easy fix. Dionysiann (talk) 02:06, 10 March 2025 (UTC)

Restricting edit access to a accounts with a specified verified email domain

I am attempting to restrict editing to users with a verified email of a specific domain (e.g. only users with an @ example.net email). I found this post from several years ago, but the hook it's using doesn't seem to work with newer versions. The code I'm using now looks something like (at the bottom of LocalSettings):

$wgEmailDomain = '@icloud.com'; // Set the email domain to check

  $wgHooks['ConfirmEmailComplete'][] = function ( $user ) use ( $wgEmailDomain) {

         if ( preg_match('/' . preg_quote($wgEmailDomain, '/') . '$/i', $user->getEmail()) ) {

         $user->addGroup('domain_member');

     }

     return true;

};

No matter what event I tie this to (e.g. ConfirmEmailComplete, AbortNewAccount, etc.) I always wind up encountering errors when I attempt to run it. Any suggestions on fixes or a different way to implement? Thanks! Ironblade101 (talk) 03:12, 4 March 2025 (UTC)

Hi! What errors do you encounter? Do you use any external authentication provider (e.g. with Extension:PluggableAuth)? Osnard (talk) 06:52, 11 March 2025 (UTC)

"Edit" only appears on Main Page but not on "Discussion"

I am a noob. Using version 1.43. I have enabled visualeditor and it appears as "Edit" on the "Main Page", but when I select "Discussion" only "Edit source" appears. I have spent several hours trying to figure it out to no avail. Cthomask (talk) 22:06, 5 March 2025 (UTC)

I don't think it's designed for talk pages. See Talk:VisualEditor/2016#h-Why_isn't_the_VE_running_on_talk_pages_anywhere?-2016-04-24T19:59:00.000Z, and the "Talk pages" heading at Help:VisualEditor/FAQ. Jonathan3 (talk) 11:44, 6 March 2025 (UTC)
You can install Extension:DiscussionTools for an improved discussion interface. —TheDJ (Not WMF) (talkcontribs) 10:53, 10 March 2025 (UTC)

Editnotice in discussiontools-ui-replyWidget

Hi there, I have an editnotice on my talk page with my pronouns. This editnotice shows up when the source is being edited or when someone starts a new topic. I would like it to show up when someone is replying to another person as well, since this is probably the most likely moment for someone to need my pronouns. Am I missing something or is this not (yet) possible? Thanks! :) Elphie (talk) (they/them) 11:37, 7 March 2025 (UTC)

@Elphie currently these are only shown when you create a New Topic —TheDJ (Not WMF) (talkcontribs) 12:03, 10 March 2025 (UTC)

Request for Instructions on Hiding Public Logs for Anonymous Users (MediaWiki 1.39.3)

Hello,

I am using MediaWiki version 1.39.3 and I would like to know how to hide all public logs that are accessible via Special:Log for anonymous users. Could you please provide me with step-by-step instructions on how to accomplish this?

Thank you in advance.

Best regards Sdelriog (talk) 13:04, 7 March 2025 (UTC)

You can try removing all read access from anonymous users as described in Manual:Preventing_access. It should be noted however that wikis are about transparency, so you might be better off with a CMS if you want to lock down things like this. —TheDJ (Not WMF) (talkcontribs) 10:58, 10 March 2025 (UTC)

Hello

I installed Mediawiki on a server (Debian/Apache), directory /var/lib/mediawiki

In the directory /var/www/html I added a link

docs -> /var/lib/mediawiki

When I call the link mon-site/docs/index.php/Accueil I display the page, it works

But when I want to make a modification of a page and I click on Validate. I don't return to the previous page. The URL has been change, the link to my site is double mon-site/docs/mon-site/docs/index.php/Accueil

What parameter does this modification make ?

Thanks 46.193.144.242 16:15, 8 March 2025 (UTC)

This indicates an incorrect configuration of Manual:$wgScriptPathTheDJ (Not WMF) (talkcontribs) 12:14, 10 March 2025 (UTC)

setting ldap

"Good afternoon. Could you please tell me where the error is? The username or password you entered is incorrect. Please try again."

ldap.json

{

"local.ru": {

"connection": {

"server": "dc01.local.ru",

"port": "389",

"use-tls": "true",

"user": "CN=MediawikiAuthenticator,CN=Users,DC=local,DC=ru",

"pass": "Rrrrrrr",

"enctype": "clear",

"options": {

"LDAP_OPT_DEREF": 1

         

},

"basedn": "dc=local,dc=ru",

"userbasedn": "dc=local,dc=ru",

"groupbasedn": "dc=local,dc=ru",

"searchattribute": "sAMAccountName",

"usernameattribute": "sAMAccountName",

"realnameattribute": "cn",

"emailattribute": "mail",

"grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",

"presearchusernamemodifiers": [ "spacestounderscores", "lowercase" ]

},

"userinfo": [],

"authorization": [],

   

"groupsync": {

"mapping": {

"engineering": "CN=EngineeringCoreTeam,OU=MediaWiki,DC=local,DC=ru",

"bureaucrat": "CN=Mediawiki_Admins,OU=MediaWiki,DC=local,DC=ru",

"interface-admin": "CN=Mediawiki_Admins,OU=MediaWiki,DC=local,DC=ru",

"sysop": "CN=Mediawiki_Admins,OU=MediaWiki,DC=local,DC=ru"

}

}

}

}

LocalSettings.php

// Safe IP or not (for bypassing external login via AD)

$safeIPs = array('172.17.0.1','172.18.5.255');

$ipsVars = array('HTTP_X_FORWARDED_FOR','HTTP_X_REAL_IP','REMOTE_ADDR');

foreach ($ipsVars as $ipsVar) {

if (isset($_SERVER[$ipsVar]) && mb_strlen($_SERVER[$ipsVar]) > 3 ) { $wikiRequestIP = $_SERVER[$ipsVar]; break; }

}

$wikiRequestSafe = ( isset($wikiRequestIP ) && ( in_array($wikiRequestIP,$safeIPs) ));

// Create Wiki-Group 'engineering' from default user group

$wgGroupPermissions['engineering'] = $wgGroupPermissions['user'];

// Private Wiki. External LDAP login. Default NS requires login.

$wgEmailConfirmToEdit = false;

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

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

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

$wgGroupPermissions['sysop']['createaccount'] = false;

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

$wgBlockDisablesLogin = true;

// Load LDAP Config from JSON

$ldapJsonFile = "/var/www/ldap.json";

$ldapConfig = false;

if (is_file($ldapJsonFile) && is_dir("$IP/extensions/LDAPProvider")) {

  $testJson = @json_decode(file_get_contents($ldapJsonFile),true);

  if (is_array($testJson)) {

    $ldapConfig = true;

  } else {

    error_log("Found invalid JSON in file: /var/www/ldap.json");

  }

}

// Activate Extension

if ( $ldapConfig ) {

  wfLoadExtension( 'PluggableAuth' );

  wfLoadExtension( 'LDAPProvider' );

  wfLoadExtension( 'LDAPAuthentication2' );

  wfLoadExtension( 'LDAPAuthorization' );

  wfLoadExtension( 'LDAPUserInfo' );

  wfLoadExtension( 'LDAPGroups' );

  $LDAPProviderDomainConfigs = $ldapJsonFile;

  // Force LDAPGroups to sync by choosing a domain (e.g. first JSON object in ldap.json)

  $LDAPProviderDefaultDomain = array_key_first(json_decode(file_get_contents($LDAPProviderDomainConfigs), true));

  $wgPluggableAuth_Config = array(

      array(

        'plugin' => 'LDAPAuthentication2',

        'buttonLabelMessage' => 'pt-login-button',

        'data' => ['domain'=> $LDAPProviderDefaultDomain]

         ),

      array('plugin' => 'LDAPAuthorization'),

    );

  if ($wikiRequestSafe) { $LDAPAuthentication2AllowLocalLogin = true; } Binbonm (talk) 11:05, 10 March 2025 (UTC)

Hi! Try to wire debug logs and check if CLI script extensions/LDAPProvider/maintenance/CheckLogin.php works. Please share the redacted logs here. Osnard (talk) 06:48, 11 March 2025 (UTC)
/var/www/MediaWiki$ sudo php maintenance/run.php   extensions/LDAPProvider/maintenance/CheckLogin.php    --domain="local.ru"    --username="login"
Script 'extensions/LDAPProvider/maintenance/CheckLogin.php' not found (tried path '/var/www/MediaWiki/maintenance/extensions/LDAPProvider/maintenance/CheckLogin.php' and class 'extensions/LDAPProvider/maintenance/CheckLogin\php').
chmod -R 755 /var/www/MediaWiki/extensions/LDAPProvider/ completed
CheckLogin.php the file is in the package 213.221.2.234 12:20, 11 March 2025 (UTC)

Automatically Place File Uploads into a Category

When I upload a file, it's File:Filename.ext page is automatically created, but it's empty. I'd like to automatically place it into a category.

I would love if it were default to this namespace, where I don't even need to run a script to edit the empty page.

I see Manual:Creating pages with preloaded text and some extensions that look like they'd work on normal pages, but not the File namespace.

Is this possible? 70.160.223.43 04:27, 11 March 2025 (UTC)

If all you want is have all the uploaded files placed in one or more categories, the most simple way I can think of based on the default upload mechanism is a template like Template:Information inserted in MediaWiki:Upload-default-description, modified to suit your specific requirements. Tactica (talk) 19:27, 11 March 2025 (UTC)

Could not create directory when uploading images.

  • MediaWiki: 1.43.0
  • Php: 8.2.12
  • XAMPP: 3.3.0
  • Windows 10 22H2

The wiki runs on a Windows 10 server using XAMPP. XAMPP is installed at C:\xampp. The wiki is inside the directory C:\xampp\htdocs\wiki.

When uploading some pictures, sometimes the upload fails for specific pictures with the translated error:

"Could not create directory: « mwstore://local-backend/local-public/8/80 »

The actual error is (the wiki is running on FR language):

"Impossible de créer le répertoire « mwstore://local-backend/local-public/8/80 »."

The link in the error changes depending on the picture. The error will keep occurring if I try to upload the same file.

The wiki is internal; so it's not accessible to the Internet. There's not much information out there about Windows installs or XAMPP in particular. Most solutions pertain to Linux installs and it involves setting permissions on the directories. I'm not sure which user I need to give permissions to, but I already tried "Guest", "Everyone" and so on just to test and nothing seems to resolve the issue.

It appears the issue affects files that try to write in an existing directory structure. If the image is being created in a new directory, then the error doesn't occur.

Note: The directory in the error actually exists in the images folder in the wiki directory.

Edit: This error shows in the log: [FileOperation] Wikimedia\FileBackend\FSFileBackend::doPrepareInternal: directory C:\xampp\htdocs\wiki/images/8/80 is read-only

I checked the directory and the read-only flag is showing a square instead of a checkmark. If I remove it and to everything under that directory, it automatically reverts back to a square again.

Edit2: Ultimately, I had to modify the FSFileBackend.php file. I commented out the line 516 to 518, which were the following:

		//} elseif ( !$isWritable ) {
		//	$this->logger->error( __METHOD__ . ": directory $fsDirectory is read-only") ;
		//	$status->fatal( 'directoryreadonlyerror', $params['dir']) ;

This is not an ideal fix, but it works for now. I figured out that there is probably a bug with the is_Writable php function that returns false even if the directory is writable.

If anyone knows a more proper solution, please respond and I will implement it.

Sillycrow13 (talk) 19:00, 12 March 2025 (UTC)

explainxkcd.com, running MediaWiki software, has no active bureaucrats. As a result, no old admins can be de-sysopped and no new admins can be promoted. Can MediaWiki stewards promote someone on the wiki to ‘crat status? 205.174.240.242 19:55, 12 March 2025 (UTC)

No, because MediaWiki.org (that is a website) stewards cannot take over random third-party websites on the interwebs which occasionally installed the same piece of software on their machines. Malyacko (talk) 06:22, 13 March 2025 (UTC)

Problem

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)

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)
This is on MediaWiki. 73.31.42.97 21:10, 12 March 2025 (UTC)
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)

identifying Author's Comments

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)

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

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)

@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)
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)

FileImporter configuration question

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)

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

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)

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)

MySql shut down unexpectedly

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)

I would try a forum that focuses on support for mysql/mariadb —TheDJ (Not WMF) (talkcontribs) 10:29, 15 March 2025 (UTC)
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)
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)

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

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)

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)
What about Manual:RemoveUnusedAccounts.php? Jonathan3 (talk) 23:40, 15 March 2025 (UTC)
@Jonathan3 The OP mentions that they’d already tried that maintenance script, unfortunately. Best, ‍—‍a smart kitten[meow] 08:37, 16 March 2025 (UTC)
Oops :-) Jonathan3 (talk) 23:34, 16 March 2025 (UTC)

Setting a default tabber

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)

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

System Information

  • 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

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)

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

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)

That's an enhancement request for Extension:Cite, not something related to MediaWiki itself. Tactica (talk) 13:12, 15 March 2025 (UTC)
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)
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)
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)
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)
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)
Read on. I think your question might subsequently have been answered. Jonathan3 (talk) 13:05, 18 March 2025 (UTC)

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

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)

There's some stuff at Manual:Installing_MediaWiki#Set_up_the_database that might help. Jonathan3 (talk) 13:08, 18 March 2025 (UTC)
It didn't work at all. I feel my mind is blank. :'( JayAndrewBoy (talk) 14:13, 18 March 2025 (UTC)
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)

blending transclusion with numbering

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)

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)

Search suggestions not working

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)

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)
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)

Error in BootstrapHelperFunctions.php prevents upgrade to MW 1.43

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)

@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)

foreach error from MimeAnalyzer

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)

too many files

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)

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)
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)
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)

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

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)

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)
oh okay, i already figured out how to use XOWA Wikipedian2025 (talk) 09:19, 21 March 2025 (UTC)

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

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)

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

Mylittlewiki.org

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)

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)
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)
@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)

My Little Wiki login

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)

@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)
ohhh ok, I'm so sorry!!! Skwurpiederp (talk) 12:39, 21 March 2025 (UTC)

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

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)

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

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)

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)

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

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)

No as we cannot break into your server. Only you can. Malyacko (talk) 17:18, 24 March 2025 (UTC)
@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)

Location Map Error

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)

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)
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)
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)
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)

How to add custom font in Commons.css?

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)

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)
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)
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)
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)
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)

How do I remove a user group?

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)

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)
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)
Change your hosting service :-) Jonathan3 (talk) 18:37, 20 March 2025 (UTC)
How did you remove the extension if you don't have access to LocalSettings.php? Sam Wilson 04:15, 21 March 2025 (UTC)
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)
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)
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)

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

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)

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)
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)
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)

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)

Take a look at Manual:$wgNamespacesToBeSearchedDefault. Tactica (talk) 19:27, 25 March 2025 (UTC)
It works for search input only Dimka665 (talk) 11:07, 28 March 2025 (UTC)
mediawiki.org show result in few namespaces. What extension do it? Dimka665 (talk) 17:06, 28 March 2025 (UTC)

Cannot set custom protection levels using the Protect API

My wiki has a group of users called Advanced Editors, and I have created a new page protection level using $wgRestrictionLevels called advanced-editors. I have added the following to my LocalSettings.php:

# Custom page protection type that will be applied to advanced editors.
$wgRestrictionLevels[] = 'advanced-editors';
# Allow advanced editors to edit pages protected with 'advanced-editors'
$wgGroupPermissions['advanced-editor']['advanced-editors'] = true;
$wgGroupPermissions['sysop']['advanced-editors'] = true;

The new protection level shows up in the wiki itself, but I want to use the API to protect all the pages in a certain category so that only those with the advanced-editors permission can edit them. I have created the following Python function to achieve this:

def protect(id, protection, reason): request = requests.post(apiURL, headers={ "Authorization": getCredentials() }, data={ "action": "protect", "format": "json", "pageid": id, "protections": protection, "reason": reason, "token": getCSRF() })

If I call the function with the protection edit=advanced-editors:

print(mwUtils.protect(id=9261, protection="edit=advanced-editors", reason="Test Protection" ))

I receive the following error:

'{"error":{"code":"protect-invalidlevel","info":"Invalid protection level \\"advanced-editors\\".","*":"See <url>/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."}}

However, if I call the function using edit=sysop, it works perfectly. I've also tried edit=advanced-editor just in case, but that didn't work either. Strangely, if I make the same request from Special:ApiSandbox, it works correctly:

{
	"action": "protect",
	"format": "json",
	"pageid": "9261",
	"protections": "edit=advanced-editors",
	"reason": "API Sandbox Protection",
	"token": "<redacted>"
}

The only reason I can think this might be happening is that the sandbox is sending multipart/form-data data while python must be sending application/x-www-form-urlencoded data? I have compared Python's request body with the API Sandbox's "URL query string" output, and they are both identical, apart from the sandbox using %20 to encode spaces in the "reason" field and Python using +.

My wiki is running MediaWiki 1.39.10. Unfortunately it is private and behind a log-in gate, so I can't share a link. CatObsession (talk) 09:34, 28 March 2025 (UTC)

Documentation for DiscussionTools recovery

Is there any documentation on the recovery feature of DiscussionTools (DT)? I have looked in Help:DiscussionTools.

When I suddenly close a browser tab with a half-written comment using DT, the comment reappears when next visiting the page - it is great! I needed education on it being browser/device dependent and that it only recovers Mobile comments when re-opening the page on Mobile.

Help:Edit Recovery seemes to be a different system which is very confusing.

I am a Wikimedia user on Chrome/Android. Please ping me so I will check back. Commander Keane (talk) 13:34, 28 March 2025 (UTC)

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

Resolved - https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:EasyTimeline/installation Pspviwki (talk) 16:27, 29 March 2025 (UTC)

Need to reduce SQL DB Size

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)

Manual:Reduce size of the database --Malyacko (talk) 16:53, 20 March 2025 (UTC)
I ran compressOld.php =t concat. The MySQL table called text is the biggest at 946.8 MB. After running the compressOld, the text table is the exact same size. The script output a bunch of info (2487 lines) and said "Done" at the end. Scott216 (talk) 17:38, 30 March 2025 (UTC)
After I ran OPTIMIZE TABLE the text table size was a lot smaller. Scott216 (talk) 18:58, 30 March 2025 (UTC)
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)

Upgrading Mediawiki through export and import

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)

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)
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)
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)
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)
Well... I did it.
To summarize what I did (it's only a summary, I had a couple of issues here and there):
  • backup of all files and DB
  • removed all 1.42.1 files and put 1.43.0 files at their place
  • restored LocalSettings.php and [...]/images from backup
  • run [...]/mw-config/index.php
Update successfully completed .
Thanks to all of you for your contributions. 193.207.202.151 21:49, 31 March 2025 (UTC)

Central Auth

Hello... My account has 8 months long but still have not linked with Wikipedia English, the main Wikipedia. Other WikiProjects like Wikipedia Urdu etc. and other are linked but still English Wikipedia is not attached. Please help me how to attach or link. Can any Admisntrative link my account or guide me to that issue I'm facing. Thanks MD Edit 123 (talk) 16:24, 28 March 2025 (UTC)

That's a Wikipedia problem so you should take it up with them. Maybe m:Help:Unified_login is a good start? Tactica (talk) 21:59, 28 March 2025 (UTC)
@MD Edit 123 What happens if you attempt to login to english wikipedia then ? —TheDJ (Not WMF) (talkcontribs) 21:25, 31 March 2025 (UTC)

Question - edits made through extension are not marked as patrolled

Hi. I'm developing an extension for a private MediaWiki-based site, and I'm facing an issue with the function that performs edits via the extension.

private function removeImage($filename) {
    try {
        $services = MediaWikiServices::getInstance();
        $dbr = $this->loadBalancer->getConnection(DB_REPLICA);
        $pagesModified = [];
        
        $res = $dbr->select(
            'imagelinks',
            'il_from',
            ['il_to' => str_replace(' ', '_', $filename)],
            __METHOD__
        );
        
        foreach ($res as $row) {
            $title = Title::newFromID($row->il_from);
            if (!$title) {
                continue;
            }
            
            $wikiPageFactory = $services->getWikiPageFactory();
            $page = $wikiPageFactory->newFromTitle($title);
            $content = $page->getContent();
            
            if (!$content) {
                continue;
            }
            
            $text = $content->getText();
            
            $text = $this->removeImageFromText($text, $filename);
            
            $updater = $page->newPageUpdater($this->getUser());
            $updater->setContent(SlotRecord::MAIN, new WikitextContent($text)); 
            $updater->saveRevision(
                CommentStoreComment::newUnsavedComment('Removing image'),
                EDIT_MINOR | EDIT_FORCE_BOT
            );
            
            $pagesModified[] = $title->getPrefixedText();
        }
        
        return $pagesModified;
    } catch (\Exception $e) {
        wfLogWarning('Error removing image: ' . $e->getMessage());
        return [];
    }
}

The problem is that edits made through the extension are not marked as patrolled, even when the user performing the edit has the autopatrol flag (e.g., a user with the sysop right). I've searched extensively but haven't been able to find a solution.

Does anyone know how I should handle this, or can anyone point me to someone who could explain how to resolve it?

Thanks! 2A01:6502:A97:31E5:2839:F0F8:F46D:E0B0 09:20, 31 March 2025 (UTC)

You'll want to call $updater->setRcPatrolStatus with an appropriate flag, note that this function does not check user permissions - you need to implement that logic yourself. See https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/Storage/PageUpdater.php$385 86.23.109.101 09:42, 31 March 2025 (UTC)
Also, don't do str_replace(' ', '_', $filename)] Instead, use the Title class and then use getDBKey() method on it, to get the escaped value of the title. —TheDJ (Not WMF) (talkcontribs) 21:23, 31 March 2025 (UTC)

I need to migrate and update an old mediawiki version from one server to another.

we have a mediawiki 1.26 on RHEL 7 and I need to migrate it to RHEL 8.

I see that I need to upgrade it step by step. but I couldn't find where to download 1.27. To which version should I upgrade my mediawiki first? Dinirfl (talk) 20:59, 31 March 2025 (UTC)

You can find all patch release version of 1.35 (the highest you can upgrade to in one go) at https://releases.wikimedia.org/mediawiki/1.35 Update core first the last version of the 1.35 series, then extensions (to the same release version), then go to the next LTS version and work your way up as far as you can. —TheDJ (Not WMF) (talkcontribs) 21:18, 31 March 2025 (UTC)

How can I add a donate link on my MediaWiki website at the top right just like on this website? I have looked at Manual:Interface/Sidebar and Manual:Hooks/SkinTemplateNavigation::Universal but have no idea what code I need. Can someone provide some code I can copy and paste to add the donate link to the left of the create account link? 5.81.220.99 10:36, 2 April 2025 (UTC)

ShellboxError is displayed after uploading a photo

Hi. I updated MediaWiki from 1.42.1 to 1.43.0 and it seems that everything is fine, but unfortunately I get the „Shellbox\ShellboxError” after uploading a photo or after going to the file list.

Internal error

[eb4267a529fee34821c78831] 2025-04-01 19:25:37: Fatal exception of type 'Shellbox\ShellboxError'

I added this code to LocalSettings.php file:

$wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 );

And such errors are displayed:

[204def52a57fb5f0fc51169d] /wiki/index.php/Specjalna:Pliki Shellbox\ShellboxError: proc_open() failed

Backtrace:

from /home/host.../domains/mywiki.pl/public_html/wiki/vendor/wikimedia/shellbox/src/Command/UnboxedExecutor.php(251)

#0 /home/host.../domains/mywiki.pl/public_html/wiki/vendor/wikimedia/shellbox/src/Command/UnboxedCommand.php(29): Shellbox\Command\UnboxedExecutor->execute()

#1 /home/host.../domains/mywiki.pl/public_html/wiki/includes/shell/Command.php(215): Shellbox\Command\UnboxedCommand->execute()

#2 /home/host.../domains/mywiki.pl/public_html/wiki/includes/GlobalFunctions.php(1562): MediaWiki\Shell\Command->execute()

#3 /home/host.../domains/mywiki.pl/public_html/wiki/includes/GlobalFunctions.php(1592): wfShellExec()

#4 /home/host.../domains/mywiki.pl/public_html/wiki/includes/media/BitmapHandler.php(281): wfShellExecWithStderr()

#5 /home/host.../domains/mywiki.pl/public_html/wiki/includes/media/JpegHandler.php(192): BitmapHandler->transformImageMagick()

#6 /home/host.../domains/mywiki.pl/public_html/wiki/includes/media/TransformationalImageHandler.php(255): JpegHandler->transformImageMagick()

#7 /home/host.../domains/mywiki.pl/public_html/wiki/includes/filerepo/file/File.php(1348): TransformationalImageHandler->doTransform()

#8 /home/host.../domains/mywiki.pl/public_html/wiki/includes/filerepo/file/File.php(1288): File->generateAndSaveThumb()

#9 /home/host.../domains/mywiki.pl/public_html/wiki/includes/specials/pagers/ImageListPager.php(464): File->transform()

#10 /home/host.../domains/mywiki.pl/public_html/wiki/includes/pager/TablePager.php(189): MediaWiki\Pager\ImageListPager->formatValue()

#11 /home/host.../domains/mywiki.pl/public_html/wiki/includes/pager/IndexPager.php(564): MediaWiki\Pager\TablePager->formatRow()

#12 /home/host.../domains/mywiki.pl/public_html/wiki/includes/pager/IndexPager.php(601): MediaWiki\Pager\IndexPager->getRow()

#13 /home/host.../domains/mywiki.pl/public_html/wiki/includes/pager/TablePager.php(100): MediaWiki\Pager\IndexPager->getBody()

#14 /home/host.../domains/mywiki.pl/public_html/wiki/includes/specials/SpecialListFiles.php(129): MediaWiki\Pager\TablePager->getFullOutput()

#15 /home/host.../domains/mywiki.pl/public_html/wiki/includes/specialpage/SpecialPage.php(728): MediaWiki\Specials\SpecialListFiles->execute()

#16 /home/host.../domains/mywiki.pl/public_html/wiki/includes/specialpage/SpecialPageFactory.php(1724): MediaWiki\SpecialPage\SpecialPage->run()

#17 /home/host.../domains/mywiki.pl/public_html/wiki/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#18 /home/host.../domains/mywiki.pl/public_html/wiki/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()

#19 /home/host.../domains/mywiki.pl/public_html/wiki/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()

#20 /home/host.../domains/mywiki.pl/public_html/wiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#21 {main} Monocero (talk) 19:38, 1 April 2025 (UTC)

The software tries to run the imagemagick command but PHP is not allowing it to run, or does not have the required access/permissions that allows it to run the external binary/program. —TheDJ (Not WMF) (talkcontribs) 20:27, 1 April 2025 (UTC)
I found out what was causing this error. In the domain settings in the hosting management panel, I had isolation enabled for the domain. Isolation restricts PHP access. When I disabled isolation for the domain, the error disappeared. If I wanted to enable isolation for the domain, is there a way to configure it so that it doesn't affect my Wiki? Monocero (talk) 19:39, 3 April 2025 (UTC)

Missing path in Php

Hello

I installed Xampp and mediawiki 1.43.0. Everything was installed normally in the htdocs files, in a wikimedia file. The database was also created. However, when I type localhot/mediawiki/ in my browser, I get the following error message:

Warning: require_once(C:\xampp\htdocs\mediawiki/includes/PHPVersionCheck.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\mediawiki\index.php on line 47

Fatal error: Uncaught Error: Failed opening required 'C:\xampp\htdocs\mediawiki/includes/PHPVersionCheck.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\mediawiki\index.php:47 Stack trace: #0 {main} thrown in C:\xampp\htdocs\mediawiki\index.php on line 47

Do you have any idea what I should do to fix my problem?

Thank you for your attention.

Matt Lewlyn157 (talk) 08:47, 1 April 2025 (UTC)

As you are running on Windows, please check if the file system access permissions for this particular file are properly set (readable by the user that runs the Apache process)
Also confirm that this file really exists in the file system. Maybe there was an error during the installation. Osnard (talk) 12:19, 4 April 2025 (UTC)

phpinfo()

Is there a way to get MW to run phpinfo() and display the result on a page? Gerdesj (talk) 01:05, 2 April 2025 (UTC)

No, not really. In general, the output of phpinfo() can contain sensitive information and should not be made public.
If you really need it, create a file info.php in the installation path of MediaWiki (where the index.php is located) with
<?php phpinfo();
Make sure to protect the file from unauthorized access in your webserver configuration. Osnard (talk) 12:17, 4 April 2025 (UTC)

LDAP2 Authentication failing randomly/for specific users

Hi there -

I'm encountering a weird problem where:

  • LDAP authentication is not triggered for some users, but others work perfectly well
  • When entering the wrong password for the affected users, authentication sometimes triggers (and produces the obvious result that the user could not be authenticated)

Here are the details:

  • I'm using MediaWiki 1.43 with PluggableAuth and LDAP2 Authentication (and nginx as web server).
  • Configured according to manual page and tested - the maintenance scripts CheckLogin and ShowUserGroups produce the expected results.
  • I'm Logging the authentication process through:
$wgDebugLogGroups['PluggableAuth'] =

$wgDebugLogGroups['LDAP'] =

$wgDebugLogGroups['MediaWiki\\Extension\\LDAPProvider\\Client'] =

$wgDebugLogGroups['LDAPProvider'] =

$wgDebugLogGroups['LDAPGroups'] =

$wgDebugLogGroups['LDAPUserInfo'] =

$wgDebugLogGroups['LDAPAuthentication2'] =

$wgDebugLogGroups['LDAPAuthorization'] = '/var/log/mediawiki/ldap.log';
  • When tailing the log, login attempts create the expected entries for some users, but not for others (or only randomly and only when the wrong password is entered).

I've looked at the various pages related to LDAP authentication, but could not find anything that would remotely resemble this problem or provide a solution.

Any help greatly appreciated!

Thanks, Christian Deckob (talk) 08:18, 3 April 2025 (UTC)

Try disabling the LDAP extension's cache like this:
$LDAPProviderCacheType = CACHE_NONE;
Maybe there are some fragments in the cache. Could the LDAP server connection be unreliable? Osnard (talk) 12:13, 4 April 2025 (UTC)

Wikipedia error

I tried to access wikipedia and got this error. I do not have access to local settings.php.

MediaWiki internal error.

Original exception: [edcb53df-aee7-4f68-a2f3-8948517f3184] 2025-04-04 13:12:31: Fatal exception of type "Wikimedia\Rdbms\DBUnexpectedError"

Exception caught inside exception handler.

Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.


2600:4808:5F2:7400:81BC:61E7:807A:B7F9 13:17, 4 April 2025 (UTC)

This is probably phab:T389734 or phab:T391099. 86.23.109.101 15:58, 4 April 2025 (UTC)

How to change the default active filter in special:recentchanges? (for all users of my wiki)

Hi. Sorry if this is a trivial question, but I've looked through the RecentChanges manuals and I can't find any information. I'm a wiki administrator (v1.43) and I see that, for example, when a user who hasn't set up a default filter yet enters Mediawiki, the default active filter is Human (not bot)/Not in translation namespaces/Page edits/Page creations/Logged actions/Account creations. On en.Wikipedia it's a different one, and on my wiki it's just Human (not bot). Of course, after the default filter, each user can change it however they like, but the fact that it appears Human (not bot) for everyone at the start is so basic—and I'm sure most users won't change it. Where can I change this initial/default filter? Antawaylla 21:39, 4 April 2025 (UTC)

Odd additional linebreak, include + table + #if:.

I'm kinda drawing a blank on this.

  • Include part without #if part: also no additional blank line.
  • include part without table part: also no additional blank line.

o?O

<onlyinclude><includeonly>{{#if:x|{{{!}} class="wikitable"
!wikitable-C
{{!}}}|}}</includeonly></onlyinclude>
===aaa===

{{:{{FULLPAGENAME}}}}<!-- no additional preceding blank line. "...</h3><table>..."-->

bbb

{{:{{FULLPAGENAME}}}}<!-- ???  results in additional preceding blank line spacing. "...bbb</p><p><br></p><table>..." -->

ccc

{| class="wikitable"<!-- no additional preceding blank line. "...ccc</p><table>..."-->
!wikitable-L1
|}

ddd

{{#if:x|{{{!}} class="wikitable"<!-- no additional preceding blank line. "...ddd</p><table>..."-->
!wikitable-L2
{{!}}}|}}

MvGulik (talk) 00:09, 5 April 2025 (UTC)

Have a look at the HTML produced to help work it out.
After headings you'll not get any extra blank lines by leaving one blank line in the wikitext. I think it just starts a new p tag with or without that line.
One blank line between paragraphs (e.g. between bbb and the following link) produces a new p tag, as far as I remember. Jonathan3 (talk) 22:56, 7 April 2025 (UTC)

Parameter inside of infobox template with existing string

Hello,

How would I pass a parameter in the image property of an infobox template with existing text (I have a plugin for the iFrame things, those work just fine in the image property)? I want something like:

{{Infobox

| image = <iframe src="{{{url}}}"></iframe>

}}

And then, in the final wiki page:

{{Infobox Template

| url = something

}}

However, this doesn't work. It shows directly as <iframe src="{{{url}}}"></iframe> on the wiki page, instead of being interpreted in the wiki page. How could I get this done? 2001:1600:16:10:0:0:0:6B9 13:10, 6 April 2025 (UTC)

What does your infobox template do with the image parameter? For example infoboxes on wikipedia will attempt to display an uploaded file, they don't take arbitrary wikitext input strings. 86.23.109.101 16:28, 6 April 2025 (UTC)
I can't follow the structure of what you have so far, but would it work to have | image = https://www... on the page, and have the iframe stuff in the template? Jonathan3 (talk) 22:59, 7 April 2025 (UTC)
Does it work if you use the tag parser function to invoke the iframe? e.g.
{{Infobox
| image = {{#tag: iframe | src={{{url}}} }}
}}
Sam Wilson 03:13, 8 April 2025 (UTC)

Notifications on Support Desk don't work

I see that there is a new Support Desk on MediaWiki. My question is: if someone replies to my thread, why am I not getting a notification? Here in the panel are Notifications (bell), but there I do not receive a notification. On the old Support Desk I received a notification there. Monocero (talk) 19:52, 3 April 2025 (UTC)

@Monocero If you enable the "Automatically subscribe to topics" option within your account's preferences, you should automatically receive notices (viewable on desktop under the OOUI tray icon icon) for replies in any future threads you create. Help:DiscussionTools § Topic subscriptions has some more information which you may find helpful :) All the best, ‍—‍a smart kitten[meow] 21:00, 3 April 2025 (UTC)
Thank you for the information, I received a notification in the bell icon when you answered my post. However, I did not receive a notification in this icon.
File:OOjs UI icon tray.svg Monocero (talk) 08:17, 5 April 2025 (UTC)
That notification was under the bell icon because I 'mentioned' you by linking your username, to make sure that you were notified about my reply. These types of notifications (where you're 'mentioned' in someone's comment) appear under the bell icon, while replies in a thread you're subscribed to (but aren't mentioned in) appear under the tray icon :) Best,‍—‍a smart kitten[meow] 11:33, 7 April 2025 (UTC)
Thanks for the information, I also understand that I can subscribe to the thread by clicking on Subscribe.
Why is it not possible to edit the post here? Now when I add this post I can't edit it. Monocero (talk) 08:23, 5 April 2025 (UTC)
You should be able to edit your post/comments (as part of the overall thread) by clicking the [ edit ]/[ edit source ] link at the right of this topic's title; however, it's unfortunately not currently possible to edit specific comments using DiscussionTools (in case you're interested, there's a feature request open for this functionality at phab:T245225). Best, ‍—‍a smart kitten[meow] 11:49, 7 April 2025 (UTC)
I can edit the comment when editing my whole thread. I understand - hopefully this feature will be implemented so that editing comments becomes possible. Monocero (talk) 19:11, 8 April 2025 (UTC)

User modification of VE edit bar

Is it possible that the user of a certain wiki adds functions to VisualEditor edit bar by modificating thier *.js file? Any documentation or examples of the code? Juandev (talk) 20:24, 7 April 2025 (UTC)

Www.google.com@Juandev Patrik41 2F (talk) 22:36, 7 April 2025 (UTC)
@Juandev VisualEditor/GadgetsTheDJ (Not WMF) (talkcontribs) 12:07, 8 April 2025 (UTC)

Log in using MWClient

I am trying to log into and update my mediawiki site using MWClient, it works perfectly well with the following to my docker site, but when I try to log onto my domain name site, it has this enigmatic problem:


[2025-04-08 20:25:16,493] INFO:Attempting to log in...

[2025-04-08 20:25:16,494] DEBUG:Starting new HTTPS connection (1): [mysite]:443

[2025-04-08 20:25:17,675] DEBUG:[mysite].com:443 "GET /api.php?meta=siteinfo%7Cuserinfo%7Cuserinfo&siprop=general%7Cnamespaces&uiprop=groups%7Crights%7Cblockinfo%7Chasmsg&continue=&action=query&format=json HTTP/1.1" 200 None

[2025-04-08 20:25:18,106] DEBUG[mysite]:443 "POST /api.php HTTP/1.1" 200 None

[2025-04-08 20:25:18,668] DEBUG[mysite]:443 "POST /api.php HTTP/1.1" 200 None

[2025-04-08 20:25:18,668] DEBUG:Sleeping for 0 seconds

[2025-04-08 20:25:19,214] DEBUG:[mysite]:443 "POST /api.php HTTP/1.1" 200 None

[2025-04-08 20:25:19,215] DEBUG:Sleeping for 30 seconds

[2025-04-08 20:25:49,754] DEBUG:[mysite]:443 "POST /api.php HTTP/1.1" 200 None

[2025-04-08 20:25:49,754] DEBUG:Sleeping for 60 seconds


The code to get me there is as follows:

    site = mwclient.Site('[mysite]', path='/', scheme='https')

    site.login(username, password)


The ai is normally pretty good at this but its failed to diagnose the problem so I need to ask real experts it seems. The ai suggested that there was rate throttling going on, but I turned that off in localsettings.php, also it seems odd, anyway, I'm out of ideas and hope someone here can help. Zarathustrared (talk) 08:37, 8 April 2025 (UTC)

@Zarathustrared The AI is failing because both we and the AI do not have enough information. There is no error or warning listed here, so not sure what the problem is, but you will have to gather more information. —TheDJ (Not WMF) (talkcontribs) 12:06, 8 April 2025 (UTC)
Hi thanks for the reply, that is exactly the problem I can't get more information, it just won't tell me where its going wrong. I hoped someone would know but it looks like its just not possible to solve without considerable technical expertise, and honestly I've had it with this approach. I will try pywikibot instead even if it means I have to rewrite my scripts. Zarathustrared (talk) 00:09, 9 April 2025 (UTC)
Ok, the problem, maybe predictably was OATHAuth, pywikibot showed the error the first time I tried, mwclient just silently fails without giving an error. Just so you know if someone makes this foolish mistake in the future. Zarathustrared (talk) 00:23, 9 April 2025 (UTC)

License "<name>" does not exist on upload page

I am working on setting up a new wiki, which of course includes copying various templates and modules from Wikipedia. As part of this of course I'll need to upload icons, etc. I already edited Mediawiki:Licenses and have started adding some of the templates for the various licenses. However, I've noticed when I select a license on the upload page, below the template I see red text saying (for example): 'The license "cc-by-sa-4.0" does not exist'. How do I fix this? I don't want to upload any files until I have a way to properly indicate their licensing, even if it's just icons from Wikipedia templates.

Wiki URL: https://www.archiepedia.org Oldiesmann (talk) 23:42, 6 April 2025 (UTC)

Following your example you should double check that you have template:cc-by-sa-4.0 in your wiki. If that's not it and the syntax of your MediaWiki:Licenses page is correct you should probably enable debugging in LocalSettings.php to see what's going on. Tactica (talk) 20:08, 9 April 2025 (UTC)
Yeah, that was the problem. I figured it out and added the appropriate license. Oldiesmann (talk) 01:18, 10 April 2025 (UTC)

Delete my user account

i want to delete my acount. How can do this? P.sanzotta (talk) 11:30, 9 April 2025 (UTC)

You don't specify a context (this site, Wikipedia, a third party wiki, etc.), but this is probably relevant. Tactica (talk) 19:23, 9 April 2025 (UTC)

Extension:SideBarMenu is not working

Hi,

I am testing the new MW 1.43 LTS and found that Extension:SideBarMenu is not working, which is very important extension in our private wiki. It throws below error:

PHP Deprecated:  Accessing $wgHooks directly is deprecated, use HookContainer::getHandlers() or HookContainer::register() instead. [Called from {closure} in /var/www/html/mw143/extensions/SideBarMenu/SideBarMenu.php at line 81]

Can anyone suggest how to make it work on MW 1.43 ?

Thanks,

GT Testergt1302 (talk) 14:24, 9 April 2025 (UTC)

The maintainer of SideBarMenu will have to update the extension. In the mean time, if this is for a non-developer deployment, you can disable deprecation warnings in php.ini. error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATEDTheDJ (Not WMF) (talkcontribs) 14:39, 9 April 2025 (UTC)
Hi, Thanks for the reply.
But this would just suppress the warning right? does it help to make the extension work ?
Sidebarmenu was archived long back. but some developer is maintaining it and still not released for MW 1.43. Testergt1302 (talk) 06:18, 10 April 2025 (UTC)

PERMISSION

Please, I would like to request the flags of autoconfirmed and autopatrol. Thanks. Jalu Jaluj (talk) 18:59, 9 April 2025 (UTC)

In its default configuration, MediaWiki already promotes accounts to autoconfirmed when they match certain criteria. This is true at least for Wikipedia and this site. See also Project:Autoconfirmed users. As a last resort you should ask in Project:Requests for permissions. Tactica (talk) 19:51, 9 April 2025 (UTC)

Remove heading from TOC

How do I hide a heading from the TOC? I have tried using HTML tags without the slash in the closing tag, but it did not work. My current version is 1.31. 71.62.121.25 23:00, 9 April 2025 (UTC)

LocalSettings.php

Hallo, in der neuesten Version 1.43.1 wird die LocalSettings.php in diesem Bereich

## The URL paths to the logo.  Make sure you change this from the default,

## or else you'll overwrite your logo when you upgrade!

$wgLogos = [

'1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",

'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",

];

fehlerhaft ausgegeben, indem der Passus in eckige Klammern gesetzt ist und die Darstellung des Favicon behindert.

Regards Klaus 91.52.223.141 07:41, 11 April 2025 (UTC)

Nach ⚓ T391673 1.43.1 LocalSettings.php logo/icon section displayed incorrectly verlagert !

Regards Klaus

Translating is not working

Hello support

I have created a page "Test08" in my wiki and i have translated this page into hindi as Test08/hi. But when i am going to access this translated page its not showing into translated page and showing this message

Test08/hi

Jump to navigationJump to search

There is currently no text in this page. You can search for this page title in other pages, search the related logs, or create this page.


But i have translated this page.

i have done all the neccessary configuration in the Mediawiki but translated page is not showing.

Please suggest what is the issue.

Thanks Gaurav.singhEbizon (talk) 14:20, 8 April 2025 (UTC)

Please see "Post a new question" above and provide basic info. Which exact version of the Translate extension is installed (see the Special:Version page)? What does "i have done all the neccessary configuration in the Mediawiki" mean exactly, without paraphrasing? Malyacko (talk) 16:30, 8 April 2025 (UTC)
Hello @Malyacko
I am using Translate version this "version": "2022-01-19". I think version is not issue because i am using the same version in my other website and translate is working fine in this website.
I am using following version of the MediaWiki and php
MediaWiki- 1.38.2
Php - 8.3.17
I have done all the necessary configuration in LocalSettings.php file.
Please solve and suggest how can i solve this my translate issue Also suggest how can i debugg the issue.
Thanks Gaurav.singhEbizon (talk) 12:21, 9 April 2025 (UTC)
Hi @Malyacko
Any update on this matter?
Thanks Gaurav.singhEbizon (talk) 08:39, 11 April 2025 (UTC)
Hello @Malyacko
I have done the same action on the old and the new site and below are the page creation logs. The thing is that it does not create the Test11/es part.
Version page is listed below
New site ( Not working)
10:27, 11 April 2025 FuzzyBot talk contribs created page Test11/en (Updating to match new version of source page)
10:27, 11 April 2025 FuzzyBot talk contribs created page Translations:Test11/1/en (Importing a new version from external source)
10:27, 11 April 2025 FuzzyBot talk contribs created page Translations:Test11/Page display title/en (Importing a new version from external source)
10:26, 11 April 2025 Wim talk contribs created page Translations:Test11/1/es (Created page with "Hola")
10:26, 11 April 2025 Wim talk contribs created page Translations:Test11/Page display title/es (Created page with "Testos11")
10:25, 11 April 2025 Wim talk contribs created page Test11 (Created page with "<translate> Hello </translate>")
Old site (working)
10:34, 11 April 2025 Wim talk contribs created page Translations:Test11/1/es (Created page with "Hola")
====> 10:34, 11 April 2025 Wim talk contribs created page Test11/es (Created page with "Testos11")
10:34, 11 April 2025 Wim talk contribs created page Translations:Test11/Page display title/es (Created page with "Testos11")
10:34, 11 April 2025 FuzzyBot talk contribs created page Test11/en (Updating to match new version of source page)
10:34, 11 April 2025 FuzzyBot talk contribs created page Translations:Test11/1/en (Importing a new version from external source)
10:34, 11 April 2025 FuzzyBot talk contribs created page Translations:Test11/Page display title/en (Importing a new version from external source)
10:33, 11 April 2025 Wim talk contribs created page Test11 (Created page with "<translate> Hello </translate>")
Installed software
Product     Version
MediaWiki     1.38.2
PHP     8.3.20 (fpm-fcgi)
MySQL     8.0.41-0ubuntu0.24.04.1
ICU     74.2
Elasticsearch     6.8.23 86.95.34.245 11:24, 11 April 2025 (UTC)

Creating custom skins

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)

@RuzDD Manual:How to make a MediaWiki skinTheDJ (Not WMF) (talkcontribs) 16:10, 11 February 2025 (UTC)
Thanks, I will write here if I have problems. RuzDD (talk) 19:40, 11 February 2025 (UTC)
@TheDJ The links I saw don't help, how can I install or enable intl? RuzDD (talk) 19:56, 11 February 2025 (UTC)
@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)
@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)
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)
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)
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)
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)
@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)
@wargo Can you help me about that? RuzDD (talk) 18:08, 23 February 2025 (UTC)
Note: A bot archived this topic disruptively and I undid it. RuzDD (talk) 14:22, 10 March 2025 (UTC)
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)
@Brooke Vibber Can you help me about that? RuzDD (talk) 16:10, 22 March 2025 (UTC)
@RuzDD I want to create my own MW skins and use them in WMF wikis Before you go any further or spend any more time on this you should know that this is basically impossible. To get a skin deployed on the WMF servers you need to a) Find a team of developers within the WMF who are willing to sponsor the skin and offer tech support and bug fixes b) show that there is a community consensus across multiple projects that this skin should be installed c) write the extension to a professional standard and following WMF coding conventions and best practices d) pass a security review and e) pass a usability review. See Writing an extension for deployment
I think you are going to struggle at every step of this process. a) The WMF does not have enough developers to look after all the extensions currently installed - you are really going to struggle to find a team willing to take stewardship of this skin. The WMF has also been very reluctant to support more skins, as it makes development and testing more difficult. b) Unless your skin meets a demand from multiple projects I think you are going to struggle to get a community consensus to install it. c) I hope this doesn't come across as rude, but if you are struggling to install the PHP development environment and don't know what templates are I doubt the code you write is going to be usable in a production environment. d) the security review process is extremely backlogged - there are several extensions that have been waiting for over a year for a review, see also my comments on c). d) Unless you have some experience with web design I think it is unlikely that your skin will pass a usability review - does the skin work across a variety of browsers and devices? Is the HTML it produces valid and semantically correct? Is it accessible to things like screen readers? Would it be easy for other people using the skin to figure out where everything is?
If these customisations are just for you to use then writing a new skin is fundamentally the wrong approach. Using user scripts and CSS is probably the best approach, if that doesn't offer enough customisation perhaps look into writing a standalone app and fetching the data you need from the API? 86.23.109.101 11:08, 28 March 2025 (UTC)
Thank you. I think writing a standalone frontend and fetching the data from the API might be best option for now, any guides or help about this? And can't an operation be started to make the content-side stylings flexible for customizations (as being designed so that different stylings including fonts, content area BG / box BG / text colors, borders, shadows, and margins / paddings can be directly applied without breaking anything, just as being controlled entirely by the skin)? RuzDD (talk) 15:15, 29 March 2025 (UTC)
any guides or help about this? There's a load of documentation on the APIs available at API, you probably want to use the rest API to build your app, see https://en.wikipedia.org/api/rest_v1/ for the WMF specific version, or API:REST API/Reference for the general Mediawiki one.
can't an operation be started to make the content-side stylings flexible for customizations ... it should be possible to customise the site design with JavaScript, but you need to do it in the right way. Stable interface policy/Frontend tells you which bits of the interface are considered to be stable (and should therefore be safe to target with JavaScript or CSS) and which bits are not. Generally you should use the mw JavaScript object to make your modifications (see https://doc.wikimedia.org/mediawiki-core/master/js/mw.html). 86.23.109.101 07:47, 31 March 2025 (UTC)
Thank you. I'll further look at these and related stuff when I have time. RuzDD (talk) 18:05, 12 April 2025 (UTC)

foreach error from MimeAnalyzer

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) 13:04, 12 April 2025 (UTC)

Trailing zeroes in output

Is there a way to fix the number of fractional digits, including trailing zeroes, in parser function output? In particular I would like to keep trailing zeroes from #expr. Ham Pastrami (talk) 08:26, 12 April 2025 (UTC)

Give us an example :-) Jonathan3 (talk) 22:21, 13 April 2025 (UTC)

neartitle:"San Francisco" nearcoord:37.776,-122.39

what's the default distance in these search examples from Help:CirrusSearch#Geo_Search? for https://commons.wikimedia.org/ . RoyZuo (talk) 07:09, 14 April 2025 (UTC)

[RESOLVED] Sortable tables no longer working?

In my wiki, sortable tables have stopped sorting---clicking on the arrows in the header does nothing. They certainly worked in the past, and I have no idea when exactly this happened. Sortable tables work fine in wikipedia and in this wiki. Looking for some ideas on what's wrong.

My wiki: https://horawiki.org/

Example failing page: https://horawiki.org/page/Original_Music (but AFAIK sortable tables fail everywhere)

MediaWiki version: 1.42.3

Browsers tested: Brave, Safari

Larrydberg (talk) 20:47, 14 April 2025 (UTC)

There are some errors there (e.g. typing F12 on Chrome). The second URL gives details of this error: Error: Class "ResourceLoaderModule" not found. https://horawiki.org/load.php?lang=en-gb&modules=startup&only=scripts&raw=1&skin=vector. I don't know the answer though. Maybe it would be worth checking your skin is up to date, or downloading the MediaWiki core files again? Jonathan3 (talk) 00:27, 15 April 2025 (UTC)
Many thanks, Jonathan3. From the backtrace I found that ResourceLoaderModule, which was deprecated in 1.39 and completely removed in 1.42, was still being used in the (old) version of UniversalLanguageSelector that I had. Updating that extension fixed everything. (Tracing the connection between ULS and sortable tables is more than I care to handle, but no doubt it's just order of loading, with ULS aborting before something important gets its turn.) Thanks again. (Now: Not sure what to do about a resolved issue, so I'm just fixing the title.)
Larrydberg (talk) 17:03, 15 April 2025 (UTC)

Syntax when protecting pages for a non-standard length of time

I'm a bureaucrat at Wikispecies and an administrator at Swedish Wikivoyage and Wikimedia Sweden (WMSE). When protecting a page on any of those wikis I'm faced with the option to protect it for a fixed period of time (one week, one month, "infinitely" etc.), but there's also an option to chose "Other time" by entering code into a text box. However, I can't seem to find any information about how this command should be formatted, nor anything about the preferred date format and such. I've looked in Help:Protected pages and similar MediaWiki help pages, but struck no luck. (Most Meta-Wiki pages on the subject simply soft-redirects to MediaWiki). Even though protecting pages is (and should be) a fairly rare event, any help would be much appreciated. –Best regards, Tommy Kronkvist (talk), 19:19, 16 April 2025 (UTC).

How do I change the article content's background color by assigned category?

I tried to use Ciencia Al Poder's Snippets/Style pages based on categories, and modified it to work with the article's content background but it didn't work.

I tried something like this:

/** * Adds CSS classes to the body tag based on the categories this page belongs to * * @source * @revision 2016-01-18 */ (function($, mw) { var fn = function() { var cats = mw.config.get('wgCategories'), newClasses; if (cats) { newClasses = $.map(cats, function(el) { return 'cat-' + encodeURIComponent(el.replace(/[ .]/g, '_')).replace(/%/g, '_'); }).join(' '); $(document.body).addClass(newClasses); } }; if (document.body) { fn(); } else { $(fn); } })(jQuery, mw); WongIsNotOK (talk) 17:26, 21 April 2025 (UTC)

Quickstart

I just became an interface administrator of Tagalog Wiktionary. The only admin before me has been very inactive in the site for around a decade now. I'm now lost. I want to begin with UI changes but the MediaWiki FAQ says I should have SSH access or something but how do I have those? How do I run automation bots as well? And how do I know the mediawiki version of the site? Can I upgrade it? Ysrael214 (talk) 11:09, 23 April 2025 (UTC)

SSH access is mainly a means to upgrade the MediaWiki software when it's running on a remote server. Fortunately you don't need any of that because the WMF takes care of upgrades for you. To check the version of MediaWiki you're working with you take a look in Special:Version. For bots, see Manual:Bots. Being an interface admin, I presume you also want to take a look at Manual:CSS and probably to the CSS code used by other chapters of Wiktionary. Tactica (talk) 00:02, 24 April 2025 (UTC)

Embedding a Google Form into my Miraheze wiki page

Need permissions to embed HTML on your wiki page. I tried to embed HTML code generated for my GOOGLE Form. But it's not working. Please help. Jeetudas (talk) 19:03, 3 April 2025 (UTC)

You could try Extension:Widgets. Jonathan3 (talk) 20:24, 3 April 2025 (UTC)
Afraid not. Widgets has been disabled on MH since late December 2020 over security concerns. The only way out is through highly intricate custom JS on your own domain, which not everyone (this wiki-veteran included!) has prolonged experience or confidence with. --Slgrandson (talk) 01:41, 18 April 2025 (UTC)
Thanks. I'd not heard about that, but am currently using the Widgets extension on my own wiki. I've asked for further details on the extension talk page: https://www.mediawiki.org/wiki/Extension_talk:Widgets#Extension_update_since_Miraheze_%222020-12-23_Security_Disclosure%22? Jonathan3 (talk) 20:17, 24 April 2025 (UTC)
@Jeetudas For security reasons only specific bits of HTML are allowed to be used in wiki pages, see Help:HTML in wikitext. You would need to ask the Miraheze system administrators for help, though I suspect they will not allow this for security reasons. Could you not just provide a link to the form? 86.23.109.101 12:55, 4 April 2025 (UTC)

Diff API for comapring 2 texts (not existing pages)?

I'm writing a userscript for editing a page. I let users compose text before saving. So I want to compare 2 text (multi-row) strings with the MW's internal diff logic as it is better than other open source libraries.

How can I pass two text strings to the Diff API? All I found is API:Compare which requires existing pages. Subfader (talk) 13:31, 24 April 2025 (UTC)

@Subfader There is indeed no arbitrary string comparison service inside MediaWiki. —TheDJ (Not WMF) (talkcontribs) 07:51, 25 April 2025 (UTC)

Discussion at Extension_talk:CategoryTree#Suppressing_"no_subcategories"

 You are invited to join the discussion at Extension_talk:CategoryTree#Suppressing_"no_subcategories". Sdkbtalk 18:45, 24 April 2025 (UTC)

Safe to clear mw_objectcache?

I am encountering the known bug with sessions data loss when setting $wgMainCacheType to CACHE_ACCEL. I added $wgSessionCacheType = CACHE_DB; to store the session data in the database to go around this issue. Now I am wondering if I should clear the table mw_objectcache to remove old cache which should now be handled by APCu. I don't really mind to log out all users with this move, but I could also just delete all non-session files. Is this safe to do? Or is it maybe unnecessary 'cause it'll clear itself over time? I had $wgMainCacheType set to CACHE_NONE for years until now. DonnyPro (talk) 12:00, 11 April 2025 (UTC)

Yes, from my experience the object cache can be cleared at any time. But it should not be necessary. Osnard (talk) 14:48, 25 April 2025 (UTC)

Fediverse Creator meta tag

Wiki: https://joinfediverse.wiki Version: 1.41.0

Hi, Mastodon has a feature where you can make sure your profile is linked to with every link to your homepage on the Fediverse. You can see an example here: https://fedi.at/@FediverseFoundation/114065155360271846 On the bottom of the link preview it says "Mehr von Fediverse Foundation" which links back to the same profile that posted the post in that case. I'd like to do that with my wiki's Fediverse profile.

Mastodon's simple instruction is to put the following html code on the website (either in every article or somehow globally):

<meta name="fediverse:creator" content="@JoinFediverseWiki@climatejustice.social">

Where can I put that in my wiki so it will work with every article on the wiki? Do I need an extension for it? PKFP (talk) 18:19, 19 April 2025 (UTC)

@PKFP You can write a hook in your localsettings.php that hooks into something like Manual:Hooks/BeforePageDisplay adding a setMeta to every single pageview. —TheDJ (Not WMF) (talkcontribs) 08:12, 21 April 2025 (UTC)
Hey, thanks for your tip. Could you explain this a bit further? I forwarded it to the tech person for the wiki, but he didn't get it yet. PKFP (talk) 06:26, 24 April 2025 (UTC)
@PKFP Something like this in LocalSettings.php might work, using the BeforePageDisplay hook, $wgHooks & OutputPage::addMeta():
$wgHooks["BeforePageDisplay"][] = function($out, $skin) {
    $out->addMeta("fediverse:creator", "@JoinFediverseWiki@climatejustice.social");
};
(disclaimer: this code comes with no warranty, etc.!)
Best, ‍—‍a smart kitten[meow] 20:28, 25 April 2025 (UTC)
Maybe this would be a suitable addition to Extension:WikiSEO? It might be worth raising a feature request for that (it used to support twitter:creator). Sam Wilson 09:16, 21 April 2025 (UTC)
Thanks, I'll try. PKFP (talk) 06:26, 24 April 2025 (UTC)

DNS Blacklist issues

Hello. I have been using DNS Blacklist URLs on my wiki to combat spam, and I also have the ConfirmAccount extension installed and enabled on my wiki family. However, I still get account requests from spambots.

Here is the code that I added to my Localsettings.php file:

$wgEnableDnsBlacklist = true; $wgDnsBlacklistUrls = array( 'xbl.spamhaus.org.', 'zen.spamhaus.org.', 'dnsbl.tornevall.org.', 'spam.dnsbl.sorbs.net.', 'rbl.dnsbl.im.', 'noptr.spamrats.com.', 'all.s5h.net.', 'z.mailspike.net.' );

Is there something wrong with the DNS blacklist configuration? Does this feature only affect editing from the blacklisted IPs? If there is something wrong, then how do I fix it? Thank you for reading. Newman2 (talk) 20:48, 24 April 2025 (UTC)

@Newman2 All relevant information is collected here Manual:Combating spam. In general, whenever you run a server (of any type) on the internet these modern days, you should be prepared for a barrage of never stopping spam and abuse. I looked at the DnsBlacklistUrl documentation page, and it was a bit sparse, so I perused the source code to figure out how it is supposed to work and added that here Manual:$wgEnableDnsBlacklist. —TheDJ (Not WMF) (talkcontribs) 07:48, 25 April 2025 (UTC)
Isn't this setting supposed to be a boolean? I suspect you edited the wrong article. Tactica (talk) 00:08, 26 April 2025 (UTC)

Gadget for auto numeration and Vector-2022

Hello, the auto numeration activated with MediaWiki:Gadget-autonum.css and MediaWiki:Gadget-autonum.js (I load them in my global.js) does not work well together with Vector-2022 skin, because the counter reset does not work, and so all lower sections are just counted up. Note, that in vector-2022 only the else tree of the script is active and the code of the CSS is used. If you think, why I do not just ask the author Krinkle – well he wrote almost a year ago “I do not use the autonum gadget myself. For now, I have exceed the time I'm willing to spend on this gadget. I suggest gathering support and awareness of other people in the community, to hopefully find someone who is able and willing to maintain this JS/CSS snippet for further modifications.” (Krinkle’s user talk page on meta, cf. meta:Special:Diff/26715423 or the full conversation at m:Special:PermaLink/26721127#Section autonumeration with Parsoid). As an example: Manual:FAQ (itself not ready for vector-2022, at least the toc part I looked for) has 12 sections, and the latest one has 6 subsections which is fine displayed in (legacy) Vector from 2010, but with Vector 2022 I see the count 12.107. — Speravir (talk) – 00:35, 25 April 2025 (UTC)

Hello sir, I saw your problem. From my investigation, Vector-2022 relies on the CSS-based numbering (the else branch in autonum.js, using autonum.css) when no table of contents (TOC) is present, as per the gadget’s design. The CSS (https://en.wikipedia.org/wiki/MediaWiki:Gadget-autonum.css) uses counter-reset properties, but these seem incompatible with Vector-2022’s DOM structure or styling, possibly due to changes in how headings are rendered (e.g., .mw-headingclasses, per Vector-2022 documentation).
I’m aware that Krinkle, the gadget’s author, noted in 2024 that they no longer maintain this gadget and suggested community collaboration for further fixes (see meta:Special:PermaLink/26721127#Section_autonumeration_with_Parsoid). I’m hoping to gather insights or assistance from others familiar with Vector-2022’s CSS/JS or gadget maintenance. Has anyone encountered similar issues with autonum or other CSS-based numbering gadgets in Vector-2022? Are there known workarounds, such as adjusting the counter-reset selectors to match Vector-2022’s heading structure, or modifying the JS to handle TOC-less pages differently? ProfessorNikolaus (talk) 18:53, 25 April 2025 (UTC)
Your reply reminded me that I had myself written to Krinkle about the issue for pages without toc. I just did not consider now that the new skin has the same section structure in DOM. But because I ask for a change of a page gadget I seem to be wrong in the support desk. I'll ask at the Village Pump, instead, see VP: Gadget for auto numeration and Vector-2022. — Speravir (talk) – 00:16, 29 April 2025 (UTC)

Importing pages from old wiki into newest wiki 8.3.0

I want to manually insert all my pages from an old wiki project into a new wiki website (using mediawiki 8.3.0). The database in my new wiki shows pages are stored in "ew7o_page". In my old wiki this was calles "page" What is the best way to export from old wiki and import (insert) in newest wiki ? Same for "pagelinks" : need to be inserted in "ew7o_pagelinks" . When I try this now it's creating a new row in my SQL with the name "page". The "ew7o_page" reamains unchanged.

Stevy7 (talk) 10:14, 27 April 2025 (UTC)

@Stevy7: What do you mean by "mediawiki 8.3.0"? The latest version is MediaWiki 1.43. Oh, or do you mean you're updating from MediaWiki 1.8? That's impressive, if you've still got it running! Can you upgrade to 1.35 and then step through LTS versions since then? Or perhaps export the site's pages as XML (see Manual:DumpBackup.php) and then import in to a fresh install? Sam Wilson 03:31, 1 May 2025 (UTC)

Interwiki issues with vector 2022 for non-languages

Dear ∀,

In Vector 2022 I have difficulties with interwiki connections in my local wiki (1.39, ULS activates) as soon as the link happens not to be an ISO language prefix.

In special:interwiki I have defined those interlanguage prefices:

aa https://localhost/mediawiki/index.php/$1 ja nein Bearbeiten, Löschen
en https://en.wikipedia.org/wiki/$1 ja nein Bearbeiten, Löschen
urwiki http://localhost/mediawiki/index.php/$1 ja nein Bearbeiten, Löschen

In Names.php I have defined , as far as my question is concerned, these:

'urwiki' => ' mein Urwiki', # Test für Sprachverknüpfung
'en' => 'English', # English
'aa' => 'Urwiki via aa', # Afar

On my Main Page I added:

[[urwiki:Main Page]][[en:Wikipedia:Village pump]][[aa:Main Page]]

Under vector 2010 I am offered all three links

Under vector 2022, the interwiki popup is flagged with three languages, but if I open the popup, only en and aa are being offered, beside a lot of whitespace.

How can I make mediawiki handle urwiki the same way as ISO prefices?

Thank you in advance!

Yours, Ciciban (talk) 10:49, 30 April 2025 (UTC)

Mediawiki styles not loading after upgrade

Hello,

I've been at this for a couple of days now and no online resource could help so far. I upgraded my mediawiki 1.31 to 1.35.14, planning to go to the 1.43. I followed the procedure described in the manual (backed up the db and images folder -> unzipped mw_1.35 tar replaced relevant files -> ran php maintenance/update.php), but after all the steps it seems mw is having issues grabbing the right modules:

Skipped unresolvable module site

Skipped unresolvable module mediawiki.page.startup

Skipped unresolvable module mediawiki.page.ready

Skipped unresolvable module skins.vector.legacy.js

Skipped unresolvable module ext.visualEditor.desktopArticleTarget.init

Skipped unresolvable module ext.visualEditor.targetLoader

There is also this javascript error: Uncaught TypeError: Cannot read properties of undefined (reading 'state')  @https://[redacted].com/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector

And this text in what i assume was suppose to be the css file in sources?

Problematic modules: {"ext.visualEditor.desktopArticleTarget.noscript":"missing","mediawiki.special.version":"missing","skins.vector.styles.legacy":"missing"}

Due to these issues, while the wiki displays my content, there is 0 styling on the website.

I cleared caches, made sure the temp folder is writable, followed the manual for the short url structure (hopefully right), redownloaded the 1.35 Vector skin with no luck, and many others. I also tried activating debug in LocalSettings but that does not show anything on the page.

I would very much appreciate some input if anyone has encountered this before.

Setup:

Product Version MediaWiki 1.35.14

PHP 7.4.33 (apache2handler)

MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2

ICU 74.2

Entry point URLs

Article path /wiki/$1

Script path /w

index.php /w/index.php

api.php /w/api.php

rest.php /w/rest.php

Thanks in advance. Sorestoreclerk (talk) 08:25, 1 May 2025 (UTC)

Syntax when protecting pages for a non-standard length of time

I'm a bureaucrat at Wikispecies and an administrator at Swedish Wikivoyage and Wikimedia Sweden (WMSE). When protecting a page on any of those wikis I'm faced with the option to protect it for a fixed period of time (one week, one month, "infinitely" etc.), but there's also an option to chose "Other time" by entering code into a text box. However, I can't seem to find any information about how this command should be formatted, nor anything about the preferred date format and such. I've looked in Help:Protected pages and similar MediaWiki help pages, but struck no luck. (Most Meta-Wiki pages on the subject simply soft-redirects to MediaWiki). Even though protecting pages is (and should be) a fairly rare event, any help would be much appreciated. –Best regards, Tommy Kronkvist (talk), 19:19, 16 April 2025 (UTC).

I've wondered that too. According to the code, the other time can be 'infinite', 'indefinite', 'infinity', or 'never' to mean infinite, or whatever php's strtotime function accepts (with some qualification that your user timezone is not accounted for). --Clump (talk) 13:57, 1 May 2025 (UTC)

Error messages in SkyWiki wikis

Hi, I've reported several error messages on SkyWiki wikis, including phabricator.skywiki.org. I've tracked them as issues in Wikimedia Phabricator (see links to issues at the right of this message), but these issues were all rejected as invalid. How can I contact SkyWiki founder in order to have those bugs fixed? --Agusbou2015 (talk) 18:26, 27 April 2025 (UTC)

SkyWiki, which is already outside Wikimedia's purview/priority/attention, has been lingering in the shadows of Miraheze, Fandom, et al.--but not even Google has the home URL indexed on its first results page as I type! (The top result for "SkyWiki", unquoted, is a Fandom site on an unrelated video game.) Afraid I could say otherwise, but unless you or I are lucky to find their support e-mail or social handle(s), there's nothing else that can be done on the matter. --Slgrandson (talk) 08:08, 29 April 2025 (UTC)
"phabricator.skywiki.org" never existed (you can enter literally any domain like "agusbou2015.skywiki.org" and get the very same error for non-existing sites) thus mentioning non-existing subdomains makes no sense. Phabricator is not some subdomain magically included in every MediaWiki installation to report issues but it is a complete separate piece of software hosted by Wikimedia. Malyacko (talk) 14:41, 1 May 2025 (UTC)

Wikimedia installation repair needed

Hello Wikimedians - I'm a non-coder who installed a private Wikimedia wiki on my Go Daddy website, for my own use in organizing local history research. The available installation tools worked fine, and the website worked well until recently, when I got a notice that I needed to upgrade the php. I didn't find any non-coder tools to help me do that, and my efforts have really screwed things up - now I can't even log in. I need someone who knows how to fix the site (for pay, of course). How do I find such a person? WCCasey (talk) 17:41, 29 April 2025 (UTC)

There are some people listed here: Professional development and consulting. Jonathan3 (talk) 19:09, 29 April 2025 (UTC)
@WCCasey: You shouldn't have to be a coder to install and upgrade MediaWiki, although I know that sometimes the process can be a bit tricky. Ideally, we'd make it easier! If you do want to try doing it yourself, you could try posting here describing the issues you're having with the upgrade, and we could try to help. It might not be insurmountable. Sam Wilson 03:11, 30 April 2025 (UTC)

Thanks for pointing me to that list - that's what I was looking for. Also thanks for offering to help me fix things myself. I may be back at some point to try that! WCCasey (talk) 16:20, 1 May 2025 (UTC)

ResourceLoader Issue? MediaWiki:Minerva.js not loading/executing (MW 1.43.1, MF 2.4.1)

Hello,

I am seeking help diagnosing an issue where JavaScript placed in MediaWiki:Minerva.js is not being loaded or executed in the mobile view (MinervaNeue skin via MobileFrontend). I am new to MediaWiki administration and web development in general and have been heavily assisted by AI (Gemini/ChatGPT) in troubleshooting so far.

Environment:

  • MediaWiki: 1.43.1
  • PHP: 8.1.32 (litespeed)
  • Database: 10.6.21-MariaDB-cll-lve
  • Host: Namecheap Shared Hosting (cPanel, LiteSpeed Web Server)
  • Skin: MinervaNeue (Mobile), Vector 2022 (Desktop)
  • Relevant Extensions: MobileFrontend 2.4.1, UniversalLanguageSelector [2025-03-15 MLEB], Translate [2025-03-15 MLEB] (full list available if needed)
  • Configuration: $wgMFEnableSiteJs = true; added after wfLoadExtension('MobileFrontend'). $wgAllowUserJs is default (true).

Goal: Customize the mobile navigation menu by adding custom links/sections via JavaScript, similar in structure to mariowiki's mobile menu.

Problem & Diagnostics: JavaScript code in MediaWiki:Minerva.js fails to execute.

  1. An initial attempt using simple jQuery .append() did successfully add <li> elements to the menu (targeting #p-navigation), but styling was incorrect(primitive and rugged). I would like the custom links to have the same style as other things in the default menu.
  2. Subsequent attempts using the mw.mobileFrontend.menu.buildLink API failed (no elements added).
  3. Reverting to the simple jQuery .append() code also failed in later tests (no elements added).
  4. Crucial Test: Replacing the entire content of MediaWiki:Minerva.js with only console.log('Test'); results in no output in the F12 browser console when loading the mobile view (after purging cache and hard refreshing).
  5. Network Analysis: Checking the Network tab in F12 Dev Tools (mobile view) confirms that the content of MediaWiki:Minerva.js (the console.log line) is not present in the response body of any relevant load.phprequest. This indicates ResourceLoader is not serving the updated module content.

Troubleshooting Steps Performed (All Ineffective):

  • Confirmed $wgMFEnableSiteJs = true; and $wgAllowUserJs is default (true).
  • Extensive browser cache clearing (hard refresh, incognito mode, multiple browsers).
  • Used ?action=purge on MediaWiki:Minerva.js, MediaWiki:Minerva.css, and main pages.
  • Cleared host-provided CDN cache (Namecheap Supersonic) and LiteSpeed page cache.
  • Attempted to clear server-side PHP OPCache by editing/saving LocalSettings.php (add/remove comment).
  • Checked F12 console repeatedly for relevant JavaScript errors (none found).
  • Checked cPanel error logs for relevant PHP errors (none found).
  • Checked cache/ directory permissions (755) and found it only contains .htaccess (suggesting potential write issues, but unconfirmed).
  • Tested with ?debug=true parameter (no relevant debug output or errors observed).
  • (Note: I am unable to access Phabricator due to an IP block).

Question: Given that MediaWiki:Minerva.js is configured to load ($wgMFEnableSiteJs=true) but is demonstrably not being served by ResourceLoader (load.php), what could be the cause?

  • Is this a known bug in MediaWiki 1.43.1 or MobileFrontend 2.4.1 regarding ResourceLoader module invalidation or loading for MediaWiki:Minerva.js / site.mobile / skins.minerva.site?
  • Are there further steps to debug ResourceLoader module delivery beyond checking the Network response and using ?debug=true?
  • Could this be related to server-side caching mechanisms (OPCache, RL file cache) that resist standard invalidation methods, or a file permission/ownership issue preventing RL cache writes?

Any insights or suggestions would be greatly appreciated. Thank you! Segremost (talk) 12:22, 1 May 2025 (UTC)

Cannot access the database error appearing on wiki

MediaWiki Version: 1.36.2

PHP Version: 7.4.33 (litespeed)

Website: https://converter.penguinicewikis.com/mw19/

Hello. I know I may have posted something similar to this before, but I have problems with one of my wikis. When I try to access my wiki, I get a "Cannot access the database" error. And when I try to perform rebuildall.php in SSH, I get a related error. The error may appear on the link to the website above For problems in SSH, this is what the error in the SSH Terminal looked like:

Wikimedia\Rdbms\DBConnectionError from line 1507 of /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost)

  1. 0 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/loadbalancer/LoadBalancer.php(995): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  2. 1 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/loadbalancer/LoadBalancer.php(960): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0,'gjlxrtap_mw3455...', 0)
  3. 2 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1126): Wikimedia\Rdbms\LoadBalancer->getConnection(-1, Array, 'gjlxrtap_mw3455...', 0)
  4. 3 /home/gjlxrtap/public_html/mw19/maintenance/includes/Maintenance.php(1410): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(-1, Array, 'gjlxrtap_mw3455...')
  5. 4 /home/gjlxrtap/public_html/mw19/maintenance/rebuildall.php(44): Maintenance->getDB(-1)
  6. 5 /home/gjlxrtap/public_html/mw19/maintenance/doMaintenance.php(112): RebuildAll->execute()
  7. 6 /home/gjlxrtap/public_html/mw19/maintenance/rebuildall.php(67): require_once('/home/gjlxrtap/...')

Thank you for reading. Newman2 (talk) 14:45, 1 May 2025 (UTC)

@Newman2 There are a few tips in https://www.mediawiki.org/w/index.php?title=Topic:Vgqkw937xxolc0mq&action=history that you may try. —TheDJ (Not WMF) (talkcontribs) 16:29, 2 May 2025 (UTC)

upgrade process

Hi - we recently took over the mediawiki server and it is running version 1.19.23. I would like to know what would be the ideal way to bring it tot he latest version. 128.249.96.18 22:07, 1 May 2025 (UTC)

There's some guidance about which version to upgrade to first at Manual:Upgrading#Check_requirements. Jonathan3 (talk) 13:52, 2 May 2025 (UTC)

My company has an existing wiki that's been around a long time. I'm attempting to get it migrated, upgraded and working (on Windows Server). Original is on MediaWiki 1.18.2, the new one is MediaWiki 1.43.1. Most everything has gone ok with the migration and upgrade. One issue that was discovered is file:// links don't work. Originally, they did nothing when clicking on them. I have since enabled https and added the site to IE compatibility mode in Edge and now the links open saying "access to the file was denied. ...not readable, moved, file permissions." But I can copy/paste the link into a new window and it opens fine (so the file still exists and it's not a permissions issue). Things I've done:

verified $wgUrlProtocols has file: entry

enabled https

added site to local intranet sites, allowed pop-ups, and IE compatibility mode sites

enabled IntranetFileLinksEnabled policy locally

I've done a lot of researching on the internet trying any possible fix I could find. Any other ideas of things to try?

If the files do need to be moved local to the MediaWiki server and linked to there, is there an easy way to update all existing links?

Twittgo (talk) 18:36, 1 May 2025 (UTC)

This might be a browser issue and not a mediawiki issue. Browsers are much more strict now a days about file links. Bawolff (talk) 05:41, 4 May 2025 (UTC)

Convert timestamp to human-readable text?

E.g. 20251002082510 to 02/10/2025? (but for any timestamp, not just revision timestamp) MouseCursor (talk) 16:28, 3 May 2025 (UTC)

Does the #time function from Extension:ParserFunctions extension work? e.g. {{#time:d/m/y|20250504053801}} = 04/05/25 Bawolff (talk) 05:40, 4 May 2025 (UTC)

what is the rule to translate EN strings generated by Lua modules ?

Hi all, when a translated page calls a template which invokes a Lua Module, and this module generates strings, what is the rule for the Lua strings to be translated and appear on the calling page ? Should the Lua Module be derived in as many languages as pages (only its /doc has extensions /xx) ? We should have similar translated units as for pages. I am a bit confused seeing hardcoded EN strings provided by these modules present in the translated pages. Any idea ? .... Thanks -- Christian 🇫🇷 FR 🚨 (talk) 18:59, 4 May 2025 (UTC)

Extensions and skins not working (most of the time)

Hi everyone, I am new here, so i might not get everything at first or botch some specialistic MW wording.

Getting to the problem - I appear to have a problem with LESS variables. Many skins are affected, like Vector, Minerva and Timeless, possibly many more (currently only one "working" is Chameleon). The symptoms are: broken CSS, buttons not working, extensions not working (happens in Chameleon too). There are images present, so I don't think that the solution from here applies, but I tried it either way and it does not make a change.

With broken LESS variables comes more problems - when I try to enable extensions like WikiEditor or VisualEditor I get 50kB of console errors with Less_Exception_Compiler saying that @variable_name is not defined (which clearly is defined in mediawiki.skins.defaults.less). It also frequently happens with @cdx_variable_name which i deduce is some codex variable which is not defined in mediawiki.skins.defaults.less, but i don't know how to handle this. It's a shame, but it can be worked around by writing in pure wikicode. Yet, there are problems still (which I didn't find the cause for), thumbnails and frames are not rendering correctly. The image is here, there is a caption, but there is no frame, image is not snapping to the right (if set to |right|), text isn't wrapping around it.

I am wandering if this is something on my hosting server side or with my installation, but I don't really know... I'll get you through installation steps i went through:

  1. download and unpack mediawiki, push it to my host ftp, import php.ini file and make /tmp
  2. run the installation following the tutorial
  3. wiki breaks and sends me a giant list of errors with Less_Exception_Compiler
  4. I download and install Chameleon via Composer (site isn't that broken now)
  5. I download a REL1_43 extension and put it in /extensions/, set (eg) wfLoadExtension( 'VisualEditor' );
  6. I try to edit a page using VE, but nothing is showing, console is red full with errors

So yeah, not much here to be honest... Right now I have almost every important extension disables, because it breaks my site. What can be the cause? What am i doing wrong?

I tried installing the 1.43.0 version, but it gives me the same results.

Nazwa Wersja
MediaWiki 1.43.1
PHP 8.4.0 (uwsgi)
ICU 69.1
MySQL 8.0.33-25
Pygments 2.17.2
Lua 5.1.5

Thanks for help in advance! Astroksiezyc wiki (talk) 01:45, 28 April 2025 (UTC)

(for anyone looking at this, there are some stacktrace screenshots at phab:T392761) ‍—‍a smart kitten[meow] 09:50, 28 April 2025 (UTC)
@Astroksiezyc wiki "download and unpack mediawiki," from where ? git, tarball, your linux distro ? —TheDJ (Not WMF) (talkcontribs) 16:47, 2 May 2025 (UTC)
I just downloaded the file from the MediaWiki download website. Tomorrow I might try to get it directly from git if it would be better.
Do the packages differ in some way? Or maybe am I missing some crucial installation step when downloading from official website? Astroksiezyc wiki (talk) 22:39, 2 May 2025 (UTC)
Ok, I tried dovnloading and installing from git - I added the skins packages, there weren't any present. I get Vector-2022 not working, just breaking the site completely and Chameleon giving me the same errors as before. I just don't know what else can i do Astroksiezyc wiki (talk) 11:42, 5 May 2025 (UTC)

Upgrade and unrecognized models

Hello, I upgraded my two Wikis from MediaWiki 1.25 to 1.43.1. But not all templates are recognized.

For example:

New Wiki: https://www.europe-politique.eu/wiki/Groupe_de_l%27Alliance_radicale_europ%C3%A9enne_(ARE)

Old Wiki: https://web.archive.org/web/20241015200119/https://www.europe-politique.eu/wiki/Groupe_de_l'Alliance_radicale_europ%C3%A9enne_(ARE)

Thank you very much for WikiMedia and for your help! Lo2b (talk) 10:45, 5 May 2025 (UTC) 46.30.204.3 13:51, 5 May 2025 (UTC)

As far as I can tell, you are missing at least one extension; #expr and #switch are parser functions (not templates) from the ParserFunctions extension, which you should download and install if you want to make use of them. Hope that helps. Cavila 18:03, 5 May 2025 (UTC)
Many thanks @Cavila : it works perfectly !
Have a nice day !
~~~~ 2A01:CB04:5EC:D400:1CA2:FF3E:95EB:3AE5 18:52, 5 May 2025 (UTC)
Sorry, I was not logged... Lo2b (talk) 18:54, 5 May 2025 (UTC)

Database Error: too many connections?

Title says it all. How is this even possible? And how can I stop this from happening?

MediaWiki internal error. Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Too many connections (localhost)
Backtrace:
from /var/lib/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1129)
#0 /var/lib/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(796): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /var/lib/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(784): Wikimedia\Rdbms\LoadBalancer->getServerConnection()
#2 /var/lib/mediawiki/includes/libs/rdbms/database/DBConnRef.php(107): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal()
#3 /var/lib/mediawiki/includes/libs/rdbms/database/DBConnRef.php(125): Wikimedia\Rdbms\DBConnRef->ensureConnection()
#4 /var/lib/mediawiki/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call()
#5 /var/lib/mediawiki/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(762): Wikimedia\Rdbms\DBConnRef->selectField()
#6 /var/lib/mediawiki/includes/language/LCStoreDB.php(65): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()
#7 /var/lib/mediawiki/includes/language/LocalisationCache.php(566): LCStoreDB->get()
#8 /var/lib/mediawiki/includes/language/LocalisationCache.php(612): LocalisationCache->isExpired()
#9 /var/lib/mediawiki/includes/language/LocalisationCache.php(523): LocalisationCache->initLanguage()
#10 /var/lib/mediawiki/includes/language/LocalisationCache.php(403): LocalisationCache->loadSubitem()
#11 /var/lib/mediawiki/includes/language/LocalisationCache.php(419): LocalisationCache->getSubitem()
#12 /var/lib/mediawiki/includes/language/MessageCache.php(1267): LocalisationCache->getSubitemWithSource()
#13 /var/lib/mediawiki/includes/language/MessageCache.php(1209): MessageCache->getMessageForLang()
#14 /var/lib/mediawiki/includes/language/MessageCache.php(1103): MessageCache->getMessageFromFallbackChain()
#15 /var/lib/mediawiki/includes/Message/Message.php(1554): MessageCache->get()
#16 /var/lib/mediawiki/includes/Message/Message.php(1036): MediaWiki\Message\Message->fetchMessage()
#17 /var/lib/mediawiki/includes/Message/Message.php(1127): MediaWiki\Message\Message->format()
#18 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(253): MediaWiki\Message\Message->text()
#19 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(399): MWExceptionRenderer::msg()
#20 /var/lib/mediawiki/includes/exception/MWExceptionRenderer.php(107): MWExceptionRenderer::reportOutageHTML()
#21 /var/lib/mediawiki/includes/exception/MWExceptionHandler.php(135): MWExceptionRenderer::output()
#22 /var/lib/mediawiki/includes/exception/MWExceptionHandler.php(239): MWExceptionHandler::report()
#23 /var/lib/mediawiki/includes/MediaWikiEntryPoint.php(222): MWExceptionHandler::handleException()
#24 /var/lib/mediawiki/includes/actions/ActionEntryPoint.php(82): MediaWiki\MediaWikiEntryPoint->handleTopLevelError()
#25 /var/lib/mediawiki/includes/MediaWikiEntryPoint.php(206): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError()
#26 /var/lib/mediawiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#27 {main} 87.157.190.62 20:47, 5 May 2025 (UTC)
Maybe just upgrade your server and/or check your access logs and see whether you should block any IP ranges. Jonathan3 (talk) 22:09, 5 May 2025 (UTC)
Update: This was kind of an embarrassing problem. On the one side was a straggler "CACHE_ANYTHING" at the end of my LocalSettings (must be there for ages and a copy error) and on the other was my storage full, so that the database couldn't finish its objectcache-tasks, which caused 152 sleeping tasks... I deleted the wrong cache option and some old backups, restarted the database and now everything seems fine again. But yes... I should really give my old lady a bigger harddrive. 91.42.82.112 20:43, 6 May 2025 (UTC)

We will be enabling the new Charts extension on your wiki soon!

(Apologies for posting in English)

Hi all! We have good news to share regarding the ongoing problem with graphs and charts affecting all wikis that use them.

As you probably know, the old Graph extension was disabled in 2023 due to security reasons. We’ve worked in these two years to find a solution that could replace the old extension, and provide a safer and better solution to users who wanted to showcase graphs and charts in their articles. We therefore developed the Charts extension, which will be replacing the old Graph extension and potentially also the EasyTimeline extension.

After successfully deploying the extension on Italian, Swedish, and Hebrew Wikipedia, as well as on MediaWiki.org, as part of a pilot phase, we are now happy to announce that we are moving forward with the next phase of deployment, which will also include your wiki.

The deployment will happen in batches, and will start from May 6. Please, consult our page on MediaWiki.org to discover when the new Charts extension will be deployed on your wiki. You can also consult the documentation about the extension on MediaWiki.org.

If you have questions, need clarifications, or just want to express your opinion about it, please refer to the project’s talk page on Mediawiki.org, or ping me directly under this thread. If you encounter issues using Charts once it gets enabled on your wiki, please report it on the talk page or at Phabricator.

Thank you in advance! -- User:Sannita (WMF) (talk) 15:07, 6 May 2025 (UTC)

Full images not showing when wiki is accessed from domain

I have encountered an issue with displaying original versions of image files when I access my wiki site through a domain, e.g. wiki.mydomain.com. It looks like the page attempts to load the file from my wiki's local IP address, in this case 192.168.1.196. When site is accessed through mentioned IP directly, images work without issues. I have setup wiki behind an nginx proxy, if that is a factor in troubleshooting the issue.

Error message received after image thumbnail is clicked:

There seems to be a technical issue. You can retry if it persists. Error: could not load image from http:// 192.168.1.196/mediawiki/images/9/95/Test_image.jpg

Wiki version information:

MediaWiki 1.41.1
PHP 8.3.6 (apache2handler)
ICU 74.2
MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2

Eetu1990 (talk) 10:20, 7 May 2025 (UTC)

Custom colour scheme set in css randomly switches on and off

My wiki (https://cyberpedia.miraheze.org/wiki/Main_Page) has a custom colour scheme, however most of the time the custom colour scheme is not used, expect for a few things like links. The colour scheme is set via https://cyberpedia.miraheze.org/wiki/MediaWiki:Common.css and https://cyberpedia.miraheze.org/wiki/MediaWiki:Vector.css. Occasionally the custom colour scheme is used, however only for a couple of hours at a time before going back to the non-custom colour scheme. I have asked about this elsewhere and the only response I've got is that I might need to use CSS containers in some undefined way, or that it might have something to do with mobile skins despite me being on desktop. Eldomtom2 (talk) 21:20, 8 May 2025 (UTC)

Hidden Namespace pages

Hello,

I would like to block unregistered users from reading TALK pages, VIEW SOURCE pages, VIEW HISTORY pages, TEMPLATE pages and SPECIAL pages + the page Pages_spéciales

I've tried this, but it doesn't always work:


wfLoadExtension( 'Lockdown' );

$wgActionLockdown['history'] = [ 'user' ]; // seems OK

$wgActionLockdown['TalkPage'] = [ 'user' ]; // seems OK

$wgActionLockdown['SpecialPages'] = [ 'user' ]; // not OK

$wgNamespacePermissionLockdown[NS_TALK]['read'] = [ 'user' ]; // seems OK

$wgNamespacePermissionLockdown[NS_TEMPLATE]['read'] = [ 'user' ]; // seems OK

$wgNamespacePermissionLockdown[NS_TEMPLATE_TALK]['read'] = [ 'user' ]; // seems OK

$wgNamespacePermissionLockdown[NS_SPECIAL]['read'] = [ 'user' ]; // not OK


Can you help me, please?

https://www.europe-politique.eu/wiki/

Produit Version
MediaWiki 1.43.1
PHP 8.4.5 (fpm-fcgi)
ICU 63.1
MySQL 8.0.41-32

Lo2b (talk) 21:33, 8 May 2025 (UTC)

I've never used [[Extension:Lockdown] but it looks as though $wgActionLockdown relates to actions (Manual:Parameters_to_index.php#Actions) and "SpecialPages" isn't one. Neither is "TalkPage".
Maybe try -1 instead of NS_SPECIAL? Maybe $wgNamespacePermissionLockdown just doesn't work for special pages. Also the existence of $wgSpecialPageLockdown makes me think you might have to use that for all special pages individually. Jonathan3 (talk) 13:49, 9 May 2025 (UTC)

Some images not showing after Upgrade from 1.31 to 1.43

I found several tickets to this problem, but the most common solution (run cleanupUsersWithNoId.php and migrateActors.php) is no longer applicable with 1.43 as both scripts are deceprated and removed.

Background: I upgraded from an old LTS (1.31) to the latest LTS with 1.35 as gap version. Exactly as stated on the upgrade page. And at first glance, everything was fine. But then, there are some images which are not there. They still have their description page and history, they're on the webserver, I can find them in the image folder, they have the same permission und owner as all the other images. The missing images also doesn't come from the same folder, as one is from e/e1 and another from 6/67, at the same time other images from these folders are displayed.

I already tried checkImages.php and rebuildImages.php with no luck. And after reading the other tickets to this topic, I'm afraid I have to manually reupload each missing image myself :s --91.42.74.217 18:57, 2 May 2025 (UTC)

EDIT: Here is the link to the affected wiki and one of the example images, which are no longer displayed but still on my server: memory-alpha.wiki/wiki/Datei:Odo_2372.jpg. RebuildImages.php didn't help either. --80.128.152.128 19:18, 4 May 2025 (UTC)

EDIT2: I have tried nearly all maintenance scripts at this point. importImages.php gives me the error "Importing XY.jpg...failed. (at recordUpload stage)". rebuildImages.php says that it did *something* but nothing actually happens. refreshFileHeaders.php makes nothing. Even manually uploading the image in my wiki via the webinterface doesn't work because, surprise, it recognize that its a duplicate. So my wiki knows that there are images, but it simply won't display it? Why? What happend between 1.31 and 1.43? (or 1.31 and 1.35 or 1.35 and 1.43?) 91.42.80.200 20:36, 7 May 2025 (UTC)

"Odo 2372.jpg" has an md5sum of da49172cdaabe195c0a9d6b2c446b159, meaning that it should be located in this the directory https://memory-alpha.wiki/mediawiki/images/d/da/ which it clearly is not. So either the webserver doesn't have the right permissions on that file, in case it DOES exist locally (so then fix the permissions), or it is actually gone. That doesn't seem an upgrade issue, though it is possible that while upgrading you made a mistake with copying or something, that caused it to be lost. —TheDJ (Not WMF) (talkcontribs) 09:10, 8 May 2025 (UTC)
"Odo_2372.jpg" (underscore instead of space) has a hash of 6992464c461e737fd03d1652cde1622b though and is located in the directory matching that hash: memory-alpha.wiki/mediawiki/images/6/69/Odo_2372.jpg. --2A02:2455:812B:BA00:F238:C7D9:4B56:36B6 10:02, 8 May 2025 (UTC)
Yes exaclty, and this was also its position in the original image-folder pre-upgrade... Nearly half of all my images (mostly uploaded by users, which don't exist in my database due to the fact I imported the whole wiki back in 2018) are not there anymore. 87.157.182.103 21:05, 8 May 2025 (UTC)

EDIT3: Ok, I go in full error mode. A secound try, where I carefully watched the output of both upgrade.php runs (1.35 and 1.43) revealed a missing cleanupUsersWithNoId.php run in 1.35, but even with that the exact same images are missing in 1.43. 91.42.65.179 07:30, 11 May 2025 (UTC)

SOLUTION!! The error is within the image table! For the missing images, the img_actor field was 0. To correct the error, it only needs to be changed using UPDATE <wiki>image SET img_actor="3" WHERE img_actor="0";. The new value of img_actor must be any existing actor (e.g. the wiki creator is 1). Now ALL my images are back! And this is the solution to a years old problem! 91.42.65.179 19:52, 11 May 2025 (UTC)

PDF's and Word docs rejected in my upload?

I tied to upload an historica Survey Journal to Wikimedia Commons first in PDF format and that was rejected after I went through all the steps to support and document it, and then I uploaded it in Word format and that was rejected because the newer Word format was not acceptable. What is left? How do I upload this important historical item? NoelSherry (talk) 02:13, 11 May 2025 (UTC)

c:Commons:File types#Textual formats should be relevant, in particular the last paragraph. Otherwise you should ask their Help desk instead, as this is related to Commons' configuration and policies and not to MediaWiki itself. The frontpage there already gives some pointers on where to look for answers. Tactica (talk) 16:47, 11 May 2025 (UTC)

Scribunto/Lua Internal Error, Signal 11

This Scribunto extension is not working for me at all. First I tried hosting locally on Laragon. The Lua binary failures trying to run under WAMP flavors are legendary discussions. Then I have tried several installs of MediaWiki in versions 1.39 and 1.43 on my InMotion Hosting VPS. Every setting anywhere has been configured over and over again with the prevailing wisdom available. Nothing makes much difference, and unlike any of the other Lua errors (1, 2, 126, 127), signal 11 leaves no trace in the log. Just for fun I have created circumstances to cause those former error codes to be logged--they were. Also $showexceptiondetails reveals nothing extra to see.

I simply do not understand why this will not work properly. Even attempts to create simple module invoke scripts like 'Hello' get caught by the editor emulator when trying to save. The site is up and running, and is purposed to accomplish BOLD edits and new namespace content for inclusion into Wikipedia. At the bottom of the landing page are links that deliver phpinfo and system version info. Any thoughts?

The site is located at PT Wikitor Sandbox. There is one active article listed (using a WP Info_Person box), and demonstrates the Lua failure upon on calling up the person Infobox.

A list of things I have done, and all MediaWiki and PHPinfo report pages is here: https://ae1pt.com/wikitor/index.php?title=Actions_Taken_to_Date


Pragmatist (talk) 15:33, 12 May 2025 (UTC)

How can I

Make a wiki JadenGotLost (talk) 22:59, 15 May 2025 (UTC)

See Hosting services for details and options. With luck, you can get one through Miraheze's RequestWiki service (as long as you have an e-mail address attached). --Slgrandson (talk) 23:15, 15 May 2025 (UTC)

The translation tool and its documentation is very confusing ..

I find the hints and messages that appear in and around the "Wikipedia translate page" very hard to understand. Often I have no idea what they are even referring to.

So I chose to ignore the gibberish and simply try the translation interface to see what happens:

  • I open w:Block-stacking problem which is the page I wanted to translate to German. I hover the mouse pointer over "Contributions" in the top right corner and click on "Translations" and I am taken to "https://en.wikipedia.org/w/index.php?title=Special:ContentTranslation&campaign=contributionsmenu&to=en&filter-type=automatic&filter-id=previous-edits&active-list=draft&from=es#/"
  • I am asked for the name of the Wikipedia article to be translated which takes me to "https://de.wikipedia.org/w/index.php?title=Spezial:Inhalts%C3%BCbersetzung&from=en&page=Block-stacking+problem&to=de"
  • Here the title of the English Wikipedia page is automatically translated to the German "Blockstapelproblem". Exciting! But unfortunately all the following paragraphs are simply copied over to the right column exactly as they appear in the original article. No further translation seems to be happening.
  • To the right of the page I read: "Translation services not available for the selected languages. Why?"
  • When I click on "Why?" I am taken to "Special:MyLanguage/Help:Content translation/Translating/Initial machine translation" which explains exactly nothing about why the translation service might be able to translate the title but is "not available" for the actual content of the English Wikipedia article.
  • The content of "Special:MyLanguage/Help:Content translation/Translating/Initial machine translation" is utterly confusing so I won't even start bothering to mention all the question that this help page raises. But it would be good to know if there is any way to choose between the six translation services listed on this help page and how to go about it.
  • When I go to the discussion page of "Special:MyLanguage/Help:Content translation/Translating/Initial machine translation" and try to add a topic I am advised "Please do not post support questions here." Instead I am referred to this page here.
  • Also on the right side of the "Wikipedia translate page" 3 "issues" are announced only 2 of which are actually displayed. I was not able to copy the text of the issues but none of them explain why the english passages from the left column are not translated into German when I click "Add translation" in the right column. One issue is titled "Template unavailable" and the other issue is titled "Part of your translation contains 100% unmodified text." Well, yes, this is exactly the problem I am trying to resolve. Below I am directed to "https://www.mediawiki.org/wiki/Help:Content_translation/Translating/Translation_quality" which also does not give any hints as to why the automatic translation might only work for the page title and not for the body of the article.

All of the help pages about the translation service I have been looking at are rather incomprehensible and pose many more question which I would be happy to list if anyone is interested ..

Any suggestions on how to get the automatic translation going?

best regards, KaiKemmann (talk) 01:31, 16 May 2025 (UTC)

This is not what you want to hear but the talk page for Help:Content translation/Translating/Initial machine translation is the right place to ask about this project in particular, or at least better suited than this desk. The "don't post support questions here" bit is meant for people who would mistakenly ask about general problems with MediaWiki itself, which should be done here. Tactica (talk) 12:46, 16 May 2025 (UTC)

School-wide database for Google Drive users?

Hi - thank you for giving me your time. I've browsed the guides but don't have the answer . We have a small non-profit school that uses Google drive and Gmail for all of our business. We'd like to incorporate a private wiki so that we can have/share/look up resources by anyone here, present and future. Is there a way to do this with this platform? Can we host a version in Google Drive somehow, accessible by anyone with our @davincisv.org emails? Or am I barking up the wrong tree with WikiMedia? 2603:3024:151B:9200:B019:92C4:2597:8F80 18:12, 14 May 2025 (UTC)

No, that is not really how MediaWiki works. It sounds like you are looking for something like sharepoint or similar solutions. I advise to get some consultation from a professional if you want to run software in a professional setting. —TheDJ (Not WMF) (talkcontribs) 09:34, 17 May 2025 (UTC)

Mediawiki upgrade path

Hello! I am new to media wiki and I am looking for some assistance in identifying the proper upgrade path for our companies implementation of MW. They are running a very old version (1.17.0) on a Centos 6.10 VM with Apache 2.2.15 and PHP 5.3.3. I need to migrate the implementation to a VM running Ubuntu 22.04 and would really appreciate some guidance on an upgrade path. Please let me know if you need any additional information. I apologize if this information has already been identified on this site, I was unable to locate it. Thanks in advance! Sleepinfire (talk) 12:53, 15 May 2025 (UTC)

See Manual:Upgrading#Frequently_asked_questions. Basically you have to upgrade to 1.35, then to 1.39, and lastly to 1.43. Tactica (talk) 17:44, 15 May 2025 (UTC)
@Sleepinfire The biggest advise, lots of backups and go step by step when updating various components. When extensions give you trouble during upgrade, disable them, update the core, then turn the extesion back on and run the same upgrade again. Some old extensions might no longer be supported and will not be able to be upgraded, you might have to find alternatives for them or sacrifice the functionality. —TheDJ (Not WMF) (talkcontribs) 09:39, 17 May 2025 (UTC)

On my Miraheze wiki, the Minerva.js settings currently contain this code:

mw.util.addPortletLink('p-navigation', '/wiki/Special:WhatLinksHere/' + mw.config.get( 'wgPageName' ), 'What links here', 'nav-wlh');

However, it should be quickly noted that "What links here" is invalid for pages in the Special namespace themselves; to that end, I'd like to know exactly what wraparound to use for cancelling it out if special pages are visited. Once I receive a tip (from @Bawolff or otherwise), the same procedure will apply for overviews of related changes.

Still, with Good Friday and Easter weekend close at hand, this might take a little while. --Slgrandson (talk) 01:56, 18 April 2025 (UTC)

@Slgrandson I havent tested, but generally an ISO timestamp will likely work yyyy-mm-dd hh:mm:ss —TheDJ (Not WMF) (talkcontribs) 08:16, 21 April 2025 (UTC)
@TheDJ: If so, which part of the calls is the timestamp appended to? --Slgrandson (talk) 20:58, 21 April 2025 (UTC)
Leaving this message up in case anyone else has a better solution. --Slgrandson (talk) 07:43, 5 May 2025 (UTC)
Giving this appeal another try... --Slgrandson (talk) 02:31, 19 May 2025 (UTC)

Mediawiki with AI capabilities

Do we have any option to integrate AI with MediaWiki?

Like an AI search engine? Has anyone thought about this?


Regards/GT Testergt1302 (talk) 07:40, 16 May 2025 (UTC)

@Testergt1302 All AI systems affectively already search Wikipedia. When you say AI, do you perhaps mean a conversational engine, backed by an AI language model ? —TheDJ (Not WMF) (talkcontribs) 09:44, 17 May 2025 (UTC)
Hi, We have a private wiki, that have huge data/content. So, I am just thinking, if there is any AI capability that we can integrate with our wiki, that can help users while searching or editing etc... Testergt1302 (talk) 07:35, 19 May 2025 (UTC)
MediaWiki provides an API and HTML. AI's can index both generally. So you just need to configure your AI agent to be able to index and search these web pages. —TheDJ (Not WMF) (talkcontribs) 14:42, 20 May 2025 (UTC)

Exporting to xml in english only

Is it possible to export only the English language version of the page code and templates to an xml file? Kszwaba (talk) 11:06, 18 May 2025 (UTC)

@Kszwaba See the answer that you received last time you asked the same question. https://www.mediawiki.org/w/index.php?title=Topic:Yftpbcesi4md3jg3&topic_postId=yfu3hpq909syxm7v&topic_revId=yfu3hpq909syxm7v&action=single-view Malyacko (talk) 15:26, 20 May 2025 (UTC)

Database connection error

I have an arch linux driven server on which I maintain my own wiki using Mediawiki.

Until an update two weeks ago, the whole wiki worked perfectly, but since the update I get an error message that the database cannot be accessed.

I have set up my wiki with the following components:

  • mediawiki with php8
  • sqlite as database
  • lighttpd as webserver

The following updates were made during the update on 05/03/25 (php-cgi & php-sqlite always have the same version number as php):

  • mediawiki: 1.42.1-1 -> 1.43.1-1
  • php: 8.3.9-1 -> 8.4.6-2
  • sqlite: 3.46.0-1 -> 3.49.1-1
  • lighttpd: 1.4.76-1 -> 1.4.79-2

On 05/10/2025 I carried out another update as part of a troubleshooting process:

  • mediawiki: 1.43.1-1
  • php: 8.4.6-2 -> 8.4.7-1
  • sqlite: 3.49.1-1 -> 3.49.2-1
  • lighttpd: 1.4.79-2

The error persisted. After each update of Mediawiki I have performed php maintenance/run.php update.

After activating the corresponding flag in LocalSettings.php I get the following error message:

MediaWiki internal error.

Original exception: [b923ab9115bdc4186a4ba4d9] /mediawiki/index.php?title=Hauptseite Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Error 14: unable to open database file
Function: Wikimedia\Rdbms\DatabaseSqlite::open
Query: PRAGMA synchronous = NORMAL

Backtrace:
from /usr/share/webapps/mediawiki/includes/libs/rdbms/database/Database.php(1221)
#0 /usr/share/webapps/mediawiki/includes/libs/rdbms/database/DatabaseSqlite.php(230): Wikimedia\Rdbms\Database->newExceptionAfterConnectError()
#1 /usr/share/webapps/mediawiki/includes/libs/rdbms/database/Database.php(263): Wikimedia\Rdbms\DatabaseSqlite->open()
#2 /usr/share/webapps/mediawiki/includes/libs/rdbms/database/DatabaseFactory.php(157): Wikimedia\Rdbms\Database->initConnection()
#3 /usr/share/webapps/mediawiki/includes/language/LCStoreDB.php(143): Wikimedia\Rdbms\DatabaseFactory->create()
#4 /usr/share/webapps/mediawiki/includes/language/LCStoreDB.php(56): LCStoreDB->getWriteConnection()
#5 /usr/share/webapps/mediawiki/includes/language/LocalisationCache.php(566): LCStoreDB->get()
#6 /usr/share/webapps/mediawiki/includes/language/LocalisationCache.php(612): LocalisationCache->isExpired()
#7 /usr/share/webapps/mediawiki/includes/language/LocalisationCache.php(479): LocalisationCache->initLanguage()
#8 /usr/share/webapps/mediawiki/includes/language/LocalisationCache.php(381): LocalisationCache->loadItem()
#9 /usr/share/webapps/mediawiki/includes/language/Language.php(567): LocalisationCache->getItem()
#10 /usr/share/webapps/mediawiki/includes/title/MediaWikiTitleCodec.php(120): MediaWiki\Language\Language->needsGenderDistinction()
#11 /usr/share/webapps/mediawiki/includes/title/Title.php(1157): MediaWiki\Title\MediaWikiTitleCodec->getNamespaceName()
#12 /usr/share/webapps/mediawiki/includes/page/Article.php(494): MediaWiki\Title\Title->getNsText()
#13 /usr/share/webapps/mediawiki/includes/actions/ViewAction.php(78): Article->view()
#14 /usr/share/webapps/mediawiki/includes/actions/ActionEntryPoint.php(733): ViewAction->show()
#15 /usr/share/webapps/mediawiki/includes/actions/ActionEntryPoint.php(510): MediaWiki\Actions\ActionEntryPoint->performAction()
#16 /usr/share/webapps/mediawiki/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()
#17 /usr/share/webapps/mediawiki/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()
#18 /usr/share/webapps/mediawiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#19 {main}

Exception caught inside exception handler: [b923ab9115bdc4186a4ba4d9] /mediawiki/index.php?title=Hauptseite Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Error 14: unable to open database file
Function: Wikimedia\Rdbms\DatabaseSqlite::open
Query: PRAGMA synchronous = NORMAL

Backtrace:
from /usr/share/webapps/mediawiki/includes/libs/rdbms/database/Database.php(1221)
#0 /usr/share/webapps/mediawiki/includes/libs/rdbms/database/DatabaseSqlite.php(230): Wikimedia\Rdbms\Database->newExceptionAfterConnectError()
#1 /usr/share/webapps/mediawiki/includes/libs/rdbms/database/Database.php(263): Wikimedia\Rdbms\DatabaseSqlite->open()
#2 /usr/share/webapps/mediawiki/includes/libs/rdbms/database/DatabaseFactory.php(157): Wikimedia\Rdbms\Database->initConnection()
#3 /usr/share/webapps/mediawiki/includes/language/LCStoreDB.php(143): Wikimedia\Rdbms\DatabaseFactory->create()
#4 /usr/share/webapps/mediawiki/includes/language/LCStoreDB.php(56): LCStoreDB->getWriteConnection()
#5 /usr/share/webapps/mediawiki/includes/language/LocalisationCache.php(539): LCStoreDB->get()
#6 /usr/share/webapps/mediawiki/includes/language/LocalisationCache.php(403): LocalisationCache->loadSubitem()
#7 /usr/share/webapps/mediawiki/includes/language/LocalisationCache.php(419): LocalisationCache->getSubitem()
#8 /usr/share/webapps/mediawiki/includes/language/MessageCache.php(1267): LocalisationCache->getSubitemWithSource()
#9 /usr/share/webapps/mediawiki/includes/language/MessageCache.php(1209): MessageCache->getMessageForLang()
#10 /usr/share/webapps/mediawiki/includes/language/MessageCache.php(1103): MessageCache->getMessageFromFallbackChain()
#11 /usr/share/webapps/mediawiki/includes/Message/Message.php(1554): MessageCache->get()
#12 /usr/share/webapps/mediawiki/includes/Message/Message.php(1036): MediaWiki\Message\Message->fetchMessage()
#13 /usr/share/webapps/mediawiki/includes/Message/Message.php(1127): MediaWiki\Message\Message->format()
#14 /usr/share/webapps/mediawiki/includes/exception/MWExceptionRenderer.php(253): MediaWiki\Message\Message->text()
#15 /usr/share/webapps/mediawiki/includes/exception/MWExceptionRenderer.php(399): MWExceptionRenderer::msg()
#16 /usr/share/webapps/mediawiki/includes/exception/MWExceptionRenderer.php(107): MWExceptionRenderer::reportOutageHTML()
#17 /usr/share/webapps/mediawiki/includes/exception/MWExceptionHandler.php(135): MWExceptionRenderer::output()
#18 /usr/share/webapps/mediawiki/includes/exception/MWExceptionHandler.php(239): MWExceptionHandler::report()
#19 /usr/share/webapps/mediawiki/includes/MediaWikiEntryPoint.php(222): MWExceptionHandler::handleException()
#20 /usr/share/webapps/mediawiki/includes/actions/ActionEntryPoint.php(82): MediaWiki\MediaWikiEntryPoint->handleTopLevelError()
#21 /usr/share/webapps/mediawiki/includes/MediaWikiEntryPoint.php(206): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError()
#22 /usr/share/webapps/mediawiki/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#23 {main}

Opening the corresponding database with

sqlite bp_wiki.sqlite

as http and checking the database with

sqlite> .database

gives

main: /usr/share/webapps/data/bp_wiki.sqlite r/w

showing that the database is present and also readable and writeable. The database is owned by user and group http.

So it seems, that the database containing the wiki content is not accessable by php!?

What could be the cause of this error? Mrpaul2025 (talk) 09:21, 19 May 2025 (UTC)

A common cause for this is an issue with temp file access. In order to work with sqlite, you need to be able to create temp files. —TheDJ (Not WMF) (talkcontribs) 14:40, 20 May 2025 (UTC)
ok, and which folder or path could be the problem? Is there a special path or program, one of the components (mediawiki, php, sqlite) needs?
What I don't understand is, that it worked until my first update listed in the question. But I didn't find any log entry, that the update caused some changes in the permissions. 77.22.252.46 17:29, 20 May 2025 (UTC)

Can't add Gregorian chant due to old bug

I tried to add Gregorian chant to a wiki page with Extension:Score, and I ran into this problem: T289651

It looks like that bug has been stalled for a few years. Is there any workaround I can use in the meantime, or anything I can do to help get that fixed? 50.230.238.42 04:01, 21 May 2025 (UTC)

The details are obscure to me, but the documentation recommends using Shellbox if you can't trust everyone who edits your wiki and configuring LilyPond directly. "Certain functionality will not work in safe mode, the fix for that is to modify LilyPond to allow that functionality in safe mode" - assuming of course, you know what functionality is affected and how to enable it. Rand(1,2022) (talk) 06:47, 21 May 2025 (UTC)

Hello there, is it currently possible to differentiate (in database) between links that appear actually to the reader in a Wikipedia page, and links that appears at the very bottom in the V.T.E template section ? 2A01:E0A:3DB:9860:AD21:80D5:197F:5E7F 10:53, 22 May 2025 (UTC)

Enable editing category of protected articles

Hello,

I have a few thousands of protected articles at a wiki: it is working as a news site and the articles written over a week ago are protected as no further edits need to be made. They are called archived. I am facing an issue with categories. From time to time someone proposes a new category and asks for archived articles categories to be updated to add them to the newly added category. Is there a way to allow a user to edit a protected article, but only for purpose of adding categories, and not for anything else, i.e. not alter its content in any other way?

If not, I will need to either allow the interested users to be sysops with focus on only altering categories; or create a new 'archive keeper' user rights group and edit protection level for thousands of pages so that the 'archive keeper' users can edit them. Gryllida 12:03, 24 May 2025 (UTC)

The only way I can think of doing something remotely like this is Extension:AbuseFilter, which only works by taking away rights you had before, not granting people rights they already had, or to split the categories an article has into a separate non-protected page, both of which are impractical when dealing with a backlog of articles archived not using either system.
That said, nothing stops you (given sufficient consensus) from configuring the wiki to have a separate "archive keeper" group that can edit full-protected pages, and doing so would not need you to reprotect thousands of pages (and can of course be combined with the abuse filter approach to technically only let them edit categories too). * Pppery * it has begun 18:26, 24 May 2025 (UTC)

Enable section archival

Some few months ago on talk pages a feature was added allowing to 'reply' to a paragraph, it also shows 'Latest comment: just now | 1 comment | 1 person in discussion'. Could whatever extension is doing this be extended to allow me to delete and/or archive sections from a talk page in one click? Gryllida 12:06, 24 May 2025 (UTC)

That's Extension:DiscussionTools. Deleting or archiving some partial page content sounds out of scope. Why would someone want to do that manually anyway? Malyacko (talk) 14:38, 24 May 2025 (UTC)
Oh there are plenty of reasons. There's an entire gadget for it (OneClickArchiver). The bigger problem is that there is no real concept of 'archiving' that is standardized, which makes any sort of implementation for all wikis in the world a lot more difficult. —TheDJ (Not WMF) (talkcontribs) 08:07, 27 May 2025 (UTC)

Default time format?

Is it 12h or 24h on a fresh install? Is this configurable?

I think it is weird that the Date format Preference option is using 24h but the site could be using 12h... Dengamlapotatisen (talk) 09:35, 27 May 2025 (UTC)

By default, every wiki out there runs on UTC's 24-hour clock (i.e. the wikis' 00:00 corresponds to 8:00 p.m. EDT, 7:00 Central, 5:00 Pacific at this time of year). Don't think I've ever come across an a.m./p.m. option (or the mere thought thereof)... --Slgrandson (talk) 10:26, 27 May 2025 (UTC)
it looks like this is in reference to OSM wiki, which had a js gadget to replace dates with 12 hour clock. Bawolff (talk) 19:40, 27 May 2025 (UTC)

Restrict access to certain types of resource-intensive requests

Hi everyone. I don't generally mind even malicious bots scanning my wiki, I rather accept a few overzealous ones rather than over-block IP adresses etc. However, I see spikes of bot traffic that call very very odd and specific URL parameter requests, and those appear to be calling version diffs, certain timespans of related changes etc, in short, requests that (even for human users) often take more than a second or two, and are more resource intensive database calls than just accessing regular sites or more common requests (that are served via several layers of caching). Is there a way to restrict use of such specific requests to logged in users only? I see absolutely no value in having bots crawl these things.

Here are some example requests (seeing hundreds per minute - this is copy and paste not all of this may be malignant):

(as you can see, some things keep re-appearing such as limits, recentchangeslinked, "from" and "days" etc. Honestly, knowing the very limited number of my editors and my wiki, these are not humans accessing these sites. And that's just a snapshot. Help is much appreciated. These do not pop up in the firewall or security software of my server so they must be fairly "regular" bots, but they just get a bit too active...

May 13 16:45:49 190.114.112.162

GET /index.php?days=1&hidebots=1&hideminor=1&hidemyself=1&limit=500&target=Cemetery_Without_Crosses_review_%28German_DVD%29&title=Special%3ARecentChangesLinked HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 5.2; ve-ZA; rv:1.9.2.20) Gecko/2502-05-04 07:25:20.425434 Firefox/15.0

May 13 16:45:49 106.211.45.169

GET /index.php?days=1&hidebots=0&hideminor=1&limit=100&target=Quella_sporca_sacca_nera&title=Special%3ARecentChangesLinked HTTP/1.1" 404 0 "-" "Mozilla/5.0 (iPad; CPU iPad OS 2_2_1 like Mac OS X) AppleWebKit/535.2 (KHTML, like Gecko) CriOS/31.0.884.0 Mobile/99S784 Safari/535.2

May 13 16:45:50 37.245.145.208

GET /index.php?target=Help%3ASitemap&title=Special%3AWhatLinksHere HTTP/1.1" 200 0 "-" "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2; Trident/5.0)

May 13 16:45:49 182.190.192.23

GET /index.php?days=30&from=20250427044616&hidebots=0&limit=500&target=Category%3ARobert_Farnon&title=Special%3ARecentChangesLinked HTTP/1.1" 404 0 "-" "Mozilla/5.0 (compatible; MSIE 5.0; Windows NT 5.01; Trident/4.0)

May 13 16:45:49 41.76.35.194

GET /index.php?days=14&hideminor=1&hidemyself=1&limit=50&target=Sette_magnifiche_pistole&title=Special%3ARecentChangesLinked HTTP/1.1" 404 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 4_3_5 like Mac OS X) AppleWebKit/531.0 (KHTML, like Gecko) CriOS/34.0.834.0 Mobile/34D409 Safari/531.0

May 13 16:45:50 154.183.46.222

GET /index.php?from=20250426140609&hideminor=1&limit=50&target=Actors_by_picture%3AY&title=Special%3ARecentChangesLinked HTTP/1.0" 404 0 "-" "Opera/9.36.(Windows NT 6.0; kw-GB) Presto/2.9.176 Version/11.00

May 13 16:45:51 77.75.148.106

GET /index.php?hidelinks=1&hideredirs=1&title=Special%3AWhatLinksHere%2FHeute_ich%E2%80%A6_morgen_du%21_Review_%28by_Siringo%29 HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_7; rv:1.9.5.20) Gecko/7715-09-02 01:21:33.338318 Firefox/3.8

May 13 16:45:50 185.194.8.144

GET /index.php?days=30&from=20250422224043&limit=500&target=Buccaroo_%E2%80%93_Galgenv%C3%B6gel_zwitschern_nicht&title=Special%3ARecentChangesLinked HTTP/1.1" 404 0 "-" "Mozilla/5.0 (iPad; CPU iPad OS 17_1_1 like Mac OS X) AppleWebKit/536.2 (KHTML, like Gecko) CriOS/42.0.875.0 Mobile/25V207 Safari/536.2

May 13 16:45:51 190.123.74.179

GET /index.php?hidelinks=1&hideredirs=1&title=Special%3AWhatLinksHere%2FHeute_ich%E2%80%A6_morgen_du%21_Review_%28by_Siringo%29 HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0) AppleWebKit/535.9.6 (KHTML, like Gecko) Version/5.0 Safari/535.9.6

May 13 16:45:50 186.194.145.85

GET /index.php?from=20250423182214&fromFormatted=18%3A22%2C+23+April+2025&limit=100&target=Category%3AJos%C3%A9_Marco_Dav%C3%B3&title=Special%3ARecentChangesLinked HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_9 rv:6.0; nr-ZA) AppleWebKit/534.40.4 (KHTML, like Gecko) Version/5.0.4 Safari/534.40.4

May 13 16:45:51 172.58.51.132

GET /index.php?days=7&from=&limit=500&target=Big_Film_DVD_catalog&title=Special%3ARecentChangesLinked HTTP/1.0" 404 0 "-" "Mozilla/5.0 (iPad; CPU iPad OS 17_3 like Mac OS X) AppleWebKit/533.1 (KHTML, like Gecko) FxiOS/14.7f0257.0 Mobile/42Q660 Safari/533.1

May 13 16:45:51 152.56.3.7

GET /index.php?days=30&from=20250418061541&hidebots=0&target=Kanu_des_Manitu%2C_Das&title=Special%3ARecentChangesLinked HTTP/1.1" 200 0 "-" "Opera/8.87.(Windows NT 6.1; kk-KZ) Presto/2.9.164 Version/12.00

May 13 16:45:51 45.25.224.64

GET /index.php?days=14&from=20250426165430&hidebots=0&hideminor=1&hidemyself=1&limit=500&target=Execution&title=Special%3ARecentChangesLinked HTTP/1.0" 404 0 "-" "Opera/9.58.(X11; Linux x86_64; wa-BE) Presto/2.9.176 Version/11.00

May 13 16:45:51 73.168.78.234

GET /index.php?days=30&hidemyself=1&limit=100&target=Category%3AGiuseppe_Tuminelli&title=Special%3ARecentChangesLinked HTTP/1.0" 200 0 "-" "Mozilla/5.0 (iPod; U; CPU iPhone OS 3_3 like Mac OS X; es-CR) AppleWebKit/535.29.1 (KHTML, like Gecko) Version/4.0.5 Mobile/8B111 Safari/6535.29.1

Rebastion2 (talk) 17:23, 13 May 2025 (UTC)

trying extension:lockdown with
$wgActionLockdown['history'] = ['user'];
$wgSpecialPageLockdown['Whatlinkshere'] = [ 'user' ];
$wgSpecialPageLockdown['Recentchangeslinked'] = [ 'user' ];
see if that does anything... but the way these URLs are directly called... not sure if I am messing around a step too deep Rebastion2 (talk) 17:53, 13 May 2025 (UTC)
OK I found Externsion:Lockdown and Externsion:DisableSpedialPages to theoretically lock these down, but the way they are called (via url paramters, not directly) I think makes these moot, plus, of course it doesnt stop these before php kicks in, so maybe the only thing that will really help me is buy Cloudflare? Rebastion2 (talk) 20:42, 14 May 2025 (UTC)
testing as an anonymous user, the lockdown works even for the URL parameters the bots use, but alas, the sheer amount of bot requests just does it.... too bad Rebastion2 (talk) 20:55, 14 May 2025 (UTC)
so I did this https://www.sebastian-haselbeck.de/how-i-battled-a-ddos-attack-like-a-complete-idiot/ Rebastion2 (talk) 15:33, 28 May 2025 (UTC)