Jump to content

Project:Support desk/Flow/2024/10

Add topic
From mediawiki.org
Latest comment: 1 year ago by Cindy.cicalese in topic JS Breadcrumb Extension Stopped Working
This page is an archive.
Please ask questions on the current support desk.

Ansible Playbook to Upgrade MediaWiki

Hi.

I recently had to upgrade an old version of MediaWiki, through several versions, from 1.38.0 to 1.39.8 to 1.41.2 to 1.42.1. Seeing as that was tedious and prone to error, I created an ansible playbook to automate updating MediaWiki. I couldn't find anything similar. I wonder if there is a place this could be published, and/or discussed. I'm sure it could be improved and I hope others will find it useful. Is here the most suitable place? Thanks.

https://github.com/JonRussell00/UpgradeMediaWikiPlaybook JonRussell00 (talk) 00:08, 1 October 2024 (UTC)

This is a suitable place. You may also be interested in Joining the MediaWiki Stakeholders meeting this Friday as there are some there who have worked on Ansible playbooks for MediaWiki. MarkAHershberger(talk) 00:12, 1 October 2024 (UTC)
Info on the meeting. MarkAHershberger(talk) 00:13, 1 October 2024 (UTC)

MediaWiki 1.42.3 — Internal Error

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


After manually installing MW 1.42.3 on server with same database settings as 1.38.1 install, then deleting database in MySQL and recreating it with same settings, then importing tables in phpMyAdmin from 1.38.1 database, I get the following internal error message (See Below) telling my that Table 'dstallco_diy.DIYl10n_cache' doesn't exist, but when I check database tables in phpMyAdmin there is a Table 'dstallco_diy.DIYl10n_cache' listed.

Is there a way to resolve this internal error so wiki loads? I'm on shared hosting account with no access to command lines, and know nothing of shell scripts, etc. Am hoping there is a way for simple method to work of importing former database to new version install.

https://dstall.com/DIY/index.php

MediaWiki internal error.

Original exception: [ea0160d6bbfe382061961517] /DIY/index.php 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 1146: Table 'dstallco_diy.DIYl10n_cache' doesn't exist

Function: LCStoreDB::get

Query: SELECT lc_value FROM `DIYl10n_cache` WHERE lc_lang = 'en' AND lc_key = 'deps' LIMIT 1 DStallTX (talk) 18:20, 1 October 2024 (UTC)

I think in this context "Did you forget to run your application's database schema updater after upgrading or after adding a new extension?" basically means "Did you forget to run update.php?"
I've never done it via a browser but apparently it's possible: Manual:Upgrading#Web_browser. Jonathan3 (talk) 22:01, 1 October 2024 (UTC)
Why would I update when I already have 1.42.3 installed? Why does MW 1.42.3 think there's no Table 'dstallco_diy.DIYl10n_cache' when one was imported from 1.38.1 database, as visible in phpMyAdmin? How do I get MW to recognize that the table is there?
When I run update.php in browser, it wants to reinstall MW 1.42.3., wants me to enter username, etc. which wasn't asked when I updated other wiki.
I ran update for wiki 1.35.14; said it was updated but it's still 1.35.14. I think that's because it only updates from earlier version to latest update, but does NOT UPGRADE from one version to the next, for instance from 1.35 to 1.36. DStallTX (talk) 23:55, 1 October 2024 (UTC)
Update script is unlikely to help when the error is the l10ncache. L10ncache is the first db table mediawiki looks at, so the error likely means mediawiki cant find any db tables.
Double check $wgDBname, $wgDBhost, $wgDBprefix is correct.
Verify that the table really exists, you arent confusing I and l, you are looking at the correct db in phpmyadmin, etc. Bawolff (talk) 04:26, 2 October 2024 (UTC)
What do you mean by "arent confusing I and l"? Error message says "Table 'dstallco_diy.DIYl10n_cache' doesn't exist". See - https://dstall.com/DIY/ Is there a way to rename table in phpMyAdmin to make sure it's correct? Note that it displays as "l1" in phpMyAdmin. Should it be something else instead?
It's definitely the correct database and otherwise the correct table. See screenshot - https://dstall.com/DIY/M/P/DIYDB.jpg that shows dstallco_diy database and table DIY_I10n_cache
LocalSettings — Database and MySQL settings correct
$wgDBtype = 'mysql';
$wgDBserver = 'localhost';
$wgDBname = 'dstallco_diy';
$wgDBuser = 'dstallco_diy';
$wgDBprefix = "DIY";
This is database created in MySQLfor MW 1.42.3 manual install, then deleted and recreated with same settings for import of MW 1.38.1 database. Settings were kept the same for both databases, same settings created for original 1.38.1 database. The method works for restoring the site with same MW version installer, but I need it to work for restoring site to updated MW version, from 1.38 to 1.42.3, and 1.35.14 to 1.42.3.
What else could problem be? Is there any reason that MW 1.42.3 would not recognize table of same name generated by MW 1.38.1? DStallTX (talk) 11:17, 2 October 2024 (UTC)
I ran update browser method (/mw-config/index.php) as suggested by Jonathan3. Was afraid it would just create new database, but it didn't. I had to download LocalSettings again, but it contains same database settings. Internal error then disappeared, but now no content loads or styling, common.css, common.js, tagline, sidebar, etc. even though database is still all there in phpMyAdmin. Now it's as if MW doesn't even see/connect to the database at all even though all same database settings are in LocalSettings.php. DStallTX (talk) 13:48, 2 October 2024 (UTC)
I deleted everything and started over. Didn't get internal error this time, but Main Page title changes to Error with message "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."
Searching for MediaWiki:Common.css, MediaWiki:Common.js, MediaWiki:Tagline does nothing. Error page flashes but doesn't change to search results page or anything at all. DStallTX (talk) 14:19, 2 October 2024 (UTC)
To bottom of LocalSettings, I added $wgShowExceptionDetails = true; and $wgShowDBErrorBacktrace = true; but nothing shows on Main Page of site https://dstall.com/DIY/ DStallTX (talk) 14:25, 2 October 2024 (UTC)
"Why would I update when I already have 1.42.3 installed?" I'm at the limits of my knowledge here, but I believe update.php updates the database rather than the files. I just thought that since you had the 1.42 files but a 1.38 database you would need to run update.php to let the database catch up. But I see from Bawolff's post that I was barking up the wrong tree :-) Good luck with everything. Jonathan3 (talk) 09:54, 2 October 2024 (UTC)
I ran update browser method (/mw-config/index.php) as you suggested. Was afraid it would just create new database, but it didn't. I had to download LocalSettings again, but it contains same database settings. Internal error then disappeared, but now no content loads or styling, common.css, common.js, tagline, sidebar, etc. even though database is still all there in phpMyAdmin. Now it's as if MW doesn't even see/connect to the database at all even though all same database settings are in LocalSettings.php. DStallTX (talk) 13:54, 2 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Error: Blank page after successful installation

Hello everyone, after installing Mediawiki without any problems, I recieved a blank page. Following the guide, I added


error_reporting( E_ALL );

ini_set( 'display_errors', 1 );


to my localsettings.php. Now I recieve this message:

Fatal error: Class MediaWiki\Parser\Parsoid\Config\SiteConfig contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Wikimedia\Parsoid\Config\SiteConfig::incrementCounter, Wikimedia\Parsoid\Config\SiteConfig::observeTiming) in /home/vol9_6/infinityfree.com/if0_37425562/htdocs/includes/parser/Parsoid/Config/SiteConfig.php on line 65


What can I do now? Any help would be great! 2A02:810D:80:43BC:2DEC:BF82:F715:D668 (talk) 07:57, 2 October 2024 (UTC)

Please see "Post a new question" in the sidebar and provide all required information, plus from where exactly you downloaded MediaWiki. Malyacko (talk) 13:25, 4 October 2024 (UTC)
It would be good to know, for example, what version of php you are using. MarkAHershberger(talk) 22:34, 4 October 2024 (UTC)

[scribunto] Best way to write a module creating, editing and printing a stack

I want to create a Scribunto module allowing to call three functions:

  • create() that creates an empty stack (of strings, HTML code concretely),
  • dostuff(arguments) that edits the stack, potentially popping and pushing data,
  • print() that checks whether the stack contains a single element and prints it.

The only way I will use this is:

  • 1 call to create(),
  • several calls to dostuff(),
  • 1 call to print(),

all in a row.

My problem is that I can't do this naively since global variables aren't possible. I don't understand well enough how this all works to find oud a good solution, so what would be the best way to achieve this?

Thanks in advance (and sorry if this wasn't the right place to ask)! 194.254.61.44 (talk) 12:39, 2 October 2024 (UTC)

You can't do global variables, but you can use local variables within a page. See Module:List for some pointers. MarkAHershberger(talk) 22:40, 4 October 2024 (UTC)

accaunt

Hi,

my username is Марталан (ukrainian) and i forgot the password.

I made a recovery request, but I don't receive a letter in martapuha@hotmail.com Can I restore my account in another way? 194.44.70.73 (talk) 09:09, 3 October 2024 (UTC)

MediaWiki 1.42.3 Upgrade Issues

Totally inconsistent results so far with two upgrades to MW v.1.42.3 —

I'm compressing and downloading root folder for backup, and exporting .sql file from phpMyAdmin for database backup. Also am renaming MW root folder on server by adding "x" after it, so I can install MW 1.42.3 and rename its root folder same as old root folder (for example DIY renamed DIYx so 1.42.3 install root can be renamed DIY)

COM site — https://dstall.com/COM

How can I get rid of new look and get back to old look? Clicking on "Switch to old look" in left nav sidebar does nothing but bring up a Preferences page; Appearance tab on Preferences page gives no option for switching "looks". Even after changing some setting or other on Appearances tab, clicking link back to Main Page produces same old new look. Site was upgraded from 1.35.14 (or 1.38.7, not sure). Upgrade created Main Page with "new look". At least Common.css is applying. No other pages exist in wiki, so cannot test for those. This issue did not happen when upgrading DIY site from 1.38.7; it upgraded to old look.

Two older working MW sites without these issues —

REF site (v.1.35.14) — https://dstall.com/REF/ Note: site logo loads fine, upper left, and all links in left nav sidebar are working fine without "index.php"

MOD site (v. 1.38.1) — https://dstall.com/MOD/ Note: site logo loads fine, upper left, all links in left nav sidebar are working fine without "index.php", as well as page links.

DIY site — https://dstall.com/DIY

Horrible upgrade issues ; had to troubleshoot for days, reinstall v.1.42.3 over and over again to finally get rid of "internal issues", but then got "Error" title substituted for Main Page with no data or styling, and no working page links. Finally got upgrade to produce interface recognizing "tables in database" asking to upgrade them, so was at least able to upgrade and get site to load, however, now there's these issues —

1) Logo no longer displays — LocalSettings for logo no longer work - $wgScriptPath = '/DIY'; $wgLogo = $wgScriptPath . '/M/P/DIY.png'; Note: I don't upload media through MW, instead create M (media) directory in MW root, with P, A, V, D folders for photos, audio, video, and (other) documents. Path for logo is set to dstall.com/M/P/ as it was in older site before upgrade but does not load in v.1.42.3. See links abov to older working sites REF and MOD where logo loads just fine.

2) Short URL no longer works — LocalSettings - $wgArticlePath = {$wgScriptPath}/$1"; $wgUsePathInfo = true; no longer remove "index.php" to shorten URLs. See links above to older working sites REF and MOD where LocalSettings for ShortURL work just fine. DStallTX (talk) 17:53, 3 October 2024 (UTC)

In relation to your first question:
(a) https://dstall.com/DIY/M/P/DIY.jpg exists but https://dstall.com/DIY/M/P/DIY.png gives a 404 error.
(b) Manual:$wgLogo isn't meant to be used anymore. See the notes on that page. Jonathan3 (talk) 19:36, 3 October 2024 (UTC)
Logos aren't loading any more using $wgLogo = $wgScriptPath . '/M/P/DIY.png'; in LocalSettings.
What code should I be using in Local Settings to load logo? DStallTX (talk) 20:13, 3 October 2024 (UTC)
$wgLogos = "{$wgScriptPath}/mylogo.jpg"; as listed in Manual breaks the site DStallTX (talk) 03:06, 4 October 2024 (UTC)
That's not "as listed in the Manual" :-) Check out Manual:$wgLogos#Simple_example. Jonathan3 (talk) 09:59, 4 October 2024 (UTC)
Manual says 1x, 1.5x, 2x are depredated, or will be, so I'm going to convert my .png logos(icons) to SVG format. I'm simply using the following; is that OK?
$wgLogos = ['icon' => "$wgScriptPath/M/P/REF.png",=];
How do I get rid of text link (name of wiki) to right of logo? And/or how do I load an SVG image link instead like Wikipedia has — "Wikipedia" (with tagline beneath) "The Free Encylopedia"? DStallTX (talk) 12:51, 4 October 2024 (UTC)
Get rid of the ,= and it looks all right. Probably best to start a new topic for each new topic :-) Jonathan3 (talk) 13:27, 4 October 2024 (UTC)
In relation to your second question, did you maybe have .htaccess rewrite rules for the wiki before upgrading and forget to copy that file across? See Manual:Short_URL and Manual:Short_URL/Apache. Jonathan3 (talk) 19:40, 3 October 2024 (UTC)
Yes, forgot .htaccess; adding it fixed issue.
Any idea why COM wiki upgraded to new look, whereas DIY wiki kept old look after upgrade?
How do I fix DIY wiki so it has new look? Delete and try re-installing again? DStallTX (talk) 20:16, 3 October 2024 (UTC)
Maybe you specified specific skins in LocalSettings.php on some wikis and not others? I don't know.
Incidentally although this is a wiki, on the talk pages it helps not to go back and edit things :-) Jonathan3 (talk) 11:33, 4 October 2024 (UTC)

On the ReplaceText Special page, I want to update the "Use regular expressions" option to include a link to another page: "Use regular expressions". I am able to edit MediaWiki:Replacetext_useregex and it looks fine on the System message page, but shows as Wikitext on Special:ReplaceText.

I tried it with both internal and external links and the behavior is the same. See screenshot here: https://i.imgur.com/SZ4Vcwk.png

I am able to add links on other system messages (such as Mediawiki:Minoredit) and it works fine.

Using MediaWiki 1.42.1. MikeDarling (talk) 14:05, 4 October 2024 (UTC)

Some system messages support links some dont. You can file a request in https://phabricator.wikimedia.org to ask the replace text developer to change the message type Bawolff (talk) 14:30, 4 October 2024 (UTC)

undelete a page get "[Zv_wn1a76jwBUjyJaCxwwgAAAEM] 2024-10-04 13:41:51: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

The place I work has mediawiki 1.24.2 installed on a CentOS 7 machine (php 5.4.16, MySQL 5.7). Now we need to have it run on Rocky 9 (php 8.0.30, MySQL 8). What I did is:

1. dump the DB from the old server, and restore on the new server.

2. upgrade mediawiki from 1.24.2 to 1.35.14, and then to 1.39.8.

After upgrade, it seems mostly works fine. The only problem found so far is when "undelete" old pages (like the one deleted 2-3 months ago), I got the error: [Zv_wn1a76jwBUjyJaCxwwgAAAEM] 2024-10-04 13:41:51: Fatal exception of type "Wikimedia\Rdbms\DBQueryError". I tried to run the scripts of "updateSearchIndex.php" and "rebuildtextindex.php", but seems not help. Step2024 (talk) 14:28, 4 October 2024 (UTC)

Try setting up debug logs by looking at How to Debug. MarkAHershberger(talk) 22:43, 4 October 2024 (UTC)
I am seeing following after turn on debug:
[ZwQJdv_zYIzV8WNmtUJ0yQAAAFU] /geos-chem/index.php?title=Special:Undelete&action=submit 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 1062: Duplicate entry '6410-910' for key 'revision_comment_temp.PRIMARY'
Function: CommentStore::insertInternal
Query: INSERT INTO `revision_comment_temp` (revcomment_rev,revcomment_comment_id) VALUES (6410,'910') Step2024 (talk) 16:28, 7 October 2024 (UTC)
The update is trying to add data to the revision_comment_temp table, which is a temporary table that was used to assist in the modification of the revision table. You can read a little bit about it in Manual:Revision comment temp table. However, this data cannot be added, as this would be duplicate with already existing data (it want to add it twice, but there can be only one).
This might be from a previous failure, which it is trying to execute again. Or because the data that it is trying to copy is already 'broken'.
The best advise might be.. go back to a backup of the db and try to upgrade again, but be sure to verify that the each of the upgrade steps succeeds. I would advise to always update the DB with all extensions disabled. then re-enable the extensions and run the update script again. This ensures that extensions (generally much less reliable) do not get in the way of the most critical updates. —TheDJ (Not WMF) (talkcontribs) 08:32, 9 October 2024 (UTC)

Mediawiki PHP stubs

Would it be possible to have some official stubs at least for Mediawiki core? I have made an attempt here: https://github.com/JohnRDOrazio/mediawiki-stubs, however I have not been very successful in getting it to work in VSCode with intelephense. Perhaps someone more experienced with PHPStan or `nikic/php-parser` or similar tools could provide a repository with official stubs that can be used with VSCode intelephense? It would make development of plugins or code contributions to core that much easier...

And perhaps this should be another topic, but along the sames lines of development environment: when using composer to add the mediawiki codesniffer rules to my project, i.e.

        "require-dev": {
                "mediawiki/mediawiki-codesniffer": "43.0.0",
                "mediawiki/mediawiki-phan-config": "0.14.0",
                "mediawiki/minus-x": "1.1.3",
                "php-parallel-lint/php-console-highlighter": "1.0.0",
                "php-parallel-lint/php-parallel-lint": "1.4.0"
        }

I get the following error:

phpcs: Trait "MediaWiki\Sniffs\PHPUnit\PHPUnitTestTrait" not found in {path-to-project}/vendor/mediawiki/mediawiki-codesniffer/MediaWiki/Sniffs/PHPUnit/SetMethodsSniff.php on line 15

What am I missing to get this to work nicely with VSCode?

I have a .phpcs.xml file in the root folder of my project:

<?xml version="1.0"?>
<ruleset>
    <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
    <file>.</file>
    <arg name="extensions" value="php"/>
    <arg name="encoding" value="UTF-8"/>
</ruleset>

Lwangaman (talk) 18:23, 4 October 2024 (UTC)

I'm not using VSCode, but I do use intelephense and I'm having some success. Since it works for me without stubs, I'm curious what you mean about stubs? That said I do use "intelephense.environment.includePaths" to point to the mediawiki core when I'm working on extensions.
Does that help? MarkAHershberger(talk) 22:52, 4 October 2024 (UTC)
A stubs file is a PHP file containing all of the function / method / constant signatures for a codebase together with their Doc Blocks, so that even without having a local copy of the Mediawiki core, you won't get "undefined method" or similar errors in the Code editor, and you get information about the class or method or constant when you hover over it (so you can see which parameters a method expects for example, or which methods are available on a class instance).
I think that the trouble I was having may be due to the memory limit imposed by intelephense (see https://github.com/bmewburn/vscode-intelephense/issues/3083#issuecomment-2394779492). My stubs file is 9MB, so `intelephense.files.maxSize` needs to be set to a value greater than 9MB. I haven't gotten around to testing this yet, but I wouldn't be surprised if that were the issue. My attempt at producing the stubs file is fairly rudimentary, and winds up being more bloated than necessary (classes within the same namespace should be grouped together within the same namespace block instead of being each in their own namespace block, for example). 9MB seems a bit much for a stubs file, and it could perhaps be broken down into multiple stubs files.
An example of a similar stubs file for WordPress: https://raw.githubusercontent.com/php-stubs/wordpress-stubs/refs/heads/master/wordpress-stubs.php. This stubs file is 4.66MB. Lwangaman (talk) 02:27, 4 November 2024 (UTC)
I have finally fixed generation of the MediaWiki intelephense stubs, after spending a whole day to fine tune the generation script. The updated stubs: https://github.com/JohnRDOrazio/mediawiki-stubs/tree/main/stubs. I have also published the generation script on packagist: https://packagist.org/packages/johnrdorazio/mediawikistubs.
I manually added the stubs to the VSCode intelephense `node_modules` folder and enabled `mediawiki` as an entry in the extension's `package.json`, and I now finally have intelligent recognition of core classes, methods, definitions, etc. I requested that the stubs be added by default to the extension stubs, see https://github.com/bmewburn/vscode-intelephense/issues/3083#issuecomment-2455722065. Lwangaman (talk) 21:36, 4 November 2024 (UTC)

Tagline Won't Display MW 1.42.3

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Have entered tagline at MediaWiki:Tagline but it will not display at https://dstall.com/COM/

Sample pages where tagline should appear, but doesn't — https://dstall.com/COM/Test_1 , https://dstall.com/COM/ALL_Pages

Tagline displays fine on 2 other 1.42.3 sites — https://dstall.com/REF/ , and https://dstall.com/DIY/

Am using the following in Common.css; deleted it for COM site but tagline still doesn't display — siteSub { font-size: 1.1em; font-style: italic; display: block; } DStallTX (talk) 18:25, 4 October 2024 (UTC)

Using the inspector on your page, I see the following CSS:
/* Hide Tagline on Main Page */
body.page-Main_Page.action-view #siteSub,
body.page-Main_Page.action-submit #siteSub {display: none;}
(from your MediaWiki:Common.css) and
  #siteSub {
    font-size: 0.875rem;
    display: none;
  }
That can be found in Vector's CSS. MarkAHershberger(talk) 23:22, 4 October 2024 (UTC)
Yes, it's turned off on Main Page, but that should not affect other pages.
Where is Vector CSS file? I don't see one in skins > Vector folder. And I don't see why that would override my Common.css. It's not done that on 3 other sites.
What do I enter inn Common.css to display tagline ? display: what??? DStallTX (talk) 19:23, 5 October 2024 (UTC)
I managed to find Vector's CSS. When I changed display: none to display: show, tagline reappeared. I added siteSub styling back to Common.css and could tell styles were applying as should, then changed Vector's CSS back to display: none. Tagline still works.
I don't understand these kinds of inconsistent behaviors. I have 2 other wikis that have been upgraded to v.1.42.3 which did not have such issue with tagline failing to display after previously displaying. DStallTX (talk) 11:43, 6 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

1) Is there a way to hide Tools menu at top of pages from Anonymous and logged out users? I was able to do that on v.1.38.1, but don't remember how I did it — https://dstall.com/MOD/Have checked my Common.css but don't find anything there.

2) Is it customary for there to be two horizontal lines above and below the Tools menu on the Main Page? I newly upgraded 3 sites to v.1.42.3, and 2 sites (REF, COM) have both horizontal lines on Main Page, but 1 site (DIY) only has bottom line.

3) Are there ways to hide the top line, and also the bottom line on Main Page and any other pages?

In my older v.1.38.1 site, tagline displayed immediately beneath horizontal line under page title. Now it displays beneath the bottom line unde the tools menu. This separates the tagline from the page title by whitespace 1/4" or more tall, which I'd like to see eliminated except for users who are logged in and need the Edit, Watchlist, and Tools menu functions.

4) Is there a way to block Anonymous users from accessing Common.css and Common.js?

5) Is there a way to decrease white space between end of page content and horizontal line at bottom of page, under which is displayed Last Page Edit, etc.? Currently there's about I" tall whitespace on the 3 sites I just upgraded — https://dstall.com/REF/ , https://dstall.com/DIY/ , https://dstall.com/COM Whitespace appears to maybe be the same on Wikipedia home page, but there isn't any large bottom whitespace like that on Wikipedia article pages. DStallTX (talk) 18:55, 4 October 2024 (UTC)

Re 4: do you want to block people from reading it? If you do that, then you'll only serve them un-styled pages. MarkAHershberger(talk) 23:24, 4 October 2024 (UTC)
I want to serve them styled pages, so are you saying that means I have to let them see my Common.css page? DStallTX (talk) 01:53, 5 October 2024 (UTC)
They're going to have access to it if you serve them a styled page, so "yes". MarkAHershberger(talk) 00:10, 7 October 2024 (UTC)

JS Breadcrumb Extension Stopped Working

I've used Extension:JSBreadCrumb for several years with no problems, downloaded latest version for MW 1.42.3, and installed on 3 sites I upgraded. Breadcrumbs were working fine, but now no longer display.

Any idea how to troubleshoot this? JSBreadCrumb is the only extension I'm using, and vector-2022 the only skin.

See LocalSettings for REF site — http://dstall.com/LocalSettings.txt and Common.css https://dstall.com/REF/MediaWiki:Common.css DStallTX (talk) 19:44, 4 October 2024 (UTC)

you should not post your un-redacted localsettings file -- make sure you hide the passwords.
I'm not familiar with jsbreadcrumbs but maybe @Cindy.cicalese could help you. MarkAHershberger(talk) 23:31, 4 October 2024 (UTC)
A workaround until the vector-2022 selector is added directly to the extension is at Extension talk:JSBreadCrumbs#h-Selector_for_Vector_(2022)_Theme-20241012221900. Cindy.cicalese (talk) 14:51, 12 January 2025 (UTC)
Fixed in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/JSBreadCrumbs/+/1110372 Cindy.cicalese (talk) 17:51, 12 January 2025 (UTC)

Disable Limited Width Mode Globally in v.1.42.3

How can I disable limited width globally for all anonymous users (not logged in) in v.1.42.3?

I'm able to disable it for myself in "Switch to old look", but as soon as I log out as if anonymous, then site reverts back to fixed width.

If there's no way to do that, then is there a way to at least increase the fixed width so it's same width and not less than from left edge of hamburger menu upper left and right edge of Log in, like it is on Wikipedia home page? https://en.wikipedia.org/wiki/Main_Page Fixed width on my sites is much less with a lot of space on right and left. See — https://dstall.com/DIY/Main_Page DStallTX (talk) 19:56, 4 October 2024 (UTC)

Do you mean you want the site served with this look: https://dstall.com/DIY/Main_Page?useskin=vector ??
If so, change
$wgDefaultSkin = 'vector-2022';
to
$wgDefaultSkin = 'vector';
MarkAHershberger(talk) 23:38, 4 October 2024 (UTC)
No, I want styling of vector-22 skin and to disable fixed width (or increase it to match Wikipedia) in vector-2022 skin for everyone, and only allow registered users to opt for it in "Switch to old look". Is that possible? DStallTX (talk) 01:52, 5 October 2024 (UTC)
After finding the option in skin.json, it looks like
$wgDefaultUserOptions['vector-limited-width'] = 0;
does what you want. MarkAHershberger(talk) 00:09, 7 October 2024 (UTC)

Apparently, when I try to make a Module such as Infobox, InfoboxImage or Navbar, I get this error every time when I try to save or submit them:

Fatal exception of type "MediaWiki\Extension\Scribunto\Engines\LuaCommon\LuaInterpreterNotExecutableError"

I tried to fix it with what I though it was with enabling InstantCommons or just putting all Windows OS (both 32 and 64) up to 755 on the LuaStandalone. I was actually following the outdated importation manual of Wikipedia infoboxes and I have no idea why people haven't updated either the Short URL manual or this one. NormalRichard (talk) 15:12, 5 October 2024 (UTC)

One thing to note for sure is that the MediaWiki version is 1.42.1 and the PHP version is 8.3.6. NormalRichard (talk) 15:15, 5 October 2024 (UTC)
InstantCommons isnt related to this error
755 is a linux thing and not something that applies to windows. (Can you clarify what you did here? Because its literally impossible on windows which based on your comment you are using.)
Can you clarify which os you are using and on what processor type? Bawolff (talk) 15:51, 5 October 2024 (UTC)
I'm using Windows x64. I only set the permissions to 755 on both Windows x64 and x32's LuaStandalone version of Scribunto. NormalRichard (talk) 20:33, 5 October 2024 (UTC)
Can you describe what you mean by setting to "755"? Bawolff (talk) 20:55, 5 October 2024 (UTC)
The permissions on cPanel, according to the page Infobox, which they meant activating all modes in User, and both Read and Execute in Group and World. NormalRichard (talk) 21:00, 5 October 2024 (UTC)
Ok, that means you are using linux (the important part is what cpannel is running under).
Try setting the execute bit on includes/Engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua Bawolff (talk) 23:00, 5 October 2024 (UTC)

Override Page Title Tag

I'm trying to override the text inside the <title> tag for certain pages, specifically on the upload Special:Upload pages with the value specified in the wpDestFile url paramter. Is this possible and if so what hook would I use? I was thinking I might be able to use BeforePageDisplay but I don't think that allows me to modify content in the head. Jer Hughes (talk) 03:40, 6 October 2024 (UTC)

Are you using $out->setHTMLTitle()?
Im pretty sure beforePageDisplay is the correct hook. Bawolff (talk) 12:44, 6 October 2024 (UTC)
Thank you very much, that was the hook. I have the hardest time understanding function documentation page and often rely too much on the manual in MediaWiki for the hook. Jer Hughes (talk) 15:32, 6 October 2024 (UTC)

MobileView MW 1.42.3

Why are there NO display of Site Logo and Main Menu (hamburger menu) upper left on iPhone and NO Log in link or Search function upper right? Both display fine on iPad (11"), but not iPhone.

And why are there 3 dots in horizontal line upper right on iPad that do nothing? The same 3 dots are offscreen to right on iPhone and must be scrolled over to in order to access. Clicking 3 dots on iPhone brings up Login link. Why are these functions not consistent across devices???? Very confusing! and frustrating!

LocalSettings — MFAutodetectMobileView = true; DefaultMobileSkin = 'vector'; $wgDefaultSkin = 'vector-2022'; wfLoadSkin( 'Vector' );

Issue persists after changing DefaultMobileSkin = 'vector-2022';

I have downloaded and installed Vector-2022 latest version 1.42

Sites — https://dstall.com/REF https://dstall.com/COM/ DStallTX (talk) 08:43, 6 October 2024 (UTC)

How can I fix Error 1146?

There was a server timeout or other issue while updating MediaWiki v.1.38.1 to v.1.42.3 on my shared hosting account.

Prior to updating, I compressed and downloaded my MediaWiki root folder and exported .sql from phpMyAdmin for backup. Previously I successfully backed up and restored this way for 3 other smaller wikis with a few to a dozen or so pages, whereas this last wiki update had over 100 pages.

I deleted MW 1.42.3 folder from server and restored my original v.1.38.1 root folder, and also deleted the database in MySQL, then recreated it, and imported .sql backup in phpMyAdmin.

But now I'm getting Error 1146 which says Table 'dstallco_mod.MOD_user' doesn't exist (localhost), which never happened with 3 other smaller wiki sites.

Is there any way to fix that?

Is this a server issue or an issue with my .sql export? If with export, how can that be prevented, bc if I can't depend on backups, it's not worth spending years creating wiki data.

See — https://dstall.com/MOD/ DStallTX (talk) 12:55, 6 October 2024 (UTC)

It sounds like you might have imported or created the .sql backup incorrectly Bawolff (talk) 14:49, 6 October 2024 (UTC)
Why? I created the backup the same way as I did for 3 other sites, and I have no problem restoring database for them.
What is incorrect about the way in which I created the backup?
Is there no way to add the missing table back to the database? My hosting provider has been doing that but all it does is open up another error. Now the text table is missing data. See - https://dstall.com/ViewTicket.pdf
See topic Backup & Restore to Shared Hosting Server where you commented — https://www.mediawiki.org/w/index.php?title=Topic%3AYd5sgal90mfwqk2l&topic_showPostId=yd6mlf8r98hos5d5&fromnotif=1#flow-post-yd6mlf8r98hos5d5
You referred me to instructions here, which are what I followed exactly — https://docs.bitnami.com/aws/apps/dolibarr/administration/export-database/
Why was my .sql export from phpMyAdmin incomplete?
How am I supposed to know when making a backup (SQL dump - export) whether it is complete or not?
Is the issue with phpMyAdmin? Could same thing happen with MySQL export of database?
Is there any way of creating an SQL dump that is not subject/prone to corruption by incompletion or anything else?
If not, then this is all a big ruse, one big exercise in frustration and futility. Two complete years of work utterly ruined — trashed, flushed completely down the drain. And here I'd been singing the praises of MediaWiki for doing research and managing information to everyone. Now I feel like nothing but a complete and utter fool! and am left wishing I'd never even heard of MediaWiki. DStallTX (talk) 15:18, 6 October 2024 (UTC)
> How am I supposed to know when making a backup (SQL dump - export) whether it is complete or not?
First rule of backups is that an untested backup is not a backup.
The error is saying the data is missing. Logically the most likely explanation is that the backup did not include the data that is now missing or the backup did include it, but it was not reimported for some reason.
You could try and open the sql dump file with a text editor and see if it includes the user table. If you dont care about users you could create a stub table since its just users not content (but if users are missing other things too) Bawolff (talk) 16:48, 6 October 2024 (UTC)
Here's what hosting support says. Note that my export of .sql did not show any errors when exporting —
The SQL file you exported is not complete, which is why when we import it it runs into an error eventually. If that SQL file was complete then we would have no issues importing it at all. The SQL file is missing around ~6 tables, I did add them manually though - I just copied the database tables from another one of your sites.
However, now the issue is the MOD_text table is missing some content and that is causing this error:
Exception caught inside exception handler: [0a7df3e3a04e29d22fec8f2c] /MOD/Maintenance/FindBadBlobs.php MediaWiki\Revision\RevisionAccessException: Failed to load data blob from Unable to fetch blob at tt:26946. Use findBadBlobs.php to remedy.If this problem persist, use the findBadBlobs maintenance script to investigate the issue and mark bad blobs.
With regards to the rollback, I did rollback the files. Its mainly the database I am having issues with as i cannot import it fully. I did also check why that DB is not in JetBackup and its because the mod_text table kept erroring out the export due to an issue with its data. Its the same reason when you exported it manually it also errored out on that exact table.
I also ran that findbadblobs script:
php -q /home/dstallco/domains/dstall.com/public_html/MOD/maintenance/findBadBlobs.php --scan-from --mark
But that then produced an error:
[dstallco@d1 ~]$ php -q /home/dstallco/domains/dstall.com/public_html/MOD/maintenance/findBadBlobs.php --scan-from 20200101000000
Scanning revisions table, 1000 rows starting at rev_timestamp 20200101000000
Wikimedia\Rdbms\DBQueryError from line 1606 of /home/dstallco/domains/dstall.com/public_html/MOD/includes/libs/rdbms/database/Database.php: Error 1176: Key 'rev_timestamp' doesn't exist in table 'MOD_revision' (localhost)
Function: FindBadBlobs::loadRevisionsByTimestamp
Query: SELECT rev_id,rev_page,rev_timestamp,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,comment_rev_comment.comment_text AS `rev_comment_text`,comment_rev_comment.comment_data AS `rev_comment_data`,comment_rev_comment.comment_id AS `rev_comment_cid`,actor_rev_user.actor_user AS `rev_user`,actor_rev_user.actor_name AS `rev_user_text`,temp_rev_user.revactor_actor AS `rev_actor` FROM `MOD_revision` FORCE INDEX (rev_timestamp) JOIN `MOD_revision_comment_temp` `temp_rev_comment` ON ((temp_rev_comment.revcomment_rev = rev_id)) JOIN `MOD_comment` `comment_rev_comment` ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) JOIN `MOD_revision_actor_temp` `temp_rev_user` ON ((temp_rev_user.revactor_rev = rev_id)) JOIN `MOD_actor` `actor_rev_user` ON ((actor_rev_user.actor_id = temp_rev_user.revactor_actor)) WHERE rev_timestamp > '20200101000000' OR (rev_timestamp = '20200101000000' AND rev_id > 0 ) ORDER BY rev_timestamp, rev_id LIMIT 1000
#0 /home/dstallco/domains/dstall.com/public_html/MOD/includes/libs/rdbms/database/Database.php(1590): Wikimedia\Rdbms\Database->getQueryException()
#1 /home/dstallco/domains/dstall.com/public_html/MOD/includes/libs/rdbms/database/Database.php(1564): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
#2 /home/dstallco/domains/dstall.com/public_html/MOD/includes/libs/rdbms/database/Database.php(1173): Wikimedia\Rdbms\Database->reportQueryError()
#3 /home/dstallco/domains/dstall.com/public_html/MOD/includes/libs/rdbms/database/Database.php(1810): Wikimedia\Rdbms\Database->query()
#4 /home/dstallco/domains/dstall.com/public_html/MOD/includes/libs/rdbms/database/DBConnRef.php(69): Wikimedia\Rdbms\Database->select()
#5 /home/dstallco/domains/dstall.com/public_html/MOD/includes/libs/rdbms/database/DBConnRef.php(319): Wikimedia\Rdbms\DBConnRef->__call()
#6 /home/dstallco/domains/dstall.com/public_html/MOD/maintenance/findBadBlobs.php(276): Wikimedia\Rdbms\DBConnRef->select()
#7 /home/dstallco/domains/dstall.com/public_html/MOD/maintenance/findBadBlobs.php(196): FindBadBlobs->loadRevisionsByTimestamp()
#8 /home/dstallco/domains/dstall.com/public_html/MOD/maintenance/findBadBlobs.php(152): FindBadBlobs->scanRevisionsByTimestamp()
#9 /home/dstallco/domains/dstall.com/public_html/MOD/maintenance/doMaintenance.php(114): FindBadBlobs->execute()
#10 /home/dstallco/domains/dstall.com/public_html/MOD/maintenance/findBadBlobs.php(532): require_once('/home/dstallco/...')
#11 {main} DStallTX (talk) 19:01, 6 October 2024 (UTC)
How do I create a "stub table"?
How am I supposed to test backup, when in order to do so, I must delete the existing database in order to recreate it empty with same name, then import .sql backup?
After doing so and it fails, then what? SOL? That's essentially what happened. I backed up, ran 1.42.3 installer which only partially completed, at which point original database had partially been updated and would no longer work with backup 1.35.14 original site.
So I deleted database, recreated with same name/settings, then imported .sql and now get errors.
If that's the only method of confirming exported database is complete, then it's good for nothing. I cannot waste time on something like that which is prone to fail as it has DStallTX (talk) 19:01, 6 October 2024 (UTC)
How do I create a "stub table"?
How am I supposed to test backup, when in order to do so, I must delete the existing database in order to recreate it empty with same name, then import .sql backup?
After doing so and it fails, then what? SOL? That's essentially what happened. I backed up, ran 1.42.3 installer which only partially completed, at which point original database had partially been updated and would no longer work with backup 1.35.14 original site.
So I deleted database, recreated with same name/settings, then imported .sql and now get errors.
If that's the only method of confirming exported database is complete, then it's good for nothing. I cannot waste time on something like that which is prone to fail as it has. DStallTX (talk) 18:53, 6 October 2024 (UTC)

Just Uploaded File Page Views VS Pre-Existing File Page Views

Is there a way to tell if a user is viewing a file's page because they just successfully uploaded it versus just viewing a pre-existing file? Jer Hughes (talk) 15:58, 6 October 2024 (UTC)

Perhaps during upload in a hook you could store something in user's session e.g. RequestContext::getMain()->getSession()->set( 'keyname', 'value' ); and then read & delete the value in a hook in the image page display. Bawolff (talk) 16:41, 6 October 2024 (UTC)
Thanks! I'm trying to hook into when file uploads are happening so I can try setting a key value pair. I'm using the function below but I can't get it to trigger on any file uploads.
function onFileUpload($file, $reupload, $hasDescription){
	...
	return true;}
$wgHooks['onFileUpload'][] = 'onFileUpload';
Any suggestions on how I can fix my hook? Jer Hughes (talk) 17:46, 6 October 2024 (UTC)
It should be $wgHooks['FileUpload'][] = 'onFileUpload'; (no "on" in the hook name, just the function name) Bawolff (talk) 21:43, 6 October 2024 (UTC)
Thank you very much! And finally, now that I think I've set a session value, where can I learn how I can retrieve or clear it?
For example, I'm using the BeforePageDisplay hook as I'll want to change the output HTML based on the value of a session's keyname. Jer Hughes (talk) 00:31, 7 October 2024 (UTC)
You should be able to access it via $out->getRequest()->getSession()->get( 'keyname', 'default value if no such key'); (you can also use ->exists() )
After you read it you probably want to do $out->getRequest()->getSession()->remove( 'keyname' ); to delete the key Bawolff (talk) 15:06, 7 October 2024 (UTC)
It was going so well until the next day when I made some changes and now I get Call to undefined method RequestContext::getSession() when using RequestContext::getMain()->getSession()->set('keyname', 'value'); inside a UploadComplete hook. I'm trying to figure out what I did to make it fussy. It seems like RequestContext::getMain() doesn't throw any errors but as soon as I add the getSession part it starts having issue. Can I append getSession anywhere in the code I can add getMain or can it only be called from certain places? Jer Hughes (talk) 20:48, 7 October 2024 (UTC)

Archive in Mediawiki

Hi ! is there an option to archive a page in mediawiki? Does it have feature or is it possible to implement a feature where in you can select articles from specific dates/yeas and then move them to either disposal or archive at once?

Thank you . Rbaojan (talk) 03:44, 7 October 2024 (UTC)

What do you mean by 'archive'? Previous revisions of every page are maintained. For disposal, you could delete a page. Perhaps you just want to be able to track pages that are considered non-current, in which case maybe a simple banner template would suffice? For example, {{Historical }}. Sam Wilson 05:48, 7 October 2024 (UTC)
Sorry for the late reply . I mean is there a way i can generate all the list of articles in a page ?and then from there i can select multiple items either completely move them in to trash or put them archive page or folder . is that possible ? Thank you Rbaojan (talk) 00:25, 9 October 2024 (UTC)
@Rbaojan: For deleting multiple pages at once, you might look at Extension:DeleteBatch. For moving to an "archive page or folder" I'm not really sure what you mean: if you want to move a list of pages from one page to another, you can copy and paste it; for moving to a subpage (if that's what you mean by 'folder'), I'm not sure what the best approach would be other than just the one-at-a-time move function (or a bot). Maybe someone else has a better idea. Sam Wilson 04:18, 9 October 2024 (UTC)
Hi ! @Samwilson . I think i finally understand the archive thing and deletion in mediawiki a little bit . I was honestly confused with my question at first too . I did some further researched and realized that when you actually deleted a page it automatically goes in deletion logs, which i think you may considered as archive list too as it dont really automatically or directly removed in database and you can restore them anytime . unless you use the DeleteForGood extension which permanently delete the page. Ive also found an extension which is Nuke for mass delete and DeleteBatch too like the one you mentioned but im not quiet yet sure how it works .
For displaying all the pages, i think i can use the Special:AllPages . I just need to add additional filter based on year it was created .Also, I still have a small confusion between articles and pages , like how do i actually determine if its an article? Thanks Rbaojan (talk) 07:18, 10 October 2024 (UTC)

WHM immunify malicious content detected

Imunify AV on WHM is detecting resources\lib\intersection-observer\README.md as malware. The reason given is "SMW-INJ-CLOUDAV-js.spam-27295-5". I just downloaded version 1.42.3 and compared the file contents and it is the same as what I have on my server. 117.20.69.51 (talk) 04:50, 7 October 2024 (UTC)
If "Imunify AV" on WHM (what is that?) complains about this text file in MediaWiki 1.42.3, then feel free to report to "Imunify AV" that their software is broken. :) Malyacko (talk) 13:42, 7 October 2024 (UTC)
it is probably a false positive. Bawolff (talk) 15:24, 7 October 2024 (UTC)
WHM is the standard user interface you get on a dedicated linux hosting package. I think it stands for Web Host Manager. Imunify is one of the tools that came with it. Not sure how standard it is. 117.20.69.51 (talk) 19:40, 7 October 2024 (UTC)
I got the same alert. Also wondered why TF they would consider this as malware. WHM in general does quite some BS often. Thanks. 2A01:827:D32:6E01:FCFF:DB25:91EA:55C2 (talk) 09:20, 8 October 2024 (UTC)
That is a clear false positive, particularly because it is a README.md text file. But the issue probably comes because it contains a reference to polyfill.io recognized as a source of spam content redirection. See their blog post https://blog.imunify360.com/new-signatures-released-to-counter-polyfill.io-supply-chain-attack and the original code where you can verify the integrity of the files in the library https://github.com/GoogleChromeLabs/intersection-observer/blob/main/README.md
HTH 81.35.28.228 (talk) 10:53, 26 October 2024 (UTC)

Image uploads directory

I'm running a small wiki (1.39.7) at home, which I've been running for a few years, mostly to store recipes etc... I've just migrated to a new OS, Linux Mint 22. Everything is working fine, except any new images I add are uploaded to /usr/share/mediawiki/images. Existing images are stored in /var/lib/mediawiki/images. So, MediaWiki is uploading images to one directory but then looking for them in another. Existing images load OK, whereas recent ones don't. I've looked in LocalSettings.php but I can't see where the upload path is being set or how to override it. MichaelFoot 27 (talk) 13:03, 7 October 2024 (UTC)

I don't know but is there anything here that helps? Manual:$IP, Manual:$wgUploadDirectory, Manual:Configuring_file_uploads? Jonathan3 (talk) 13:19, 7 October 2024 (UTC)
Thanks, I've already looked at those and tried tinkering with $wgUploadPath and $wgUploadDirectory to no avail. MichaelFoot 27 (talk) 13:28, 7 October 2024 (UTC)
So it sounds like you are using mediawiki from your package manager (apt)? If so, $wgUploadDirectory might be getting overriden by package settings.
Make sure you are setting it at the bottom of LocalSettings.php. if all else fails you could try
$wgExtensionFunctions[] = static function () { global $wgUploadDirectory; $wgUploadDirectory = "/var/lib/mediawiki/images"; }; Bawolff (talk) 15:23, 7 October 2024 (UTC)
@Bawolff thanks. Yes, I am using mediawiki from the package manager. I've added the lines you suggest at the very bottom of LocalSettings.php and it's still uploading images to /usr/share/mediawiki/images. I'm sure you're correct that $wgUploadDirectory is getting overwritten, I just don't know where. MichaelFoot 27 (talk) 16:05, 7 October 2024 (UTC)

Cannot configure ldap on version 1.42.3

I am running Rocky Linux release 9.4 and have installed the following extensions:

cd /var/www/html/mediawiki/extensions

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LDAPAuthentication2

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LDAPProvider

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LDAPAuthorization

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Auth_remoteuser

Added the following code at the bottom of the LocalSettings.php file:

wfLoadExtensions( [

        'PluggableAuth',

        'Auth_remoteuser',

        'LDAPProvider',

        'LDAPAuthentication2',

        'LDAPAuthorization',

        'LDAPUserInfo'

] );

created ../ldapprovider.json

{

        "LDAP": {

                "connection": {

                        "server": "auth1.b.com",

                        "port": "636",

                        "enctype": "ssl",

                        "user": "cn=read-only-admin,dc=b,dc=com",

                        "pass": "KvNCxxxx94QIiyZ",

                        "options": {

                                "LDAP_OPT_DEREF": 1

                        },

                        "basedn": "dc=b,dc=com",

                        "groupbasedn": "ou=group,dc=b,dc=com",

                        "userbasedn": "ou=people,dc=b,dc=com",

                        "searchattribute": "uid",

                        "searchstring": "uid=USER-NAME,ou=people,dc=b,dc=com",

                        "usernameattribute": "uid",

                        "realnameattribute": "cn",

                        "emailattribute": "mail"

                }

        }

}

I can login locally but LDAP doesn't work. I can login from the OS level e.g. su - ldapuser1 on this machine so I know there is an active connection. Techietubby (talk) 11:37, 8 October 2024 (UTC)

If I run the maintenance scripts I get an error e.g.
php maintenance/run.php ./extensions/LDAPProvider/maintenance/ShowUserGroups.php --conf /var/www/html/mediawiki
PHP Fatal error:  Uncaught MediaWiki\Settings\SettingsBuilderException: None of the built-in formats are suitable for '/var/www/html/mediawiki' in /var/www/html/mediawiki/includes/Settings/Source/FileSource.php:125
Stack trace:
#0 /var/www/html/mediawiki/includes/Settings/SettingsBuilder.php(472): MediaWiki\Settings\Source\FileSource->load()
#1 /var/www/html/mediawiki/includes/Settings/SettingsBuilder.php(442): MediaWiki\Settings\SettingsBuilder->loadRecursive()
#2 /var/www/html/mediawiki/includes/Setup.php(223): MediaWiki\Settings\SettingsBuilder->apply()
#3 /var/www/html/mediawiki/maintenance/run.php(49): require_once('...')
#4 {main}
 thrown in /var/www/html/mediawiki/includes/Settings/Source/FileSource.php on line 125 Techietubby (talk) 11:40, 8 October 2024 (UTC)
Most likely some incompatibility with MediaWiki 1.42. The LDAP extensions are mainly developed against the LTS branch which currently is 1.39.
Are there any additional configs? Like for $LDAPProviderDomainConfigs or $LDAPProviderDomainConfigProvider?
Maybe try using a PHP inline config with $LDAPProviderDomainConfigProvider as shown here: Extension:LDAPProvider#Dynamic_PHP_array Osnard (talk) 06:11, 9 October 2024 (UTC)
I used $LDAPProviderDomainConfigs = "$IP/../ldapprovider.json"; and created this file as per the example. I also tried with the LDAPProviderDomainConfigProvider but neither works.
I think I will try to rebuild using 1.39 Techietubby (talk) 09:33, 9 October 2024 (UTC)

Unable to Disable Img_Auth.php

I have my images stored in Amazon S3 and i am using AWS Extension to call and fetch them.

I want to confirm from where my images are coming but when i click on any image its this URL ( not the original URL ).

<img alt="File:Dog.jpg" src="/img_auth.php/Dog.jpg?20071218122543" decoding="async" width="201" height="235">

<img alt="Thumbnail for version as of 12:25, 18 December 2007" src="/img_auth.php/thumb/Dog.jpg/103px-Dog.jpg?20071218122543" decoding="async" loading="lazy" width="103" height="120">


Please tell me how to disable the Img_auth.php and confirm the original path of the images. LuciferVN (talk) 14:35, 8 October 2024 (UTC)

Typically this is controlled by $wgUploadPath in LocalSettings.php Bawolff (talk) 22:35, 8 October 2024 (UTC)
@Bawolff, I dont have that in my Local settings i am using AWS Extension to use my S3 Bucket for storing and fetching the data ! LuciferVN (talk) 14:39, 17 October 2024 (UTC)

Mediwiki 1.39 malicious code alert

Hi,

Whilst upgrading from Mediawiki 1.39.4 to Mediawiki 1.39.10 on Siteground I received a malicious code alert. The wiki is at wiki.mraths.org.uk.

This was related to the file resources->lib->intersection-observer->Readme.md. When I checked it on Mcafee it seemed OK.

Further investigation by Siteground produced the following:

......................................

Oct 8, 2024 20:13

Hello,

The README.md file located in resources->lib->intersection-observer->Readme.md has undergone a thorough review by our team of security experts.

They have identified a security concern associated with the following embedded script in the document:

<script src="https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver"></script>

This script, sourced from Polyfill, has been compromised. Detailed information regarding this security issue can be found at the following link:

https://censys.com/july-2-polyfill-io-supply-chain-attack-digging-into-the-web-of-compromised-domains

To resolve the problem, you should either delete the README.md file or remove all references to the compromised Polyfill script within it. Please be assured that the removal of this file will not compromise the functionality of your website.

Best Regards,

Mariyan Petrov

Senior Technical Support | SiteGround

.....................................


I have deleted this file and the wiki is working fine but I thought I ougth to let you know so the file can be investigated by the author.

Regards RogerApp (talk) 08:51, 9 October 2024 (UTC)

Looks like the same as Project:Support desk/Flow/2024/10#h-WHM_immunify_malicious_content_detected-20241007045000, and that Immunify can't work out that the script tags are within markdown ``` code blocks. Jonathan3 (talk) 09:44, 9 October 2024 (UTC)

Template inside a link's text

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Sorry for bothering here, but I could find no answer to this question:

How to have a template inside the text of a hyperlink? When I try [https://link.ext {{blah|arg}}] I do not obtain the expected result. (What I get is an empty link to https://link.text followed by an inner link to Template:blah.) 81.194.27.158 (talk) 10:15, 9 October 2024 (UTC)

What do you expect? The result of {{blah|arg}} underlined and linking to https://link.ext? I've tried it on my wiki and it seems to work. What's in your "blah" template? Jonathan3 (talk) 11:22, 9 October 2024 (UTC)
Yes. I tried it with two templates:
  • quotes, putting its argument between “quotes”,
  • $, designed to typeset math (and basically putting the content between <math>...</math> tags or client-side-rendered $$...$$ tags). 81.194.27.158 (talk) 11:32, 9 October 2024 (UTC)
Uhm, in fact I had typos both in my page and my templates... Sorry again for bothering 🥴, and thanks anyways for taking the time to answer! 81.194.27.158 (talk) 12:00, 9 October 2024 (UTC)
All's well that ends well! Jonathan3 (talk) 21:35, 9 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Não consigo digitar o titulo do artigo que desejo inserir.

Preciso de ajuda urgente com isso. 179.178.122.108 (talk) 14:09, 9 October 2024 (UTC)

All image uploads are blank

I am running Mediawiki 1.42.3 on a Linux system. I just configured file uploads which works fine. Uploading works and the images arrive at the backend but when I insert them into a page I only get a blank (white) image with the html missing image icon. Then when I try to select them from the search tab they also display with the missing image icon. Robstar1 (talk) 17:51, 9 October 2024 (UTC)

well that means that thumbnails are not being generated. Often when you open the image url directly, and then use the web inspector, you will be able to find an error being returned by the webserver. That's your starting point for Manual:How to debugTheDJ (Not WMF) (talkcontribs) 09:13, 11 October 2024 (UTC)
The console shows a 404 error. This could possibly be because because I added Options -Indexes to the .htaccess in the /images directory to avoid everyone to be able to see all uploaded images. This was explained here under "Restrict directory listing on images folder". Robstar1 (talk) 20:18, 13 October 2024 (UTC)
"This could possibly be because because I added Options -Indexes". well the test for that is very easy right. You just remove that one statement and check again ? —TheDJ (Not WMF) (talkcontribs) 08:34, 15 October 2024 (UTC)

Problemas con tildes en mi wiki

Buenas tardes. Me pasa que en mi wiki, las páginas cuyos nombres contienen tildes me aparecen vacías o me muestran error. Yo asumo que es un problema de configuración pero no se como solucionarlo. Estoy actualizando a la versión 1.39.8 para luego hacerlo a la 1.42.1. Muchas gracias.

I have a problem with the pages in my wiki whose names contain accents, which appear empty or show me an error. I assume it is a configuration problem, but I don't know how to fix it. I am updating to version 1.39.8 and then to 1.42.1. Thank you very much. Mmtorou (talk) 23:58, 9 October 2024 (UTC)

It would help if you said what the error you got is. Bawolff (talk) 21:23, 11 October 2024 (UTC)
Los links de la izquierda en la página principal cuyos nombres contienen tildes (topónimos y bibliografía por ejemplo) llevan a páginas en blanco. De igual manera algunos links con tildes, diéresis o ñ aparecen en blanco, no muestra el texto del link. Esto pasó luego de la actualización de la versión 1.34.0 ala 1.39.8. Mmtorou (talk) 02:56, 12 October 2024 (UTC)

Change search box placeholder text

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


By default, the search box placeholder text contains "Search [Sitename]" for all skins. I would like to change this to
Search {{NUMBEROFARTICLES}} pages
How can I do it? MW 1.39. I found the page MediaWiki:Tooltip-search but it changes the tooltip, not the text in the box. Spiros71 (talk) 10:24, 10 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Recent changes on MobileFrontend

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Recent changes screen shows "Unfortunately, grouping results by page is not available on mobile. If you would like to use the group by page feature, please visit the desktop site."

This message fills most of the landing screen on mobile and detracts from the user experience. How can I get rid of it? Flounder ceo (talk) 19:47, 10 October 2024 (UTC)

You can disable the preference at Special:Preferences#mw-prefsection-rc. – Ammarpad (talk) 20:51, 10 October 2024 (UTC)
Thank you. That worked for me. Is there a way to change the default behavior all users? Flounder ceo (talk) 18:22, 11 October 2024 (UTC)
Set $wgDefaultUserOptions['usenewrc'] = 0; in LocalSettings.php. – Ammarpad (talk) 11:12, 12 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Searchindex table is empty

I am running Mediawiki on raspberry pi using postgresql as a database. I've migrated this wiki from a linux server where I had it running for a few years in the past. After migration I noticed that the searches for not return expected results. After doing some research I noticed that the searchindex table is empty. Tried to run rebuildtextindex.php but I get "This script is not needed when using Postgres." Any pointers on how to fix this would be greatly appreciated. 138.43.109.247 (talk) 21:43, 10 October 2024 (UTC)

I think that is normal in postgres. The searchindex table is a mysql thing that i believe is unused on other DB backends. Bawolff (talk) 19:41, 17 October 2024 (UTC)
Postgres indeed doesn't use this table. It uses the postgres specific columns titlevector and textvector. These are updated using DB triggers that are installed when you install MediaWiki.
Unfortunately we don't have many code contributors that use postgres, so the functionality isn't super well tested either, something might have broken that no one noticed. You can find references to these columns in the files maintenance/postgres/tables.sql and includes/search/SearchPostgres.php. It might help you discover where the problem is ? —TheDJ (Not WMF) (talkcontribs) 08:45, 18 October 2024 (UTC)
Thanks for the replies and pointers on what to look for! I glanced through the triggers and data in my database and I do see page.titleVector and text.textvector columns populated. I did migrate from a really old version of the mediawiki earlier this year and I wonder if something went wrong during the migration process that is causing the search issues rather than my latest move to the raspberrypi. As I've mentioned earlier the search feature works, just looks like indexing (or updating of tokens in the vector* tables) stopped working earlier this year. I'll dig a bit more into this, maybe try to rerun trigger logic manually, but sounds like migrating to mySql or MariaDB maybe a better option. 138.43.108.40 (talk) 22:09, 22 October 2024 (UTC)

Someone could help me to fix?

Deprecated: FatalError overrides getHTML which was deprecated in MediaWiki 1.42. [Called from MWExceptionHandler::report in C:\xampp\htdocs\includes\exception\MWExceptionHandler.php at line 127] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

Deprecated: FatalError overrides getText which was deprecated in MediaWiki 1.42. [Called from MWExceptionHandler::report in C:\xampp\htdocs\includes\exception\MWExceptionHandler.php at line 127] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

Deprecated: Use of MWException::reportHTML was deprecated in MediaWiki 1.42. [Called from MWException::report in C:\xampp\htdocs\includes\exception\MWException.php at line 225] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

Deprecated: Use of MWException::getPageTitle was deprecated in MediaWiki 1.42. [Called from MWException::reportHTML in C:\xampp\htdocs\includes\exception\MWException.php at line 198] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

$wgServer must be set in LocalSettings.php. See https://www.mediawiki.org/wiki/Manual:$wgServer. 79.148.155.12 (talk) 06:19, 11 October 2024 (UTC)

Deprecation warnings are expected. If you want to disable deprecation warnings, you should configure php to ignore deprecation warnings by modifying php.ini and setting error_reporting to explicitly ignore deprecation warnings like so:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED —TheDJ (Not WMF) (talkcontribs) 09:11, 11 October 2024 (UTC)
The only important one here is $wgServer. Set it in LocalSettings.php like the message says Bawolff (talk) 21:22, 11 October 2024 (UTC)

How can you report a user account on here?

The Atlantia wiki page has had a user adding what appears to be chatGPT generated advertising, and posting it as pages there. Is there any way to report a user for this? What is MediaWiki doing to prevent this from happening? 2601:195:C281:D40:5585:154B:295C:D938 (talk) 23:50, 11 October 2024 (UTC)

Are you talking about the English Wikipedia page Atlantia? It doesn't look like there's been any changes there lately.
Anyway, wherever the page is that you're concerned about, you need to ask on that wiki. This is MediaWiki.org, the wiki relating to the software that runs other wikis. So we can't help you here. Sam Wilson 01:27, 12 October 2024 (UTC)

Error 1062: Duplicate entry 'en-messages:apihelp-query+revisions-example-first5-not-localhost' for key 'PRIMARY'

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I get this error (and similar ones, different every time) when I try to edit or view a page (but not all the time). This appeared first after enabling Cirrus search.

I reran update.php and composer.

Product Version
MediaWiki 1.39.10
PHP 8.1.30 (fpm-fcgi)
MariaDB 10.6.19-MariaDB-log
ICU 69.1
Lua 5.1.5
Pygments 2.11.2
Elasticsearch 7.10.2
Error 1062: Duplicate entry 'en-messages:apierror-appendnotsupported' for key 'PRIMARY'
Function: LCStoreDB::finishWrite
Query: INSERT INTO `l10n_cache` (lc_lang,lc_key,lc_value) VALUES ('en','messages:apierror-appendnotsupported',.....

Original exception: [ZwrlgCP9iyJSkMwGD7x5WwAEiQU] /index.php?title=%CF%80%CE%B5%CE%BD%CE%B9%CE%BA%CE%B9%CE%BB%CE%AF%CE%BD%CE%B7&action=edit TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given Backtrace: from public_html/includes/language/Language.php(627)

Error 1062: Duplicate entry 'en-messages:exif-flashpixversion' for key 'PRIMARY' Function: LCStoreDB::finishWrite

Error 1062: Duplicate entry 'en-messages:recentchanges-label-plusminus' for key 'PRIMARY' Function: LCStoreDB::finishWrite Query: INSERT INTO `l10n_cache` (lc_lang,lc_key,lc_value) VALUES ('en','messages:recentchanges-label-plusminus','s:48:\"en:The page size changed by this number of

Error 1062: Duplicate entry 'en-messages:apihelp-query+revisions-example-first5-not-localhost' for key 'PRIMARY' Function: LCStoreDB::finishWrite Query: INSERT INTO `l10n_cache` (lc_lang,lc_key,lc_value) VALUES ('en','messages:apihelp-query+revisions-example-first5-not-localhost','s:117:\"en:Get first 5 revisions of the [[{{MediaWiki:Mainpage}}]] that were not made by anonymous user <kbd>127.0.0.1</kbd>.\";'),('en','messages:apihelp-query+revisions-example-first5-user','s:115:\"en:Get first 5 revisions of the [[{{MediaWiki:Mainpage}}]] that were made by the user <kbd>MediaWiki default</kbd>.\";'),('en','messages:apihelp-query+revisions+base-param-prop','s:45:\"en:Which properties to get for each revision:\";'),

.....

Backtrace:

from public_html/includes/libs/rdbms/database/Database.php(1618)

  1. 0 public_html/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
  2. 1 public_html/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
  3. 2 public_html/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  4. 3 public_html/includes/libs/rdbms/database/Database.php(1838): Wikimedia\Rdbms\Database->query(string, string, integer)
  5. 4 public_html/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->insert(string, array, string)
  6. 5 public_html/includes/libs/rdbms/database/DBConnRef.php(382): Wikimedia\Rdbms\DBConnRef->__call(string, array)
  7. 6 public_html/includes/language/LCStoreDB.php(98): Wikimedia\Rdbms\DBConnRef->insert(string, array, string)
  8. 7 public_html/includes/language/LocalisationCache.php(1136): LCStoreDB->finishWrite()
  9. 8 public_html/includes/language/LocalisationCache.php(544): LocalisationCache->recache(string)
  10. 9 public_html/includes/language/LocalisationCache.php(453): LocalisationCache->initLanguage(string)
  11. 10 public_html/includes/language/LocalisationCache.php(352): LocalisationCache->loadSubitem(string, string, string)
  12. 11 public_html/includes/language/MessageCache.php(722): LocalisationCache->getSubitem(string, string, string)
  13. 12 public_html/includes/language/MessageCache.php(1235): MessageCache->isMainCacheable(string, string)
  14. 13 public_html/includes/language/MessageCache.php(1126): MessageCache->getMsgFromNamespace(string, string)
  15. 14 public_html/includes/language/MessageCache.php(1097): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)
  16. 15 public_html/includes/language/MessageCache.php(1039): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)
  17. 16 public_html/includes/language/Message.php(1473): MessageCache->get(string, boolean, LanguageEn)
  18. 17 public_html/includes/language/Message.php(1122): Message->fetchMessage()
  19. 18 public_html/extensions/CirrusSearch/includes/Hooks.php(204): Message->isDisabled()
  20. 19 public_html/includes/libs/objectcache/BagOStuff.php(216): CirrusSearch\Hooks::CirrusSearch\{closure}(integer)
  21. 20 public_html/extensions/CirrusSearch/includes/Hooks.php(208): BagOStuff->getWithSetCallback(string, integer, Closure)
  22. 21 public_html/extensions/CirrusSearch/includes/Hooks.php(104): CirrusSearch\Hooks::overrideMoreLikeThisOptionsFromMessage()
  23. 22 public_html/extensions/CirrusSearch/includes/Hooks.php(76): CirrusSearch\Hooks::initializeForRequest(WebRequest)
  24. 23 public_html/includes/HookContainer/HookContainer.php(338): CirrusSearch\Hooks::onBeforeInitialize(Title, NULL, OutputPage, User, WebRequest, MediaWiki)
  25. 24 public_html/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
  26. 25 public_html/includes/HookContainer/HookRunner.php(938): MediaWiki\HookContainer\HookContainer->run(string, array)
  27. 26 public_html/includes/MediaWiki.php(208): MediaWiki\HookContainer\HookRunner->onBeforeInitialize(Title, NULL, OutputPage, User, WebRequest, MediaWiki)
  28. 27 public_html/includes/MediaWiki.php(904): MediaWiki->performRequest()
  29. 28 public_html/includes/MediaWiki.php(562): MediaWiki->main()
  30. 29 public_html/index.php(50): MediaWiki->run()
  31. 30 public_html/index.php(46): wfIndexMain()
  32. 31 {main}

[ZwrwvGH_bMozWQZTb7-w8gABTwI] /wiki/%E1%BC%80%CE%BC%CF%86%CE%BF%CF%84%CE%AD%CF%81%CF%89%CE%B8%CE%B5%CE%BD TypeError: CLDRPluralRuleParser\Evaluator::evaluateCompiled(): Argument #2 ($rules) must be of type array, null given, called in public_html/includes/language/Language.php on line 4847

Backtrace:

from public_html/vendor/wikimedia/cldr-plural-rule-parser/src/Evaluator.php(58)

  1. 0 public_html/includes/language/Language.php(4847): CLDRPluralRuleParser\Evaluator::evaluateCompiled(integer, NULL)
  2. 1 public_html/includes/language/Language.php(3982): Language->getPluralRuleIndexNumber(integer)
  3. 2 public_html/includes/parser/CoreParserFunctions.php(413): Language->convertPlural(integer, array)
  4. 3 public_html/includes/parser/Parser.php(3439): CoreParserFunctions::plural(Parser, integer, string, string)
  5. 4 public_html/includes/parser/Parser.php(3124): Parser->callParserFunction(PPFrame_Hash, string, array)
  6. 5 public_html/includes/parser/PPFrame_Hash.php(275): Parser->braceSubstitution(array, PPFrame_Hash)
  7. 6 public_html/includes/parser/Parser.php(2953): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
  8. 7 public_html/includes/parser/Parser.php(961): Parser->replaceVariables(string, PPFrame_Hash)
  9. 8 public_html/includes/parser/Parser.php(4922): Parser->preprocess(string, Title, ParserOptions)
  10. 9 public_html/includes/language/MessageCache.php(1359): Parser->transformMsg(string, ParserOptions, Title)
  11. 10 public_html/includes/language/Message.php(1456): MessageCache->transform(string, boolean, LanguageEn, Title)
  12. 11 public_html/includes/language/Message.php(1009): Message->transformText(string)
  13. 12 public_html/includes/language/Message.php(1053): Message->format(string)
  14. 13 public_html/includes/skins/Skin.php(621): Message->text()
  15. 14 public_html/includes/skins/SkinTemplate.php(764): Skin->getCategoryLinks()
  16. 15 public_html/includes/skins/Skin.php(667): SkinTemplate->getCategoryLinks()
  17. 16 public_html/includes/skins/SkinTemplate.php(259): Skin->getCategories()
  18. 17 public_html/includes/skins/SkinTemplate.php(146): SkinTemplate->prepareQuickTemplate()
  19. 18 public_html/includes/skins/SkinTemplate.php(177): SkinTemplate->generateHTML()
  20. 19 public_html/includes/OutputPage.php(2876): SkinTemplate->outputPage()
  21. 20 public_html/includes/MediaWiki.php(922): OutputPage->output(boolean)
  22. 21 public_html/includes/MediaWiki.php(562): MediaWiki->main()
  23. 22 public_html/index.php(50): MediaWiki->run()
  24. 23 public_html/index.php(46): wfIndexMain()
  25. 24 {main}
Spiros71 (talk) 20:16, 12 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

"Use non-JavaScript interface" in "Recent changes" as default?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Can this be done? MW 1.39 Spiros71 (talk) 22:22, 12 October 2024 (UTC)

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

DB access error on hosted system after setup

Hi! I just installed the "I'm bored" setup and I'm getting an error when the software tries to connect to the database. It's using the shared server name and not the configured db server name (even though that's reported). The error (sensitive details obscured) is as follows: Exception caught inside exception handler: [Zww0topbIUZYzy1vPmphxwAAACU] /index.php Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user '<name>'@'<hosting system>' (using password: YES) (<db server name>)

I'm not sure where <hosting system> comes from after trying to track it down the code. Here's the full dump:

MediaWiki internal error.

Original exception: [Zww0topbIUZYzy1vPmphxwAAACU] /index.php Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user '<name>'@'<hosting system>' (using password: YES) (<db server name>)

Backtrace:

from /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1138)

#0 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 /path to/mediawiki-1.42.3/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(747): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array)

#6 /path to/mediawiki-1.42.3/includes/language/LCStoreDB.php(65): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()

#7 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(563): LCStoreDB->get(string, string)

#8 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(609): LocalisationCache->isExpired(string)

#9 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(520): LocalisationCache->initLanguage(string)

#10 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(400): LocalisationCache->loadSubitem(string, string, string)

#11 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(416): LocalisationCache->getSubitem(string, string, string)

#12 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1251): LocalisationCache->getSubitemWithSource(string, string, string)

#13 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1193): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)

#14 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1088): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)

#15 /path to/mediawiki-1.42.3/includes/Message/Message.php(1530): MessageCache->get(string, boolean, LanguageEn)

#16 /path to/mediawiki-1.42.3/includes/Message/Message.php(1018): MediaWiki\Message\Message->fetchMessage()

#17 /path to/mediawiki-1.42.3/includes/Message/Message.php(1105): MediaWiki\Message\Message->format(string)

#18 /path to/mediawiki-1.42.3/includes/title/MalformedTitleException.php(61): MediaWiki\Message\Message->text()

#19 /path to/mediawiki-1.42.3/includes/title/MediaWikiTitleCodec.php(101): MediaWiki\Title\MalformedTitleException->__construct(string, string, array)

#20 /path to/mediawiki-1.42.3/includes/title/MediaWikiTitleCodec.php(411): MediaWiki\Title\MediaWikiTitleCodec::MediaWiki\Title\{closure}(string, string)

#21 /path to/mediawiki-1.42.3/includes/title/Title.php(2754): MediaWiki\Title\MediaWikiTitleCodec->splitTitleString(string, integer)

#22 /path to/mediawiki-1.42.3/includes/title/Title.php(504): MediaWiki\Title\Title->secureAndSplit(string)

#23 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(240): MediaWiki\Title\Title::newFromURL(string)

#24 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(331): MediaWiki\Actions\ActionEntryPoint->parseTitle(MediaWiki\Request\WebRequest)

#25 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(93): MediaWiki\Actions\ActionEntryPoint->getTitle()

#26 /path to/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(199): MediaWiki\Actions\ActionEntryPoint->execute()

#27 /path to/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#28 {main}

Exception caught inside exception handler: [Zww0topbIUZYzy1vPmphxwAAACU] /index.php Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user '<name>'@'<hosting system>' (using password: YES) (<db server name>)

Backtrace:

from /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1138)

#0 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /path to/mediawiki-1.42.3/includes/libs/rdbms/loadbalancer/LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 /path to/mediawiki-1.42.3/includes/libs/rdbms/database/DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 /path to/mediawiki-1.42.3/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php(747): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array)

#6 /path to/mediawiki-1.42.3/includes/language/LCStoreDB.php(65): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()

#7 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(536): LCStoreDB->get(string, string)

#8 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(400): LocalisationCache->loadSubitem(string, string, string)

#9 /path to/mediawiki-1.42.3/includes/language/LocalisationCache.php(416): LocalisationCache->getSubitem(string, string, string)

#10 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1251): LocalisationCache->getSubitemWithSource(string, string, string)

#11 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1193): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)

#12 /path to/mediawiki-1.42.3/includes/language/MessageCache.php(1088): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)

#13 /path to/mediawiki-1.42.3/includes/Message/Message.php(1530): MessageCache->get(string, boolean, LanguageEn)

#14 /path to/mediawiki-1.42.3/includes/Message/Message.php(1018): MediaWiki\Message\Message->fetchMessage()

#15 /path to/mediawiki-1.42.3/includes/Message/Message.php(1105): MediaWiki\Message\Message->format(string)

#16 /path to/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(255): MediaWiki\Message\Message->text()

#17 /path to/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(408): MWExceptionRenderer::msg(string, string)

#18 /path to/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(104): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)

#19 /path to/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(133): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)

#20 /path to/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(237): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)

#21 /path to/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(221): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)

#22 /path to/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(82): MediaWiki\MediaWikiEntryPoint->handleTopLevelError(Wikimedia\Rdbms\DBConnectionError)

#23 /path to/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(205): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError(Wikimedia\Rdbms\DBConnectionError)

#24 /path to/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#25 {main} 98.179.100.201 (talk) 21:39, 13 October 2024 (UTC)

It is normal that '<name>'@'<hosting system>' in the error message should use the IP address of the web server. This is just how mysql formats error message - the ip address is the server making the request, not the database server.
Be sure that the db user being used has all the appropriate rights. Bawolff (talk) 19:38, 17 October 2024 (UTC)
Thanks @Bawolff. I have looked in the LocalSettings.php file and the information there matches what I use when logging in using the `mysql` command line tool via ssh to the remote machine.
I'm going to give the web server permissions to the DB and see if that fixes things. 98.179.100.201 (talk) 16:03, 18 October 2024 (UTC)
Well, that didn't help either. It turns out that the escape character that was placed in the password string wasn't needed. Deleting that allowed the log in. 98.179.100.201 (talk) 16:19, 18 October 2024 (UTC)

file created in the system's temporary directory in Unknown

I'm currently setting up a new wiki. Whenever I try uploading something, the following error appears on top of the page:


Notice: PHP Request Startup: file created in the system's temporary directory in Unknown on line 0

Warning: Cannot modify header information - headers already sent in /var/www/html/includes/WebStart.php on line 34

Warning: session_name(): Session name cannot be changed after headers have already been sent in /var/www/html/includes/Setup.php on line 472

Warning: session_id(): Session ID cannot be changed after headers have already been sent in /var/www/html/includes/Setup.php on line 520

Warning: session_start(): Session cannot be started after headers have already been sent in /var/www/html/includes/Setup.php on line 521

Warning: Cannot modify header information - headers already sent in /var/www/html/includes/Request/WebResponse.php on line 80

Warning: Cannot modify header information - headers already sent in /var/www/html/includes/Request/WebResponse.php on line 80

Warning: Cannot modify header information - headers already sent in /var/www/html/includes/Request/WebResponse.php on line 80


I've tried adding 'upload_tmp_dir' into php.ini, and I can successfully access it (proven by adding 'die(var_dump(scandir(ini_get("upload_tmp_dir"))));' to the end of LocalSettings.php), but that didn't solve the issue. 2003:6:53F7:F8F5:D41E:BED7:1B89:DD9D (talk) 12:47, 14 October 2024 (UTC)

This sounds like PHPs sys_temp_dir might not be set correctly. This should default to /tmp but in shared hosting environments it sometimes can be inaccessible or not defined. —TheDJ (Not WMF) (talkcontribs) 13:25, 14 October 2024 (UTC)
I added the sys_temp_dir (again, it's readable), but the same issue still persists. 2003:6:53F7:F839:4519:8C4F:2AC:1F4 (talk) 17:14, 14 October 2024 (UTC)

Upgrade to 1.42.3 with DB Error 1044: Access denied

Hi,

i updated my MW from 1.42.1. to 1.42.3 and finaly run the Web Updater for Database Upgrade and got this error:

...have af_actor field in abuse_filter table.

...have afh_actor field in abuse_filter_history table.

...mathoid doesn&#039;t exist.

...mathlatexml doesn&#039;t exist.

An error occurred:

Error 1044: Access denied for user 'xxx'@'localhost' to database 'virtual'

Function: Wikimedia\Rdbms\DatabaseMySQL::doSelectDomain

Query: USE `virtual`

Any Ideas or a solution?

Thx TasteOfIT (talk) 18:32, 14 October 2024 (UTC)

Do you have OAuth installed ? In that case it is likely phab:T371849TheDJ (Not WMF) (talkcontribs) 07:44, 15 October 2024 (UTC)
If possible, use the command line update.php Bawolff (talk) 19:35, 17 October 2024 (UTC)
Hi,
sorry i got no notification via email, so its by chance to see your replies. Thanks for that. No i do not have OAuth installed. I finaly solved it like Bawolff recommended. I run an Update on command line. I got some errors, but the Wiki works, so i hope it get fixed in the next release. Sorry i got not much time for that.
Again thx for your answers and time. TasteOfIT (talk) 11:42, 20 November 2024 (UTC)

Does Checkuser have the ip address of a specific edit?

If someone with Checkuser permission attempts to get the ip address that corresponds to an edit the registered user made, are they able to get the ip address? And if they are able to get the ip address, are they stored after the 90-day period or are they deleted? Joseph aha! (talk) 00:40, 15 October 2024 (UTC)

Yes, checkuser can usually get the IP address of edits made by regular users, provided the edit was made in the last 90 days.
Generally if they fetch the IP address, it is not stored after the 90 day period. The checkuser could of course write down the results of the check and save it themselves (Whether that is allowed might depend on the policies of the wiki). Bawolff (talk) 19:35, 17 October 2024 (UTC)

Edit Mediawiki HTML Header for GSC

New to this, running MediaWiki 1.14.3 on a cloud hosting site (I understand this is not ideal but I have access to the terminal). TLDR I'm trying to figure out how to edit the header so Google Search Console can index my site but by default (or added by one of my extensions? Unlikely though), it has the noindex detected in the robots meta tag on the page (exact code HTML GSC found: <meta name="generator" content="MediaWiki 1.42.3" />

<meta name="robots" content="noindex,nofollow,max-image-preview:standard" />) . It found this code on several pages.

I've been trying to figure out how to do it using $wgDefaultRobotPolicy in the terminal but no dice--I can't figure out how to use the commands am admittedly not a very versed Linux user. Any help would be appreciated, thank you! Paperplanes0101 (talk) 09:29, 15 October 2024 (UTC)

$wgDefaultRobotPolicy needs to be set in LocalSettings.php. Have you tried that? and what did you put? – Ammarpad (talk) 12:08, 16 October 2024 (UTC)
Sorry I'm still learning about this platform. Didn't realize my previous post was not a reply.
This is what I put in the LocalSettings.php:
$wgDefaultRobotPolicy = 'index,follow';
$wgNamespaceRobotPolicies = [
     NS_MAIN => 'index,follow'
];
What would be the proper formatting for it? The wiki only shows how to make them exclude these options, so I put the negated version of each on there thinking it'd work. Please let me know if you're still willing; I still haven't figured it out. Thank you again. Paperplanes0101 (talk) 23:12, 24 October 2024 (UTC)
I actually am still having this problem, I just waited a few days to see if it would change. But it has not. This is what I put in my LocalSettings.php
$wgDefaultRobotPolicy = 'index,follow';
$wgNamespaceRobotPolicies = [
     NS_MAIN => 'index,follow'
];
Is this not right? Please let me know, thanks! Paperplanes0101 (talk) 05:27, 21 October 2024 (UTC)

Error with uploading an image

Hi, after upgrading to mediawiki 1.39, we are having an error with uploading an image. In thumbnail it shows the older image and if we try to reupload it states the name already exists but even after changing the name it still gives the same error and few gives as url not found even if the image is present in database.

Can someone help me with this, thanks in advance... Chinnuabc (talk) 09:54, 15 October 2024 (UTC)

When doing the upload, do you check the "ignore warnings" box? Bawolff (talk) 19:33, 17 October 2024 (UTC)
Yes, but it's still giving the same error Chinnuabc (talk) 16:55, 22 October 2024 (UTC)

Fatal error: Cannot declare class MediaWiki\Linker\Linker, because the name is already in use

Hi there,

I just updated my MediaWiki. Unfortunately I will receive "Fatal error: Cannot declare class MediaWiki\Linker\Linker, because the name is already in use in /home/www/mash4077wiki/includes/linker/LinkRenderer.php on line 65".

Due to a lack of knowledge in programming and knowing to have nothing altered than the LocalSettings.php this is a mystery to me.

Is anyone able to help or guide me to find the mistake?


Thank you

Mike Micha aus Hamburg (talk) 11:25, 15 October 2024 (UTC)

Using mw-config/index.php I recieve following:
[Zw5SxpQDktah1A-ICYGzoQAAAAA] /mw-config/index.php?page=Language Error: Class "MediaWiki\Linker\Linker" not found
Backtrace:
from /home/www/mash4077wiki/includes/parser/Parser.php(2236)
#0 /home/www/mash4077wiki/includes/parser/Parser.php(1650): MediaWiki\Parser\Parser->handleExternalLinks(string)
#1 /home/www/mash4077wiki/includes/parser/Parser.php(722): MediaWiki\Parser\Parser->internalParse(string)
#2 /home/www/mash4077wiki/includes/installer/Installer.php(809): MediaWiki\Parser\Parser->parse(string, MediaWiki\Title\Title, ParserOptions, boolean)
#3 /home/www/mash4077wiki/includes/installer/WebInstallerOutput.php(253): MediaWiki\Installer\Installer->parse(string, boolean)
#4 /home/www/mash4077wiki/includes/installer/WebInstallerOutput.php(115): MediaWiki\Installer\WebInstallerOutput->outputFooter()
#5 /home/www/mash4077wiki/includes/installer/WebInstaller.php(406): MediaWiki\Installer\WebInstallerOutput->output()
#6 /home/www/mash4077wiki/includes/installer/WebInstaller.php(293): MediaWiki\Installer\WebInstaller->finish()
#7 /home/www/mash4077wiki/mw-config/index.php(85): MediaWiki\Installer\WebInstaller->execute(array)
#8 /home/www/mash4077wiki/mw-config/index.php(43): wfInstallerMain()
#9 {main} Micha aus Hamburg (talk) 11:46, 15 October 2024 (UTC)
"Updated your MediaWiki" from what to what exactly, and by performing which steps listed where? Malyacko (talk) 17:45, 15 October 2024 (UTC)
Thank you for your answer @Malyacko,
I made a fresh install meanwhile and deleted the old installation. Micha aus Hamburg (talk) 09:28, 16 October 2024 (UTC)
Sometimes this type of error can happen if files from different versions of MediaWiki get mixed together, so i usually reccomend reinstalling mediawiki fresh to see if that fixes it. Bawolff (talk) 19:32, 17 October 2024 (UTC)

Media wiki upgrade from 1.23 to 1.42

I have a media wiki version 1.23 and php version : 5.5.6. Now I want to upgrade it to media wiki 1.42 and php 8.3. How can I do this? Raaz2 (talk) 15:53, 15 October 2024 (UTC)

See Manual:Upgrading and Compatibility - probably via several steps. Malyacko (talk) 17:44, 15 October 2024 (UTC)

Hi, I created my own mediawiki as a hobby, but I'm not really good when it comes to codes and all that.

I somehow managed to create infoboxes but I don't know what extensions or code to use to have a gallery in my infobox, similiar to how wiki fandom handles it.

Here is an example of the infoboxes I and my friends use on another wiki: https://skullgirlz.wiki/index.php/Template:Character_Box_1

If there are any further tips for better infoboxes, I would like to hear about them.

Edit for further information: we have created a gallery option already long before but it's really bad and causes the infoboxes to change width:

https://skullgirlz.wiki/index.php/List:_Infoboxes PotatoMaster69ofDoom (talk) 18:30, 15 October 2024 (UTC)

Visual Editor not working

I just installed a new Mediwiki

https://www.mash-4077.info/index.php/Spezial:Version:

Software Version
MediaWiki 1.39.10
PHP 8.1.30 (apache2handler)
MariaDB 10.11.4-MariaDB-1:10.11.4+maria~deb11-log
ICU 67.1


It seems everything works fine, but the Visual Editor and logging out. When logging out I recieve a "Ungültige Antwort vom Server" (invalid response from the server), same if I want to use the Visual Editor.

Screenshots:

https://www.mash-4077.info/_help/logout.png

https://www.mash-4077.info/_help/visualeditor.png

As I am new to Mediawiki I am quite puzzled why this is not working and to be frankly have no idea where to start or how to search for this in the net.

Does anyone have a clue where to start?


Thank you

Micha Micha aus Hamburg (talk) 09:25, 16 October 2024 (UTC)

First, check for any exceptions/errors in the regular PHP error log.
If you don't find anything unusual, enable $wgShowExceptionDetails.
Then, open your browsers developer tools (usually F12 key) and switch to the network panel. Start VisualEditor with an open network panel. Check requests to the api.php endpoint. If you observe any status code other than 200 OK click the line and check the "response" panel. Maybe this contains a error message.
See also
When trying to logout, I receive following response:
"Fatal error: Cannot declare interface MediaWiki\Api\Hook\ApiMaxLagInfoHook, because the name is already in use in /home/www/mash4077wiki/includes/api/Hook/ApiMain__onExceptionHook.php on line 12"
which reads "interface ApiMaxLagInfoHook {"
same for the Visual Editor https://www.mash-4077.info/_help/Visual_Error.png
Not sure how this error could occur, as this is a new install. I tried to find clues how to solve this, but nothing helpful (for my level of knowledge) Micha aus Hamburg (talk) 10:49, 16 October 2024 (UTC)
Micha aus Hamburg (talk) 11:43, 16 October 2024 (UTC)
I searched for "interface ApiMaxLagInfoHook" and found it in following two files:
\includes\api\Hook\ApiMain__onExceptionHook.php
\includes\api\Hook\ApiMaxLagInfoHook.php
https://www.mash-4077.info/_help/search2.png
for me, this looks OK, but reading the Error Message, it is not.
Does somebody had a similar problem or got a clue? Micha aus Hamburg (talk) 13:08, 16 October 2024 (UTC)
I think this is solved.
I deleted \include\api and did a re upload of that folder.
Don't know why, but now it works. Micha aus Hamburg (talk) 06:04, 17 October 2024 (UTC)
This is really odd. It sounds like your installation is flawed. Are you sure you didn't accidentally copy the codebase of MediaWiki 1.39 over another (maybe previous) one? Osnard (talk) 12:27, 17 October 2024 (UTC)
MediaWiki 1.39 does contain includes\api\Hook\ApiMain__onExceptionHook.php : https://github.com/wikimedia/mediawiki/blob/1.39.10/includes/api/Hook/ApiMain__onExceptionHook.php
But apparently with a different content. Osnard (talk) 12:32, 17 October 2024 (UTC)

I can't upload files

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello, I have installed Ubuntu desktop on Raspberry Pi 5 and am running a MediaWiki. I can't upload files such as images.

제품 버전
MediaWiki 1.42.1
PHP 8.3.6 (apache2handler)
ICU 74.2
MariaDB 10.11.8-MariaDB-0ubuntu0.24.04.1

php.ini

file_uploads = On


localsettings.php

$wgEnableUploads = true;

$wgUploadpath = "$wgScriptPath/img_auth.php";

$wgUploadDirectory = '$IP/images';

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = '/usr/bin/convert';


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

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


$wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpge', 'doc', 'pdf', 'ico', 'txt'

];


teminal

sudo chown -R www-data:www-data images/

sudo chmod -R 755 images/


Others have set 777 permissions in the image folder, which makes it possible to upload even if it's a security hazard, but I'm not.

What did I miss or set it wrong?


Or is there a way to import images if I save them in the image folder as ftp or the like without uploading them on the MediaWiki web? I can't add any images to my MediaWiki..


Thank you. Lany2u (talk) 12:19, 16 October 2024 (UTC)

what error do you get ? —TheDJ (Not WMF) (talkcontribs) 09:45, 17 October 2024 (UTC)
Could not open lock file for "mwstore://local-backend/local-public/e/ef/32.ico". Make sure that the upload directory is set up correctly and that the web server has permission to edit that directory. See https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory for more information. Lany2u (talk) 21:59, 17 October 2024 (UTC)
$wgUploadpath = "$wgScriptPath/img_auth.php"; is incorrect, it should be $wgUploadPath = "$wgScriptPath/img_auth.php"; (Assuming you want to use private uploads. You might consider using just normal uploads first to make sure its working before setting up private uploads).
$wgUploadDirectory = '$IP/images'; is wrong, it should be $wgUploadDirectory = "$IP/images"; (Note that ' and " mean different things). Bawolff (talk) 19:29, 17 October 2024 (UTC)
Awesome! That was exactly right. It's working now! Lany2u (talk) 22:04, 17 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to delete my account?

How do I delete my account? RiendeJongste (talk) 09:25, 17 October 2024 (UTC)

@RiendeJongste: You've posted this to mediawiki.org, not to whatever wiki you're trying to delete your account on. (I'm assuming you don't want to delete your account here, as it looks like you only just created it to post this.) You'll need to contact the admins of wherever it is you want your account deleted. Sam Wilson 11:48, 17 October 2024 (UTC)

How to use DB of other EC2 Server for my Mediawiki site

I want to use the DB that is stored in other EC2 server into my Mediawiki site. How do i mention this in the DB Settings in Local settings.php file ?? LuciferVN (talk) 14:42, 17 October 2024 (UTC)

Use $wgDBserver Bawolff (talk) 19:25, 17 October 2024 (UTC)

Hi, when I click insert --> gallery I see there the information "Gallery is empty". But when I search for an image by phrase, then some image shows up. How to restore the functionality of displaying the last or all uploaded images?

Empty Gallery


installation information

MediaWiki1.41.1

PHP8.0.25 (fpm-fcgi)

ICU67.1

MariaDB10.6.10-MariaDB-1:10.6.10+maria~deb11 Cieptak (talk) 18:49, 17 October 2024 (UTC)

+1 Cieptak (talk) 18:27, 23 October 2024 (UTC)

How do I create the "summary" box that many pages have in the top right corner?

I'm sure I'm using the wrong term, I wish I knew the right one so I could search for how to do this rather than make a whole new topic.

I want to create the box that appears in the top right corner of many pages, with notable images and/or facts about the page. Example circled here, in a screenshot I took of The Daily Show's page.

Thanks for your help! Goosews (talk) 19:54, 17 October 2024 (UTC)

That's called an infobox.
Wikipedia uses complex series of templates to create them. It can be complicated to copy them to your own wiki. See Manual:Importing_Wikipedia_infoboxes_tutorial for instructions.
Sometimes it can be easier to just make your own. Some people use Templates (combined with normal HTML styling) or extensions like Extension:PortableInfobox Bawolff (talk) 06:37, 18 October 2024 (UTC)

Problema con caracteres especiales luego de actualizar

He querido actualizar mi wiki de la versión 1.34.0 a la versión 1.42.1 y para hacerlo hice una actualización intermedia a la versión 1.39.8 como se recomienda en el manual de actualización. Al hacerlo encuentro que las páginas cuyo nombre contiene tildes, diéresis, ñ o caracteres similares aparecen vacías o sus links de entrada no aparecen en las listas. Cómo puedo solucionarlo? Mmtorou (talk) 23:55, 17 October 2024 (UTC)

It depends on the cause.
First off, run cleanupUsersWithNoId.php followed by migrateActors.php --force
If that doesnt help, check how page names are encoded in db, if they are proper utf-8. A link to your wiki might be helpful. Bawolff (talk) 18:05, 18 October 2024 (UTC)

User-bomb

After installing MediaWiki on my website it's working good. I found several extra apps... installed them and enjoy using them. So far ... so good.

This morning i see a very lot (about 21000) new users who has nothing to do with this website. I have deleted them all by using PhP Admin / page 2 / eh3j-user. It looklikes a "user-bomb" was used to attack my website. Is there a way to avoid such a "user-bomb"? Ronald vd D (talk) 12:07, 18 October 2024 (UTC)

See Extension:ConfirmAccount, Extension:ConfirmEdit or Manual:Combating_spam Osnard (talk) 14:08, 18 October 2024 (UTC)
# Settings for UserPageEditProtection
$wgOnlyUserEditUserPage = false; // edit only by owner of the page
$wgGroupPermissions['sysop']['editalluserpages'] = false; // edit only by sysop-group
$wgGroupPermissions['userpageeditor']['editalluserpages'] = false; // edit only by userpageeditor-group
$wgGroupPermissions['Autoconfirmed users']['editalluserpages'] = true; // edit only by Autoconfirmed users-group
---- Ronald vd D (talk) 15:17, 18 October 2024 (UTC)
# Settings for ConfirmAccount
$wgMakeUserPageFromBio = false; // Extension by default use content of the person's bio as default content for userpage. This behavior can be disabled.
$wgConfirmAccountRequestFormItems['Biography']['enabled'] = true; // To disable the biography in form.
$wgConfirmAccountRequestFormItems['Biography']['minWords'] = 10; // By default, a 10 word biography is required for the new user to submit the request form.
$wgGroupPermissions['sysop']['createaccount'] = true; // Sysops can still create accounts directly, if not disabled by set. Ronald vd D (talk) 15:51, 18 October 2024 (UTC)
Ai ai ... now i can't login anymore. When i try i get this message:
There appears to be a problem with your login session. Your action has been halted as a precaution against a security risk (which consists of possible hijacking of this session). Please try submitting the form again. Ronald vd D (talk) 06:17, 19 October 2024 (UTC)
Found out that my database had reached the maximum size of 2 GB. I managed to reduce it a bit with PhPMyAdmin by emptying the cache and log-files. Now i can login again :-)
I'll try to install the Captcha protection.
Thanks alot for the advice! Ronald vd D (talk) 08:12, 19 October 2024 (UTC)

Make edit only possible for a custom user groups

I want to make some pages protected so only a custom user group can edit them. How can I achieve this? Tang Empire (talk) 03:14, 19 October 2024 (UTC)

See manual:$wgRestrictionLevels Bawolff (talk) 04:48, 19 October 2024 (UTC)
Thank you so much, Bawolff. Tang Empire (talk) 19:56, 9 November 2024 (UTC)

Concerns Regarding Misuse of Wikipedia's Digital Core in the Russian Internet Zone

Dear Wikipedia Team,

I am writing to bring to your attention a concerning issue regarding the use of Wikipedia's digital core within the Russian internet zone. The product, known as RU WIKI, is being utilized in violation of Wikipedia's stated guidelines. It is primarily being used for advertising purposes, which undermines the principles of a free encyclopedia. Additionally, basic user data protection standards are not being followed.

In essence, this digital hybrid is a poor imitation of Wikipedia's product, tarnishing the core principles of the Free Encyclopedia. It also serves as a profit-making tool for a select group of individuals, which is deeply troubling.

I urge you to investigate this matter and take appropriate actions to protect the integrity of Wikipedia and its community.

Sincerely, Hyppolite Dumoulin 95.165.65.180 (talk) 11:01, 19 October 2024 (UTC)

MediaWiki (the software) and Wikimedia (the hoster of Wikipedia) are not affiliated with ruwiki. There is little that can be done to stop them unless they use any of the Wikipedia related trademarks. —TheDJ (Not WMF) (talkcontribs) 13:43, 19 October 2024 (UTC)
Спасибо! Тем не менее, часть управления так или иначе осуществляется из основного ядра Вики, и ряд системных запретов подпадает под категорию "основная Википедия".
Таким образом, все предупреждения и ограничения исходят из основной системы 95.165.65.180 (talk) 11:29, 20 October 2024 (UTC)
Thanks! However, part of the management is somehow carried out from the main core of the Wiki, and a number of system prohibitions fall under the category of "main Wikipedia".
Thus, all warnings and restrictions come from the main system
CMS - Markede - MediaWiki This is ofichial logo of Wiki Core 95.165.65.180 (talk) 11:30, 20 October 2024 (UTC)
They have the right to use the mediawiki software for any purpose, including ones we dont like.
I'm pretty sure wikimedia is very aware of ruwiki, but cant do anything about it. Bawolff (talk) 15:45, 22 October 2024 (UTC)

Where are Wikiversity improvements discussed?

Hi. I have a suggestion about adding safe interactive JavaScript elements to Wikiversity to make lessons more engaging. Where is the best place to discuss something like this? Отец Никифор (talk) 14:13, 19 October 2024 (UTC)

See v:Wikiversity:Colloquium. (Assuming you mean the English version) – Ammarpad (talk) 17:52, 19 October 2024 (UTC)

update.php script cannot be run - thinks older version but higher version is installed

Hello, I recently did an installation of MediaWiki 1.42.1 as verified here: https://cptdb.ca/wiki/index.php/Special:Version

It was upgraded from 1.38.

It works fine generally.

I was looking to run the update.php script on command line after installing the TitleKey extension, however, it gave me an error: Can not upgrade from versions older than 1.35, please upgrade to that version or later first.

Since I am running a newer version already, I am not sure what to do. I also tried the --force option but it did not change the result. Do you have any suggestions I could try?


$ php run.php update

MediaWiki 1.42.1 Updater

Your composer.lock file is up to date with current dependencies!

Going to run database updates for <db name>

Depending on the size of your database this may take a while!

Abort with control-c in the next five seconds (skip this countdown with --quick) ...0

Can not upgrade from versions older than 1.35, please upgrade to that version or later first. 2001:56A:F8AB:7600:7DD9:C66A:34CC:920E (talk) 04:04, 20 October 2024 (UTC)

This error means the field rev_actor does not exist in the revision table. This field was added in MediaWiki 1.35. If it is not in your MediaWiki 1.38 database, then maybe some previous update script did not succeed.
Try to run update.php from a MediaWiki 1.35 on your database first. Important: Make a backup of the database first Osnard (talk) 14:07, 21 October 2024 (UTC)

Need to remove or hide localisation information of posted pictures on my Wiki

Hello, Sorry if this question has already been solved somewhere else. I have tried to find a simple solution but did not find anything.

I have created a wiki, public, and I'm hosting images on it. But all the META information is visible. This data includes LAT and LONG GPS coordinates. This can very easily lead to my house. I'm looking for a way to automatically remove this data when posting images to the wiki.

Does an extension automatically remove this information ? Thanks for your help. Bumpshoveit (talk) 07:41, 20 October 2024 (UTC)

I'm not sure, but extension:UploadWizard might.
You can use external tools like exiftool before upload. Bawolff (talk) 15:41, 22 October 2024 (UTC)
Thanks for your reply. I'll try it. Bumpshoveit (talk) 10:07, 12 November 2024 (UTC)

How to embedd a personal google map

I found a lot of info about how to use maps but nothing how I can show one of my personal maps in my mediawiki.

To be more specific, I want to embed this map: https://www.google.com/maps/d/edit?hl=de&mid=1n9Q3JOev6k0Ah5mAEcrPDGdLxpCUNXg&ll=30.06253025347663%2C-48.646613812541176&z=4 Pontiuspilatus (talk) 16:34, 20 October 2024 (UTC)

indentation broken for messages holding linefeed

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


hi all, for core mw message editingold you see that there is a linefeed after first sentence reproduced in translations -> https://translatewiki.net/w/i.php?title=Special:Translate&showMessage=editingold&group=core&language=fr&filter=&optional=1&action=translate

if you use this message with indentation as ':' then the msg is split : first part respects the indentation - ok-, but the second line (text after the LF "if you publish it...") is out of alignment as on page -> https://www.mediawiki.org/wiki/Help:Reverting where it is near the left border.

how can we protect the whole structure to be at the level of the 'int' ? Thanks. -- Christian 🇫🇷 FR (talk) 09:27, 22 October 2024 (UTC)

Instead of using * for lists, use html <ul> and <li> syntax (have to do it for the whole list not just that item) Bawolff (talk) 18:19, 24 October 2024 (UTC)
Thanks. Rather to rebuilt the whole list I have chosen a halfway solution inspired from your proposal and swapping the 2 items. It is a workaround and it would have been easier to keep both sentences together in the EN core message like it was initially done since they both display consequently on the same line in the normal flow. -- Christian 🇫🇷 FR (talk) 17:52, 25 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

HTTP 429 error during Mediawiki extension submodule update

Issue :

We followed the official mediawiki documentations and made a bash script that upgrade mediawiki following these steps :

  1. Back up existing files and the database
  2. Unpack the new files
  3. Upgrade extensions
  4. Run the update script to check the database
  5. Test the update
  6. Remove leftovers from old installations

The Script was working like charm few months ago, but now while we were trying to upgrade mediawiki the script failed at step 3. Upgrade extensions with 429 too many requests error specifically after running the command :

git submodule update --init --recursive

Part of the error :

Cloning into '/var/www/wiki-dev/wiki/fr/extensions/Wikibase/view/lib/wikibase-data-model'...
error: RPC failed; HTTP 429 curl 22 The requested URL returned error: 429
fatal: the remote end hung up unexpectedly
fatal: clone of 'https://phabricator.wikimedia.org/source/wikibase-data-model.git' into submodule path '/var/www/wiki-dev/wiki/fr/extensions/Wikibase/view/lib/wikibase-data-model' failed
Failed to clone 'view/lib/wikibase-data-model'. Retry scheduled
Cloning into '/var/www/wiki-dev/wiki/fr/extensions/WikibaseLexeme/resources/special/new-lexeme'...
fatal: unable to access 'https://phabricator.wikimedia.org/diffusion/NLSP/new-lexeme-special-page.git/': The requested URL returned error: 429
fatal: clone of 'https://phabricator.wikimedia.org/diffusion/NLSP/new-lexeme-special-page.git' into submodule path '/var/www/wiki-dev/wiki/fr/extensions/WikibaseLexeme/resources/special/new-lexeme' failed
Failed to clone 'resources/special/new-lexeme' a second time, aborting
fatal: Failed to recurse into submodule path 'extensions/Wikibase'
fatal: Failed to recurse into submodule path 'extensions/WikibaseLexeme'

My Question :

Is this normal?, It's been more than 12h and we are still getting 429 error, and are there some ways to prevent this from happening again?

I appreciate any help. 41.224.46.18 (talk) 10:14, 22 October 2024 (UTC)

You are probably using anonymous access right now and I suspect that has much more stringent rate limits. Try using (ssh) authentication. —TheDJ (Not WMF) (talkcontribs) 11:14, 24 October 2024 (UTC)
you could try cloning from github instead. Bawolff (talk) 18:14, 24 October 2024 (UTC)
Thank you guys for answering.
@Bawolff im considering cloning each extension from GitHub if i don't find any other option.
@TheDJ Yes probably for this reason, i appreciate if you can point me out to setting up ssh connection with phabricator server to download the extensions without rate limiting. 196.224.9.64 (talk) 15:18, 11 November 2024 (UTC)
i assume this documentation : Gerrit/Tutorial is the one 196.224.9.64 (talk) 15:55, 11 November 2024 (UTC)
i've setup ssh connection between my server and gerrit server as well as configuring git as mentioned in the docs
here is a connection test :
ssh -p 29418 myusername@gerrit.wikimedia.org
  ****    Welcome to Gerrit Code Review    ****
  Hi myusername, you have successfully connected over SSH.
  Unfortunately, interactive shells are disabled.
  To clone a hosted Git repository, use:
  git clone ssh://myusername@gerrit.wikimedia.org:29418/REPOSITORY_NAME.git
Connection to gerrit.wikimedia.org closed
Git config :
user.email=myusername@mydmoain.io
user.name=myusername
url.ssh://myusername@gerrit.wikimedia.org:29418/.insteadof=https://gerrit.wikimedia.org/r/
and still when i run git submodule update --init --recursive i get the error 429, it's been over 20 days now.
The error is coming only from Phabricator server not Gerrit, so probably i need to setup ssh connection with phabricator as well. 196.224.9.64 (talk) 16:14, 11 November 2024 (UTC)

Remove a button in VisualEditor

I know how to trigger a command using a toolbar tool in VisualEditor, using ve.ui.toolFactory.register. What is the command to remove a toolbar tool?

Also, is there a way to find a list of the registered tools (so that I know what I should “de-register”)?

What I intend to do is to remove the “Insert → Math formula” tool, because I handle math through a specific template instead of <math> tags.

Thanks in advance! 81.194.27.158 (talk) 13:02, 22 October 2024 (UTC)

Mediawiki suddenly went down (retromux.org)

Overnight the mediawiki went down. If someone could please help me understand what is going on, I would appreciate it. I put the debug mode on the localsettings.php, so if you go to retromux.org, it should show the log of what is going on.

Thank you. Jujubejd (talk) 15:55, 22 October 2024 (UTC)

looks like it is up to me. congrats! MarkAHershberger(talk) 18:23, 22 October 2024 (UTC)

Managewiki

Hello

We installed managewiki and it's not turning on the extensions locally when trying to on the wiki wat do we need to do to fix this? Cocopuff2018 (talk) 18:33, 22 October 2024 (UTC)

We did install the extensions tho Cocopuff2018 (talk) 18:36, 22 October 2024 (UTC)
Always first read "Post a new question" in the sidebar on this page, and provide basic context (what "managewiki", what "the extensions"), always provide clear steps to reproduce something without any paraphrasing. Malyacko (talk) 11:11, 23 October 2024 (UTC)

Too Many Log-in Attempts

A few friends and I have a wiki. However, we've all gotten this issue where we can't log-in. We're told: "Too many login attempts."

I don't have the means to restart anything. What is going on and how to we fix it?

Thank you. 173.252.37.152 (talk) 19:58, 22 October 2024 (UTC)

See Manual:$wgPasswordAttemptThrottle for how this is configured.
If the server is behind a proxy and not configured properly, it might make the limit be applied to wrong person. Bawolff (talk) 02:01, 24 October 2024 (UTC)

Template Loop Safeguard

How do I disable/delete/bypass it in a template/wiki?

(note: this question is not "Should I try to circument the safeguard?" or "What can I do to achieve what I think I'd achieve by circumventing the safeguard?" or anything that is just not the question being asked here) Mlvluu (talk) 18:39, 23 October 2024 (UTC)

Why would you? Malyacko (talk) 15:53, 24 October 2024 (UTC)
Does it matter? Mlvluu (talk) 16:38, 24 October 2024 (UTC)
The error check is done in Parser.php (loopCheck returns true). Disabling or bypassing it entirely would require modifying the mediawiki core code, a bad idea, and even if you do you may hit other recursion limits or create other errors. Also look at Manual:$wgMaxTemplateDepth and/or Manual:$wgMaxPPExpandDepth. Clump (talk) 17:58, 24 October 2024 (UTC)
Are those changeable values? If so, where does one change them? Mlvluu (talk) 18:35, 24 October 2024 (UTC)
LocalSettings.php Clump (talk) 18:41, 24 October 2024 (UTC)

我建立了一个网站,但是不知道每次注册登录账号时都会显示发生内部错误

错误页面如下:
= 内部错误 =
[10258111e61eb4eb5831b8ba] 2024-10-24 05:33:27: 类型“BadMethodCallException”的致命异常
而开发者模式显示的错误格式是500,跟踪user文件时发现名字全是乱码,请问该如何解决? 凤吹风雪 (talk) 05:37, 24 October 2024 (UTC)
See Manual:How_to_debug Malyacko (talk) 15:53, 24 October 2024 (UTC)
此外,就是有没有wiki开发交流群推荐? 凤吹风雪 (talk) 05:42, 24 October 2024 (UTC)

Memory Leak

Hello, I updated my mediawiki from 1.35.14 to 1.42.3.

After run:

php maintenance/run.php update.php

The wiki is not running. The logfile of "php-fpm" shows the error:

PHP Fatal error:  Allowed memory size of 52428800 bytes exhausted (tried to allocate 40960 bytes) in /var/www/mediawiki-1.42.3/includes/config/GlobalVarConfig.php on line 75

I crease the memory limit from 20M to 100M. But I got the same error other limit.

Can you help? Mkulawin (talk) 12:00, 24 October 2024 (UTC)

The error says the memory limit is only 50mb. This is way too low for mediawiki. Please increase to about 256mb. Bawolff (talk) 18:11, 24 October 2024 (UTC)
Thanks for the info, I change to 256 MB but this not solve the issue.
[25-Oct-2024 08:21:52 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 40960 bytes) in /var/www/mediawiki-1.42.3/includes/config/GlobalVarConfig.php on line 75
I increase the memory to 512 MB, then the limit is not reach. But I got the error:
[25-Oct-2024 08:30:40 UTC] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/mediawiki-1.42.3/includes/libs/rdbms/database/DatabaseMySQL.php on line 756.
I use the database version:
Server version: 10.3.39-MariaDB MariaDB Server Mkulawin (talk) 08:39, 25 October 2024 (UTC)
Normally people disable max execution time for command line scripts. It is normal that update.php might take more than 30 seconds. Bawolff (talk) 19:14, 26 October 2024 (UTC)
The update.php don't need more then 30 second. The update runs without issue. The problem is:
When I got to our media wiki webpage and the index.php. I got a timeout because the index.php comes not back. When I increase the timeout, then you can see in the logfile from "php-fpm", that we reach the memory limit (see posts up). When I increase the memory big engouth, then I got a timeout from the DatabaseMySQL.php. But I see no long running quieries on the database. For me it looks that we have a memory leak during run index.php by accessing the database. But I don't see the reason.
This was a test:
When I update only the mediawiki php part, not the database part, than the index.php side will comes open without errors. The issue starts running php maintenance/run.php update.php. Mkulawin (talk) 07:39, 28 October 2024 (UTC)
I test the update to version "mediawiki-1.41.4". This works well. I don't have issues with that version. Mkulawin (talk) 07:43, 28 October 2024 (UTC)
Can you help me with version 1.42.3 and the memory leak. I don't found a solution. The usage of 1.41.4 is only a workaround. Mkulawin (talk) 08:56, 4 November 2024 (UTC)
I wonder if you tried following Manual:Upgrading? What is your website address? How did you upgrade it to the LTS? signed, Aafi (talk) 13:08, 5 December 2024 (UTC)
I can confirm this issue. I run many wikis on the same server cluster and when updating from 1.41 to 1.43 some of them broke. Before a solution is found I stopped doing updates on the rest of the wikis.
My guess is an infinite loop when gathering configuration data in an array with certain configurations. My wikis are 99% identical, the problem occurs on two wiki which use
wfLoadExtension( 'Auth_remoteuser' );
. Other wikis don't use this extension and there is no problem. Once I remove this extension the wiki loads (but is not usable for obvious reasons). --Manuel Schneider(bla) (+/-) 21:24, 22 December 2024 (UTC)
see this bug report: https://phabricator.wikimedia.org/T369974 Manuel Schneider(bla) (+/-) 21:27, 22 December 2024 (UTC)

wikidata duplicate

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


In wikidata the people Q16190529 and Q15628981 is the same person. Is possible to merge? Froin (talk) 15:54, 24 October 2024 (UTC)

See https://www.wikidata.org/wiki/Help:Merge
Please ask these types of questions at https://www.wikidata.org/wiki/Wikidata:Project_chat Bawolff (talk) 18:09, 24 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Recent Changes empty despite rebuildrecentchanges.php

Mediawiki 1.31 install. A recent issue where category pages weren't updating when pages were added to them led them to try rebuildall.php, which fixed that issue. But Recent Changes lost all entries. I checked individual pages and their revision histories were fine. Sooo, I tried the script to rebuild recent changes. Here's the output:

Rebuilding $wgRCMaxAge=7776000 seconds (90 days)

Clearing recentchanges table for time range...

Loading from page and revision tables...

Inserting from page and revision tables...

Updating links and size differences...

Loading from user, page, and logging tables...

Flagging bot account edits...

Removing duplicate revision and logging entries...

Deleting feed timestamps.

Done.


....


When I go and check the recent changes table, it's populated. But it doesn't translate into getting an actually populated Recent Changes page. Balerion300 (talk) 17:18, 24 October 2024 (UTC)

There might be a bug in the rebuildRecentchanges script, its not that popular so doesnt get tested much.
If you can post an example of a row from recentchanges table, that might be helpful.
For your original issue with categories, most common cause for that is a problem with job Queue Bawolff (talk) 21:57, 24 October 2024 (UTC)
I've run through the jobs and there's 0 in the queue, still no recent changes. I see a sapecific reference to a queue bug that was resolved prior to 1.31, but maybe I should dig through logs and see if it cropped up.
Here's a row from mw_recentchanges:     
rc_id: 341260
rc_timestamp: 20240920152143
      rc_user: 3504
rc_user_text: User
     rc_actor: 0
rc_namespace: 0
     rc_title: Shadow_assassin
   rc_comment: User's terminology
rc_comment_id: 0
     rc_minor: 0
       rc_bot: 1
       rc_new: 0
    rc_cur_id: 38693
rc_this_oldid: 0
rc_last_oldid: 0
      rc_type: 3
rc_patrolled: 1
        rc_ip:
   rc_old_len: NULL
   rc_new_len: NULL
   rc_deleted: 0
     rc_logid: 176479
  rc_log_type: move
rc_log_action: move
    rc_params: a:3:{s:9:"4::target";s:12:"Shadow child";s:10:"5::noredir";s:1:"0";s:17:"associated_rev_id";i:324230;}
    rc_source: mw.log Balerion300 (talk) 06:24, 25 October 2024 (UTC)
Just to check, on the Special:recentchanges page, there is a field for the date cut off of results. Do you have it set to show changes for a long enough time in the past Bawolff (talk) 19:13, 26 October 2024 (UTC)

Delete Account

Hello,

I would like to permanently delete my account and information. My username is AudibleImagery.

Please confirm receipt of this message and the deletion of my account and information.

Regards,

John 2601:281:D682:BE80:5CD4:AD8C:957B:C403 (talk) 03:38, 25 October 2024 (UTC)

Hi there! For attribution purposes, accounts cannot be deleted. If you can access the account, you can request vanishing through special:globalvanishrequest. ToadetteEdit (talk) 06:48, 25 October 2024 (UTC)

Cannot login with LDAP

I have built a Mediawiki 1.42.3 on the latest version of Rocky9 and imported my database from a previous version. Everything works except (Open)LDAP login which returns an error when I try to login. The strange thing is that the error is different if I clear my cookie cash. I know that LDAP is working because I can login at the OS level using sssd. Is there any way to debug this as the logs give me no clue?

These are my LocalSettings.php LDAP settings:

######### LDAP ########

#######################

# LDAP Extensions

######################

wfLoadExtensions( [

        'PluggableAuth',

        'Auth_remoteuser',

        'LDAPProvider',

        'LDAPAuthentication2',

        'LDAPAuthorization',

        'LDAPUserInfo'

] );

$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';

$LDAPAuthentication2UsernameNormalizer = 'strtolower';

$LDAPAuthentication2AllowLocalLogin = true;

$wgAuthRemoteuserAllowUserSwitch = true;

$wgPluggableAuth_EnableLocalLogin = true;

$wgAuthRemoteuserUserName = function() {

        $user = '';

        if( isset( $_SERVER[ 'REMOTE_USER' ] ) ) {

                $user = strtolower( $_SERVER[ 'REMOTE_USER' ] );

        }

        return $user;

};

$LDAPProviderDomainConfigProvider = function() {

        $config = [

                'acmecorp.com' => [

                        'connection' => [

                                "server" => "auth.acmecorp.com",

                                "user": "cn=readonlyroot,dc=acme,dc=corp",

                                "pass": "PASSWD",

                                "options" => [

                                        "LDAP_OPT_DEREF" => 1

                                ],

                                "basedn" => "dc=acme,dc=corp",

                                "groupbasedn" => "ou=group,dc=acme,dc=corp",

                                "userbasedn" => "ou=people,dc=acme,dc=corp",

                                "searchattribute" => "uid",

                                "usernameattribute" => "uid",

                                "realnameattribute" => "fullname",

                                "emailattribute" => "mail",

                                "grouprequest" => "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\GroupMember::factory"

                        ],

                        'authorization' => [

                                'rules' => [

                                        'groups' => [

                                                'required' => [

                                                        'cn=readonlyroot,dc=acme,dc=corp'

                                                ]

                                        ]

                                ]

                        ],

                        'userinfo' => [

                                'attributes-map' => [

                                        'email' => 'mail',

                                        'realname' => 'fullname'

                                ]

                        ]

                ]

        ];

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};

# In any case we need to specify LDAP domain configs

$LDAPProviderDomainConfigs = "$IP/../ldapprovider.json";

# Local login is enabled

$wgPluggableAuth_EnableLocalLogin = true;

$LDAPAuthentication2AllowLocalLogin = true;

$wgPluggableAuth_Class = "MediaWiki\\Extension\\LDAPAuthentication2\\PluggableAuth";

$wgPluggableAuth_ButtonLabel = "Log In (PluggableAuth)";

$wgPluggableAuth_Config['Log In (auth1.acmecorp.com)'] = [

    'plugin' => 'LDAPAuthentication2',

    'data' => [

        'domain' => 'acmecorp.com'

    ]

];

# LDAP

wfLoadExtension( 'PluggableAuth' );

$wgPluggableAuth_EnableAutoLogin = false; #if true, disables the logout option

$wgPluggableAuth_EnableLocalLogin = true;

wfLoadExtension( 'LDAPProvider' );

$LDAPProviderDomainConfigs = "$IP/ldapprovider.json";

wfLoadExtension( 'LDAPAuthentication2' );

$LDAPAuthentication2AllowLocalLogin = true;

### EDIT EDIT ENABLE DEBUG LOGS

/**

* The debug log file must never be publicly accessible because it

* contains private data. But ensure that the directory is writeable by the

* PHP script running within your Web server.

* The filename is with the database name of the wiki.

*/

$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";

### ALSO turn on LDAP debug

$wgLDAPDebug = 99;

$wgDebugLogGroups['ldap'] = '/var/log/mediawiki/debug-ldap.log';

$wgShowExceptionDetails = true;

#$wgRevokePermissions['user']['createaccount'] = true;

# Prevent new user registrations except by sysops

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

## Forces user to login to view Wiki

## # The following permissions were set based on your choice in the installer

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

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

## $wgGroupPermissions['*']['read'] = false; Techietubby (talk) 05:16, 25 October 2024 (UTC)

I have also tried using ldapprovider.json and that doesn't help either?
{
  "LDAP": {
    "connection": {
      "server": "auth.acme.com",
      "user": "cn=readonlyroot,dc=acme,dc=corp",
      "pass": "PASSWD",
      "port": 636,
      "enctype": "tls",
      "options": {
        "LDAP_OPT_DEREF": 1
      },
      "basedn": "dc=acme,dc=corp",
      "userbasedn": "ou=people,dc=acme,dc=corp",
      "groupbasedn": "ou=group,dc=acme,dc=corp",
      "searchattribute": "uid",
      "searchstring": "uid=USER-NAME,ou=people,dc=acme,dc=corp",
      "usernameattribute": "uid",
                        "realnameattribute": "cn",
                        "emailattribute": "mail"
    },
    "userinfo": {
      "attributes-map": {
        "email": "mail",
        "realname": "cn",
        "nickname": "uid"
      }
    }
  }
} Techietubby (talk) 05:38, 25 October 2024 (UTC)
[...] The strange thing is that the error is different if I clear my cookie cash. [...]
What exactly is the error?
Please, enable debug logging and share the (redacted) results. Osnard (talk) 06:39, 25 October 2024 (UTC)
MediaWiki internal error.
Original exception: [Zxt-iIUMHHwirGji-KznVQAAAMA] /wiki/index.php?title=Special:UserLogin&returnto=Development+Info+Wiki TypeError: Cannot assign null to property MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider::$remoteToken of type string
Backtrace:
from /var/www/html/mediawiki-1.42.3/extensions/Auth_remoteuser/src/UserNameSessionProvider.php(793)
#0 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(756): MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider->persistSession()
#1 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(670): MediaWiki\Session\SessionBackend->save()
#2 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(346): MediaWiki\Session\SessionBackend->autosave()
#3 /var/www/html/mediawiki-1.42.3/includes/session/Session.php(133): MediaWiki\Session\SessionBackend->persist()
#4 /var/www/html/mediawiki-1.42.3/includes/specialpage/LoginSignupSpecialPage.php(249): MediaWiki\Session\Session->persist()
#5 /var/www/html/mediawiki-1.42.3/includes/specialpage/SpecialPage.php(719): MediaWiki\SpecialPage\LoginSignupSpecialPage->execute()
#6 /var/www/html/mediawiki-1.42.3/includes/specialpage/SpecialPageFactory.php(1669): MediaWiki\SpecialPage\SpecialPage->run()
#7 /var/www/html/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#8 /var/www/html/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(145): MediaWiki\Actions\ActionEntryPoint->performRequest()
#9 /var/www/html/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(199): MediaWiki\Actions\ActionEntryPoint->execute()
#10 /var/www/html/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#11 {main}
Exception caught inside exception handler: [Zxt-iIUMHHwirGji-KznVQAAAMA] /wiki/index.php?title=Special:UserLogin&returnto=Development+Info+Wiki TypeError: Cannot assign null to property MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider::$remoteToken of type string
Backtrace:
from /var/www/html/mediawiki-1.42.3/extensions/Auth_remoteuser/src/UserNameSessionProvider.php(793)
#0 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(756): MediaWiki\Extension\Auth_remoteuser\UserNameSessionProvider->persistSession()
#1 /var/www/html/mediawiki-1.42.3/includes/session/SessionBackend.php(659): MediaWiki\Session\SessionBackend->save()
#2 [internal function]: MediaWiki\Session\SessionBackend->MediaWiki\Session\{closure}()
#3 /var/www/html/mediawiki-1.42.3/vendor/wikimedia/scoped-callback/src/ScopedCallback.php(102): call_user_func_array()
#4 /var/www/html/mediawiki-1.42.3/vendor/wikimedia/scoped-callback/src/ScopedCallback.php(58): Wikimedia\ScopedCallback->__destruct()
#5 /var/www/html/mediawiki-1.42.3/includes/session/SessionManager.php(951): Wikimedia\ScopedCallback::consume()
#6 /var/www/html/mediawiki-1.42.3/includes/session/SessionManager.php(268): MediaWiki\Session\SessionManager->getSessionFromInfo()
#7 /var/www/html/mediawiki-1.42.3/includes/Request/WebRequest.php(864): MediaWiki\Session\SessionManager->getSessionById()
#8 /var/www/html/mediawiki-1.42.3/includes/skins/Skin.php(1721): MediaWiki\Request\WebRequest->getSession()
#9 /var/www/html/mediawiki-1.42.3/includes/skins/Skin.php(1730): Skin->hideNewTalkMessagesForCurrentSession()
#10 /var/www/html/mediawiki-1.42.3/includes/skins/SkinMustache.php(137): Skin->getNewtalks()
#11 /var/www/html/mediawiki-1.42.3/skins/Vector/includes/SkinVectorLegacy.php(161): SkinMustache->getTemplateData()
#12 /var/www/html/mediawiki-1.42.3/includes/skins/SkinMustache.php(92): MediaWiki\Skins\Vector\SkinVectorLegacy->getTemplateData()
#13 /var/www/html/mediawiki-1.42.3/includes/skins/SkinTemplate.php(176): SkinMustache->generateHTML()
#14 /var/www/html/mediawiki-1.42.3/includes/Output/OutputPage.php(3004): SkinTemplate->outputPage()
#15 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(189): MediaWiki\Output\OutputPage->output()
#16 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionRenderer.php(106): MWExceptionRenderer::reportHTML()
#17 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(133): MWExceptionRenderer::output()
#18 /var/www/html/mediawiki-1.42.3/includes/exception/MWExceptionHandler.php(237): MWExceptionHandler::report()
#19 /var/www/html/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(221): MWExceptionHandler::handleException()
#20 /var/www/html/mediawiki-1.42.3/includes/actions/ActionEntryPoint.php(82): MediaWiki\MediaWikiEntryPoint->handleTopLevelError()
#21 /var/www/html/mediawiki-1.42.3/includes/MediaWikiEntryPoint.php(205): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError()
#22 /var/www/html/mediawiki-1.42.3/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#23 {main} Techietubby (talk) 11:19, 25 October 2024 (UTC)
I enabled debugging as follows but couldn't see anything LDAP related.
$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";
### ALSO turn on LDAP debug
$wgLDAPDebug = 99;
$wgDebugLogGroups['ldap'] = '/var/log/mediawiki/debug-ldap.log';
$wgShowExceptionDetails = true; Techietubby (talk) 11:21, 25 October 2024 (UTC)
Stupid question: Which directory should this be in? /var/www/html/mediawiki-1.42.3 or /var/www/html ?
$LDAPProviderDomainConfigs = "$IP/../ldapprovider.json"; Techietubby (talk) 11:22, 25 October 2024 (UTC)
You are using Extension:Auth_remoteuser. Can you confirm you have set up the webserver in a way it provides a $_SERVER['REMOTE_USER']? Something like Kerberos authentication? Osnard (talk) 14:11, 26 October 2024 (UTC)
I have not done any browser configuration other than to create the ssl.conf and to install the SSL certs as I cannot find any instructions for this, so any advice would be gratefully received .
I built this server from scratch and imported the database from a very old server that runs Centos-7 and has never been updated. It is using the original LDAPAUTH plugin and I can only see the changes that were made to LocalSettings.php. Is there somewhere else I should look?
Both servers are authenticating to an OpenLDAP server. Techietubby (talk) 08:56, 28 October 2024 (UTC)
The old Extension:LDAP_Authentication supported implicit authentication via
. But it did not require it. I can not tell if it was used in your old set up (maybe you can share a redacted version of your old configuration here). If not, you don't need Extension:Auth_remoteuser. If it was, you need to configure your webserver in a way it performs the Kerberos authentication and hands over the authenticated username to the wiki application (usually this is done in the [$_SERVER['REMOTE_USER']] variable). It highly depends on your webserver (Apache, Nginx, IIS) how this needs to be done. Osnard (talk) 07:15, 29 October 2024 (UTC)
I cannot find any mention of Extension:Auth_remoteuser in the config. Techietubby (talk) 07:59, 29 October 2024 (UTC)
Hi,
The old v1.34.2 server used:
$wgAuth = new LdapAuthenticationPlugin(); $wgAuthManagerAutoConfig['primaryauth'] += [
LdapPrimaryAuthenticationProvider::class => [
'class' => LdapPrimaryAuthenticationProvider::class,
'args' => [[
'authoritative' => true, // don't allow local non-LDAP accounts
]],
'sort' => 50, // must be smaller than local pw provider
],
];
$wgLDAPDomainNames = array("ACMELDAP"); $wgLDAPServerNames = array("ACMELDAP"=>"auth.ACMEcorp.com");
$wgLDAPServerNames = array("ACMELDAP"=>"ldapserver.ACMEcorp.com");
$wgLDAPUseLocal = false;
$wgLDAPEncryptionType = array("ACMELDAP"=>"ssl"); $wgLDAPEncryptionType = array("ACMELDAP"=>"tls", "ACMELDAP"=>"ssl", "ACMELDAP"=>"clear", );
$wgLDAPEncryptionType = array("ACMELDAP"=>"ssl"); $wgLDAPOptions = array("ACMELDAP" => array( LDAP_OPT_DEREF, 1 )); $wgLDAPPort = array("ACMELDAP"=>636);
$wgLDAPSearchStrings = array("testLDAPdomain"=>"uid=USER-NAME,ou=people,dc=ACME,dc=corp");
$wgLDAPSearchStrings = array("ACMELDAP"=>"uid=USER-NAME,ou=people,dc=ACME,dc=corp"); $wgLDAPSearchAttributes = array("ACMELDAP"=>"uid"); $wgLDAPBaseDNs = array("ACMELDAP"=>"dc=ACME,dc=corp"); $wgLDAPGroupBaseDNs = array("ACMELDAP"=>"ou=group,dc=ACME,dc=corp"); $wgLDAPUserBaseDNs = array("ACMELDAP"=>"ou=people,dc=ACME,dc=corp"); $wgLDAPProxyAgent = array("ACMELDAP" => "cn=readonlyroot,dc=ACME,dc=corp"); $wgLDAPProxyAgentPassword = array("ACMELDAP" => "PASSWD"); $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['autocreateaccount'] = true; Techietubby (talk) 07:58, 29 October 2024 (UTC)
I have double-checked and I have enabled the extra plugin:
#######################
# LDAP Extensions
######################
wfLoadExtensions( [
        'PluggableAuth',
        'Auth_remoteuser',
        'LDAPProvider',
        'LDAPAuthentication2',
        'LDAPAuthorization',
        'LDAPUserInfo'
] );
$LDAPAuthorizationAutoAuthRemoteUserStringParser = 'username-at-domain';
$LDAPAuthentication2UsernameNormalizer = 'strtolower';
$LDAPAuthentication2AllowLocalLogin = true;
$wgAuthRemoteuserAllowUserSwitch = true;
$wgPluggableAuth_EnableLocalLogin = true;
# $wgLDAPProxyAgent = array("LDAP" => "cn=readonlyroot,dc=acme,dc=corp");
$wgLDAPProxyAgentPassword = array("LDAP" => "PASSWD");
# In any case we need to specify LDAP domain configs
$LDAPProviderDomainConfigs = "/var/www/html/mediawiki-1.42.3/ldapprovider.json";
#$LDAPProviderDomainConfigs = "$IP/../ldapprovider.json";
## Prevent users from adding accounts
#$wgRevokePermissions['user']['createaccount'] = true;
## Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;
## Forces user to login to view Wiki
## # The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['autocreateaccount'] = true;
I have tested this but still it doesn't work and I see no LDAP messages in the logs. Do I have to configure Apache in some way? Techietubby (talk) 08:44, 31 October 2024 (UTC)

Change API Parameter format

Hey, no clue why but the regular API format isn't working.

Instead, my team have found out that it's been changed to a '/'

example: Special:EmailUser?wpTarget=RandomUser is now Special:EmailUser/RandomUser

Same with rollbacks, just all API functions are like that now.

I'm just wondering if anyone knows how to change the default format to the one that works on my Wiki? 2A00:23C8:2D11:9001:F04B:4894:137C:E96B (talk) 11:31, 25 October 2024 (UTC)

First off, this is not the api.
Seccond, try setting $wgUsePathInfo = false; in LocalSettings.php
If it still doesnt work, see manual:$wgArticlePath Bawolff (talk) 16:48, 25 October 2024 (UTC)

Cannot import multistream.xml.bz2 using importDump.php

D:\wiki_code\mediawiki\maintenance>php run.php importDump.php --conf ../LocalSettings.php ../../enwiki-20241001-pages-articles-multistream.xml.bz2

PHP Warning:  XMLReader::read(): uploadsource://a6ad4182f4b5e7c1934008b0d31a031e:38: parser error : Extra content at the end of the document in D:\wiki_code\mediawiki\includes\import\WikiImporter.php on line 655

PHP Warning:  XMLReader::read():   </siteinfo> in D:\wiki_code\mediawiki\includes\import\WikiImporter.php on line 655

PHP Warning:  XMLReader::read():              ^ in D:\wiki_code\mediawiki\includes\import\WikiImporter.php on line 655

[3c1b37db7be0bf55e8d483df] [no req]   Error: Data must be loaded before reading

Backtrace:

from D:\wiki_code\mediawiki\includes\import\WikiImporter.php(762)

#0 D:\wiki_code\mediawiki\includes\import\WikiImporter.php(762): XMLReader->read()

#1 D:\wiki_code\mediawiki\includes\import\WikiImporter.php(727): WikiImporter->handleSiteInfo()

#2 D:\wiki_code\mediawiki\maintenance\importDump.php(369): WikiImporter->doImport()

#3 D:\wiki_code\mediawiki\maintenance\importDump.php(301): BackupReader->importFromHandle()

#4 D:\wiki_code\mediawiki\maintenance\importDump.php(142): BackupReader->importFromFile()

#5 D:\wiki_code\mediawiki\maintenance\includes\MaintenanceRunner.php(703): BackupReader->execute()

#6 D:\wiki_code\mediawiki\maintenance\run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()

#7 {main}


Not seen this error anywhere online, I'm on windows 10. It says the data must be loaded before reading??? It says parsing error?? Wikipedia dumps are incorrect??

Please help RogerNoger (talk) 16:14, 25 October 2024 (UTC)

Comments

My database is attacked by some kind of spam-bot. I have protected it now with CleanTalk what is detecting illegal entrance. But at all image-upload-pages there's some illegal text in the Comments. Is it possible to remove all this comments? Ronald vd D (talk) 19:25, 25 October 2024 (UTC)

Upgrading from 1.32.1 to 1.39.2?

I'm a bit confused by the upgrade page. Is it now safe to upgrade from 1.32.1 directly to 1.39.2? There are two separate warnings on https://m.mediawiki.org/wiki/Manual:Upgrading that don't quite match.

Thansk in advance. 38.59.161.94 (talk) 07:42, 27 October 2024 (UTC)

"Do not upgrade from a MediaWiki version older than 1.33 to MediaWiki 1.39.1, or you may lose data! Upgrade to MediaWiki 1.35 first."
What is the other warning that you see? Malyacko (talk) 14:44, 27 October 2024 (UTC)
"Since Version 1.36, MediaWiki only commits to supporting upgrades from two LTS releases ago (see phab:T259771). Upgrades from older versions of MediaWiki will have to be performed in multiple steps. This means that if you want to upgrade to 1.42 from 1.34 or earlier, you'll first have to upgrade your 1.34 wiki to 1.35 (or 1.39), and, from 1.35 (or 1.39), you'll be able to upgrade to 1.42."
Also at https://phabricator.wikimedia.org/T326071 which is linked to from the Upgrade manual page, it seems that the error in 1.39.1 is labelled as fixed in 1.39.2 38.59.161.94 (talk) 15:07, 27 October 2024 (UTC)

Upgrade from 1.35.14 to 1.39.10 or 1.42.3 stops at ExistingWiki

Hi

I am in the process of upgrading my old wiki to latest version.

I am using the WebUpdater as I don't have command line access. I have a cpanel interface.

PHP 8.3.12

MySQL 8.0.40

I successfully upgraded from 1.24 to 1.35.14 without many issues.

Tried a few times to upgrade from 1.35.14 to 1.42.3

The web updater stops in step 2 at ExistingWiki with a blank page.

Then tried to upgrade from 1.35.14 to 1.39.10 with same result. Stop at ExistingWiki blank page - no errors.

When viewing my wiki at this stage the wiki seems updated to the correct version but the db is still probably in 1.35 version so no content accessible only db errors.

I have no idea how to continue from here.

I have asked my hosting support to provide errorlogs but nothing there that seems relevant.

This wiki dates back to 2005 so LocalSettings.php has been updated a lot.

Any suggestions?

Thanks in advance. 89.17.154.63 (talk) 20:13, 27 October 2024 (UTC)

Using PHP 8.3.12 on the MediaWiki 1.39.10 codebase may be an issue. Try this step of the update with a PHP 8.1.
In general: If there is a blank screen (internal server error) shown on the client, there is also an entry in the serverside PHP error log. Maybe you (or your hoster) need to tweak the error_reporting first, but you should be able to get an actual error message in such a case.
If any possible, use the command line updater rather than the web updater. Osnard (talk) 07:07, 28 October 2024 (UTC)
Hi,
the expert support team at my hosting company says no php error logs are to be found and it appears to not follow any normal PHP log references. Where would those PHP logs be located?
I added the following lines at the top of the LocalSettings file
error_reporting( -1 );
ini_set( 'display_errors', 1 );
$wgShowExceptionDetails = true;
I don't know if this is the correct way and would appreciate any help as I am completely stuck.
Note that prior to getting to this place I got errors on screen for issues that I had to fix in LocalSettings as well as updating the PHP version to get to the first step of the WebUpdater. 213.181.100.121 (talk) 08:50, 5 November 2024 (UTC)
And I finally found the problem after tweaking log settings and finding the following log in cpanel Errors log.
PHP Notice:  Undefined variable: wgCommandLineMode
The problem variable used in LocalSettings: wgCommandLineModeI commented those lines out and upgrade went smoothly through WebUpdater. 213.181.100.121 (talk) 13:06, 6 November 2024 (UTC)

Wiki Toolbox

Help with adding the "toolbar" to my Wiki.

Hello,

I am editing my Wiki, but I was wondering how I can get the "toolbox" on the edit page?


I have seen this on pages like MediaWiki, Wikipedia, and other sources.

(For context, I am using Vector Legacy as my skin.) Enzzo gabriel (talk) 00:29, 28 October 2024 (UTC)

I still use Extension:WikiEditor. Jonathan3 (talk) 08:58, 28 October 2024 (UTC)

CirrusSearch do not index all pages

Hello, I configured cirrussearch on my Mediawiki. Some keywords will found but the most one not. What can I do.

The elasitc search has follow indexes:

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size green open mw_cirrus_metastore_first 7wp2GksrTomwLR1PNLEIaw 1 0 20 2 12.5kb 12.5kb green open wikidb_general_first MIUxSiRoRliaRZuW_9nXyg 1 0 66 8 403.7kb 403.7kb green open wikidb_content_first anQitu8XQRupvOwAYYEZiw 1 0 111 0 8.3mb 8.3mb Mkulawin (talk) 13:23, 28 October 2024 (UTC)

Ping by bot.

Hi, I noticed that if a user with "bot" permission pinging in the edit summary, the ping is not sent.

(I note that the question arose from a wiki site that does not belong to the Wikimedia Foundation, where manual edits are made through the bot account, so it is necessary to send pings.)

what can be done?

Thanks in advance! Neriah (talk) 19:02, 28 October 2024 (UTC)

You could remove the !$user->isBot() check in the file includes/DiscussionParser.php in the Echo extension code base. Malyacko (talk) 20:21, 28 October 2024 (UTC)
Thank you! Neriah (talk) 21:08, 28 October 2024 (UTC)

MediaWiki WCAG compliance

Is there some documentation about general MediaWiki's compliance with Web Content Accessibility Guidelines 2.0 or 2.1? The pages Accessibility and Accessibility and usability cleanup are a starting point. Still, they suggest there is no real drive toward accessibility, not to speak of a compliance overview, etc. [[kgh]] (talk) 19:06, 28 October 2024 (UTC)

WCAG are guidelines, and MediaWiki follows most of them to varying degrees in various of its components. We do however not promise compliance (not that it is a legal framework to comply with), and the MW framework as a whole is not regularly tested by a recognized standards body to certify (at the cost of a hefty fee) how much it is or is not 'compliant'.. It also highly depends on what/which functionality you release to which size of audience and if the content authors are the kind of people that mark up their emails with skittle colors. —TheDJ (Not WMF) (talkcontribs) 20:11, 28 October 2024 (UTC)
Thank you for your insight on accessibility with MediaWiki.
Yeah, most of the issues will probably come from users of MediaWiki instances who are unaware of how to create compliant content. I cannot blame them. This is why I asked about plain MediaWiki without user-generated content.
As I learned yesterday while browsing, there are many accessibility testers around. So, I did random tests on some MediaWiki instances, and the results were not bad. Moreover, they provided starting points on how to improve.
If I grokked correctly, e.g., the European Accessibility Act (EAA) should become national law requiring people to provide accessible websites by the end of June 2025. I guess things will get interesting in the first half of next year. [[kgh]] (talk) 19:53, 29 October 2024 (UTC)

Session data lost

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I'm sure I'm not the first to have this issue, but I couldn't find the info I need in FAQs. I'm in the process of setting up a Wiki at knowledge.reconnect.org.uk, I'm currently mostly installing extensions etc. before posting the initial pages that are currently in desktop files that will need editing. All was going well until I attempted another update via http://knowledge.reconnect.org.uk/mw-config/index.php. I got the error message "Your session data was lost! Check your php.ini and make sure session.save_path is set to an appropriate directory." How do I resolve this? I have MediaWiki 1.40.1 installed. JonathanReconnect (talk) 12:15, 29 October 2024 (UTC)

So, did you
Check your php.ini and make sure session.save_path is set to an appropriate directory.
?
The error message indicates that the session data can not be stored. This may be related to the mentioned configuration. There is also Manual:$wgSessionCacheType which may contain useful information, but I don't think it really applies to the web installer. Osnard (talk) 13:53, 29 October 2024 (UTC)
Hi Osnard, thanks for your quick response. Unfortunately, I don't currently have command line access - but that will get sorted in the next 24 hours. Perhaps I just need to wait for that?! I don't understand why the problem suddenly appeared, I was just setting up the ConfirmEdit Extension... as soon as I can, I'll check php.ini and post what I find here. Hopefully it'll be a solution. Thanks! JonathanReconnect (talk) 14:25, 29 October 2024 (UTC)
I got command access and it all seemed OK. My wiki was also all working fine. I then discovered I was making a stupid mistake! I'd set up a bookmark to access my update page at knowledge.reconnect.org.uk/mw-config/index.php but prefixed it with http:// instead of https://... JonathanReconnect (talk) 13:42, 31 October 2024 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Mediawiki still says "LocalSettings.php not found"

Even after LocalSettings.php has been put inside the mediawiki-1.42.3 directory it still says that it is not found; why? Test1234567890987654321 (talk) 15:58, 29 October 2024 (UTC)

The problem with this is that you are not in the right directory. Assuming you are on Linux, it should be in "/var/www/html/wiki". The mediawiki-1.42.3 directory is just the downloaded file, not the actual installation. Enzzo gabriel (talk) 00:09, 30 October 2024 (UTC)
Hello. Thank you for responding to my question. I am not sure which other directory exists other than the one I put LocalSettings.php in, because inside it there is also index.php, mw-config, maintence etc. The reason for it being called mediawiki-1.42.3 is because I didn't rename it after installation. Test1234567890987654321 (talk) 16:14, 1 November 2024 (UTC)

Language issues: En-GB

In MediaWiki 1.42.3, could you check: public_html/w/languages/i18n/en-gb.json ?

This is deployed with the language set to British English, but it seem to have some Yoruba terms in it (for example 'Talk' appears as 'Sọ̀rọ̀' and 'Change user groups' starts 'Ìyípo'). I have not been through every one. Hogweard (talk) 19:27, 29 October 2024 (UTC)

This is being tracked in https://phabricator.wikimedia.org/T375487 P858snake (talk) 20:16, 29 October 2024 (UTC)

Unable to install MediaWiki (database error)

Hello, I'm trying to install MW and I get the following error:

[ZyIAAQuhVNbgTKjv0nNYfwAAACA] /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:/

And yes the error message stops there, right in the middle of a URL.

I'm using:

- A MySQL (v8.0) database, which I can access with phpMyAdmin. The host and username are recognized by the MW installer.

- PHP v8.3

- The latest version of MediaWiki (downloaded a couple of days ago)

- No extension for now. Just trying to install vanilla MediaWiki. 2.7.72.6 (talk) 09:59, 30 October 2024 (UTC)

Is there a more complete error in the php error log? Bawolff (talk) 17:41, 30 October 2024 (UTC)

Hello! My wiki's name is quite long (Craighead County History). The sitename overlaps with the search bar. How can I fix this? This wiki is hosted by Miraheze, if that information is helpful. Craighead County History (talk) 13:18, 30 October 2024 (UTC)

You should contact Miraheze about issues on wikis hosted by them. Taavi (talk!) 16:34, 30 October 2024 (UTC)
you may be able toadd custom css to move the search box to the right, or reduce the font size of wiki title. or change default skin to something else that does not have this issue Gryllida 10:53, 3 November 2024 (UTC)

Problema con caracteres especiales / Problem with special characters

He querido actualizar mi wiki de la versión 1.34.0 a la versión 1.42.1 y para hacerlo hice una actualización intermedia a la versión 1.39.8 como se recomienda en el manual de actualización. Al hacerlo encuentro que las páginas cuyo nombre contiene tildes, diéresis, ñ o caracteres similares aparecen vacías o sus links de entrada no aparecen en las listas.

Esta es la dirección de mi Wiki:

http://wiki.neotropicos.org/index.php?title=Portada

El problema se puede visualizar en la columna de la izquierda en los links Bibliografía y Topónimos que contienen tildes y dentro del Glosario los vínculos que presentan este problema no aparecen. Sólo aparece la viñeta. Cómo puedo solucionarlo?

____________________________

I wanted to update my wiki from version 1.34.0 to version 1.42.1 and to do so I did an intermediate update to version 1.39.8 as recommended in the update manual. When I did so I found that pages whose names contain accents, umlauts, ñ or similar characters appear empty or their entry links do not appear in the lists.

This is the address of my Wiki:

http://wiki.neotropicos.org/index.php?title=Homepage

The problem can be seen in the left column in the Bibliography and Toponyms links that contain accents and within the Glossary the links that present this problem do not appear. Only the bullet appears. How can I solve it? Mmtorou (talk) 05:20, 31 October 2024 (UTC)

Cannot reproduce. All accents appear in "Topónimos" and "Bibliografía". Using Firefox 131 on Linux. Do you have broken fonts installed on your system, maybe? Malyacko (talk) 08:26, 31 October 2024 (UTC)
The fonts are installed correctly. The problem is only with links whose name contains accents, "ñ" or similar characters. Mmtorou (talk) 23:59, 1 November 2024 (UTC)

Categories broken after updating to 1.42.3.

Just in case anyone finds this later, I found the solution here: https://www.reddit.com/r/mediawiki/comments/1axbuyh/problem_with_the_visual_editor/

Setting $wgUsePathInfo = true; in LocalSettings.php.



After updating from 1.39 to 1.42.3 all pages with categories have the same problem:

When I open the page in the Visual Editor the existing categories are shown in the category box at the bottom of the page as red links with these urls; Index.php?title=Category:category name].

If I leave it like that then after saving the page that url shows up at the bottom of the page text and the page no longer has any categories.

If I use the Source Editor instead everything is fine and the category shows up between double brackets.

The steps I took to update:

I uploaded the 1.42.3 zip to the server, had it unzipped to a new directory. I downloaded the latest versions for LabeledSectionTransclusion and Popups and uploaded those to the Extensions folder in the new directory.

I renamed the 1.39 folder to another name and then renamed the 1.42.3 folder to the regular wiki name. Then I ran the update script.

I opened the wiki main page and then saw I forgot to copy the images directory to the new folder, which is what I did next. I then reloaded the main page and everything looked fine.

The first time I edited a page I didn't notice the error at the bottom but after saving I saw what happened and from then on it became clear this is happening every time now.

I've tested by disabling all the extensions except for the editors to see if any of those could be the culprit but I keep getting the same issue.

These are the normally enabled extensions:

wfLoadExtension( 'CodeEditor' );

wfLoadExtension( 'LabeledSectionTransclusion' );

wfLoadExtension( 'PageImages' );

wfLoadExtension( 'ParserFunctions' );

wfLoadExtension( 'Popups' );

wfLoadExtension( 'TextExtracts' );

wfLoadExtension( 'VisualEditor' );

wfLoadExtension( 'WikiEditor' );

I did find the following in the release notes for 1.42:

ParserOutput::getCategories(), deprecated in 1.40, has been removed. You should use ::getCategoryNames() and ::getCategorySortKey() instead.

Maybe that is related but I don't understand how it could be as all the other extensions except for the two mentioned above come bundled with the latest version and should be compatible, one would think.

Could it be something needs to be added or removed from LocalSettings?

I'd love to know what the fix for this is as I used categories on all pages.

Thanks! Laurvin (talk) 16:13, 31 October 2024 (UTC)

Special pages not functioning properly

my special pages have a different format to the default and i have no clue why

e.g. Special:EmailUser?wpTarget=TargetUsername does not work, but Special:EmailUser/TargetUsername does work

idk if it's relevant but below is the path setup

$wgScriptPath = "";

$wgScriptExtension = "$wgScriptPath/index.php";

$wgArticlePath = "/wiki/$1";

$wgUsePathInfo = true;


foreach ($actions as $action) {

  $wgActionPaths[$action] = "$wgArticlePath/$action";

}

$wgActionPaths["view"] = "/wiki/$1";

$wgActionPaths["rollback"] = "/index.php?title=$1&action=rollback"; Cl0vermead0w (talk) 18:37, 31 October 2024 (UTC)

Recent changes always returns HTTP200 instead of HTTP204

second post on here in four hours but the recent changes on my wiki only ever returns a HTTP200 when it checks if there has been any recent changes

on other wikis it will return a HTTP204 until there has been a new change that isn't displayed

no clue why this happens so any input is appreciated Cl0vermead0w (talk) 22:12, 31 October 2024 (UTC)

I assume you mean with the peek url parameter?
It could be due to something with your webserver or proxies between webserver. Hard to say for sure. Bawolff (talk) 00:52, 1 November 2024 (UTC)
unfortunately i can't see any misconfigurations within my nginx configuration ;( 2A00:23C8:2D11:9001:D413:5BE5:F0E3:C078 (talk) 22:47, 2 November 2024 (UTC)