Jump to content

Project:Support desk

About this board

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

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  4. To start a new thread, click the box with the text "Start a new topic".

The link icon is not displayed

2
Kohana240 (talkcontribs)
The link icon is not displayed

In the timeless skin, there was originally a link svg in the upper right corner of the inserted link text, but it was not displayed

Srigurukripa (talkcontribs)

Dear Wikimedia Support Team,

content strikken

[edited by administrator]

@Srigurukripa this is a support desk for the software and not a general appeals platform. So not only are you in the WRONG place, you added your comment to a random other thread, using an alternate account from your actual account. Please don't. -- User:TheDJ

Reply to "The link icon is not displayed"

Mediawiki keeps redirecting to old IP after the server got a new IP

3
Kmuriuki (talkcontribs)

I installed mediawiki at work and it has been working without issues. But recently I changed ip addresses of my server from 192.168.80.30 to 172.16.9.10 but whenever i am trying to access mediawiki is redirecting to old ip address. Kindly assist. i have been trying to search localsetting but i am not lucky to find it?

Fokebox (talkcontribs)

Try to clean cache

Kmuriuki (talkcontribs)

Is it possible we anydesk

Reply to "Mediawiki keeps redirecting to old IP after the server got a new IP"

Using Phonos with Top Icon

3
Theklan (talkcontribs)

Hello! I post this here, because at Help_talk:Extension:Phonos has been suggested to use this page. I am trying to understand the possibilities to use Phonos in some creative ways. At en:Wikipedia:Spoken_articles we have a list of articles with spoken version (see, for example, en:2 Broadway. The project adds a Top Icon loudspeaker, which goes to the file itself when clicked, instead of being in the page (which may be better for people who wants to use the spoken version without leaving the page). I wonder if there would be a way to combine both things, and have the audio played directly when clicked the top icon. I could get the Phonos loudspeaker up there, but I don't know if there is a better option (like using the custom loudspeaker). Thanks!

Samwilson (talkcontribs)

It should be possible with e.g. <indicator name="spoken"><phonos file="Wikipedia_Audio_-_2 Broadway.wav"></phonos></indicator> but it seems not to work because the click handler is only looking within #mw-content-text and the indicators area is outside that. We should probably also add the wikipage.indicators hook. I opened task T369262.

Theklan (talkcontribs)

Thanks!

Reply to "Using Phonos with Top Icon"

Automated way to add a Category to all pages in Namespace "Main"

3
Abhidevananda (talkcontribs)

Hi again. I have a wiki with close to 3000 articles in Namespace Main. Now I need to add a Category (the same category) to all of those articles (with only a few exceptions). I am looking for an automated way to do this, maybe a regex in Special:ReplaceText (or possibly in some other extension). I have researched this but could not find specific instructions. If this can be done, what would the regex(s) be... presumably in two parts (one for the Search string and the other for the Replace string? Thanks.

Bawolff (talkcontribs)
Abhidevananda (talkcontribs)

Thanks, Bawolff. Just found the answer through AI.

  Search for: (.+)$
  Replace with: $1\n

Here’s a breakdown of what these expressions do:

  (.+)$: This matches the entire content of the page.
  $1\n: This appends the category tag  to the end of the content.

Make sure to replace YourCategoryName with the actual name of the category you want to add. (Sorry, I had trouble typing all of the Replace string. Immediately after the $1\n must come two opening square brackets, then Category:YourCategoryName followed by two closing square brackets.)

I also found that for such a large number of results in the ReplaceText extension I had to extend the result limits from the default 250 to a much higher number. But the instructions for doing this (adding a line in LocalSettings) were explained in the ReplaceText extension doc.

Appreciate all your help.

Reply to "Automated way to add a Category to all pages in Namespace "Main""

What's the situation with Structured Discussions?

5
Subfader (talkcontribs)

I wonder what extensions are recommended atm if you need comments or a forum.

On Structured Discussions I read that the project ended in November 2023 and everyone is advised to archive their discussion (what the?). Is there a follow-up? On the other hand this very support desk uses exactly this?

What should I use if I start a wiki nowaydays and want future-proof comments under article pages instead of talk pages?

TheDJ (talkcontribs)

Structured discussion is dead, I wouldn't use it. I'd argue it is impossible to maintain for 3rd parties, with a lot of exceptions and interventions that differ from how we do things in MW.

Everything Wikimedia will eventually switch to using DiscussionTools.

Subfader (talkcontribs)

Thanks. Let's hope this will be supported longer than Flow.

Bawolff (talkcontribs)

I have a much better feeling about discussion tools than flow. Its already been fairly well recieved by the community, where flow was controversial right out of the gate. I think it has staying power (just my 2 cents, i dont have access to a crystal ball any more than anybody else)

Jack Phoenix (talkcontribs)

@Subfader: Out of general curiosity, exactly what is the problem with Comments? As the maintainer and primary developer of it since 2011, I'd be curious to know. :) Its User Interface is pretty stable and definitely not using the latest fancy design things, but it gets the job done. (I'll admit, though, that OOUI did end up lasting for several years longer than it did, but that, too, is being phased out and I'm sure that the successor will also be sunset in favor of a newer, shinier gadget, give it some time. Not using these sort of frameworks comes with the unexpected benefit of your code working regardless, if you can tolerate a somewhat "dated" looking UI.)

For the record: the initial version was written circa 2006 (!) and as it (like other social tools originating from ArmchairGM which enable new content types, like Extension:FanBoxes, Extension:LinkFilter, Extension:Video, ...) predates MediaWiki's ContentHandler system by many years, it does things in a way which isn't ideal, yet it's surprisingly functional and shockingly robust (in my biased opinion), because even major core changes aren't likely to disrupt this little extension which does things in its own way.

Some people argue that "no recent code commits" (or something similar) equals to a dead project. I largely disagree; while it may mean that the end-user should exercise a bit of caution and carefully test things etc., not all MediaWiki developers are huge fans of "move fast and break stuff", which, alas, seems to be all too common these days. Sure, it bumps up a repository's commit count a lot, but what for, and at what cost?

Now, as for Comments' actual architectural shortcomings...while the comments are associated with a(n existing wiki) page, they are indeed in other ways separate, they are not regular wiki page content or anything. So implementing a history interface (phab:T156736) or the ability to undelete previously deleted comments (phab:T127595) is very tricky, to say the least, and I for one would be very surprised (but in a positive way!) to see those implemented before Comments turns 20 years old in 2026.

Reply to "What's the situation with Structured Discussions?"

Upgrading MediaWiki from 1.27.1 to the Latest Version

6
Georgesanjeev (talkcontribs)

Hello, community!

I'm currently using MediaWiki version 1.27.1 and looking to upgrade to the latest version available. Could someone guide me through the steps involved in this process? Here are a few specific questions I have:

  1. Upgrade Steps: What are the recommended steps to upgrade from MediaWiki 1.27.1 to the latest stable version? I've tried the upgrade but it looks like there's been some MAJOR schema changes and it errors out asking for missing tables. Ive also tried going to the v1.28.0 but its giving me same error. Table 'user' not found. Are there any particular considerations or prerequisites I should be aware of? My next idea is to setup 1.42.1 with the default db and try and see if a schema compare will let me allow a data migration. but again
  2. Database Migration: Currently, my MediaWiki instance is using SQL Server and I've setup a MariaDB using the sql workbench migration feature. Few warnings about the Auto Increment being dropped but nothing major. I'm particularly worried about the schema changes between the two versions

Any help or guidance on these topics would be greatly appreciated! Thank you in advance.

Fokebox (talkcontribs)

Upgrade Path:

  • Direct upgrade to 1.42.1 from MediaWiki 1.33 or earlier versions is not supported
  • Upgrade to MediaWiki 1.35 before transitioning to MediaWiki 1.42 to prevent data loss
  • MediaWiki 1.35 is the oldest version compatible with a direct upgrade to MediaWiki 1.42
TheDJ (talkcontribs)
Georgesanjeev (talkcontribs)

The problem I have here is that, the db level changes between 1.27 and 1.35.

My new db is MYSQL and current one is SQL Server. I tried to setup 1.35 on the new server and import the data but apparently there are quite a few changes schema wise for the data migration to go through .


I aslo tried to setup 1.27.1 on a new server and run through the mediawiki installer but it always errors out with "Table 'mediawiki.cur' doesn't exist" which is strange considering from what Ive read its been "The cur table was used in older versions of MediaWiki wikis to store the current revision of a page"


So im stuck as to where I go from here

TheDJ (talkcontribs)

Yes, moving from a completely different database system, requires quite a bit of knowledge about SQL to pull off and will be a lot of manual labor.

You can find a full documentation about the history of all (mysql) tables via Manual:Database layout. You will probably want to peruse through all that in order to make it work. I would definitely setup a mysql 1.27 with a mysql setup first to do the SQL to MySQL data migration, before getting started on the actual data migration.

There is also the history of the entire mssql schema at https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/REL1_33/maintenance/mssql/

However note that already in 1.33 mssql had major broken parts and was lagging behind the other schema changes, so I would not use it to upgrade to the 1.33 schema. It and it's history may however help in figuring out the history of the schema and the differences with the mysql variant.

Georgesanjeev (talkcontribs)

So here is the process I find might be the best way to do it.

  1. Backup current mediawiki db from sql server
  2. Using MySql workbench migrate to new MySQL DB (Apparently workbench dropped all auto increments for the primary fields)
  3. Setup 1.35 on new server. Recognsies tables in db and runs upgrader. And the below error.

Error -

Making bot_passwords.bp_user into an unsigned int ...

An error occurred:

Cannot change column 'bp_user': used in a foreign key constraint 'FK__bot_passw__bp_us__2C3393D0'

Do i go about removing all the FKs it reports as errors and then readd them later on?

Reply to "Upgrading MediaWiki from 1.27.1 to the Latest Version"

php deprecation warnings

4
2003:C2:3F29:3100:C0D3:82AF:BD5B:6653 (talkcontribs)

We have upgraded from MW 1.35 to 1.39 and now the logs are full of php deprecation warnings.

LocalSettings:

$wgDevelopmentWarnings=false

$wgShowDebug=false

php.ini:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT


nonetheless we have thousands of log messages about Parser::$mShowToc was deprecated, $wgAllowImageTag to true is deprecated, InternalParseBeforeSanitize hook was deprecated


and so on. Log files are not readable anymore. How can I suppress that?

Malyacko (talkcontribs)

Those are not "PHP deprecation warnings" but MediaWiki deprecation warnings. You can fix them by fixing/updating whatever custom or third-party code triggers them so log files become readable again.

2003:C2:3F29:3100:2479:2EC:7B12:C480 (talkcontribs)

Those are MediaWiki deprecation warnings, great, so please, fix it. I can't, for because i am user, not developer. Example:

PHP Deprecated:  Use of Parser::$mShowToc was deprecated in MediaWiki 1.35. [Called from efMWNoTOC in /var/www/prod/mediawiki/extensions/NoTOC/NoTOC.php at line 42] in /var/www/prod/mediawiki/includes/debug/MWDebug.php on line 381
PHP Deprecated:  Use of InternalParseBeforeSanitize hook (used in VariablesHooks::onInternalParseBeforeSanitize) was deprecated in MediaWiki 1.35. [Called from MediaWiki\HookContainer\HookContainer::run in /var/www/prod/mediawiki/includes/HookContainer/HookContainer.php at line 137] in /var/www/prod/mediawiki/includes/debug/MWDebug.php on line 381
PHP Deprecated:  Setting $wgAllowImageTag to true is deprecated since MediaWiki 1.35 in /var/www/prod/mediawiki/includes/debug/MWDebug.php on line 381

This happens when importing a page. As far as i can read it, it is from MWDebug, but i don't do any debugging. Remember, $wgShowDebug=false

So again my question, if i dont want debug messages why does MW log debug messages? It worked in 1.35 without logging and now in 1.39 someone has changed it. This is insane.

Malyacko (talkcontribs)

Regarding the first warning: The "NoTOC" extension (which is not part of default MediaWiki so you likely installed it at some point) is unmaintained software so I'd recommend uninstall it if you don't plan to fix its code locally. Sorry, no idea about the rest. (PS: See also Inclusive language about the last word in the previous comment - thanks.)

Reply to "php deprecation warnings"
141.88.235.198 (talkcontribs)

Dear Community,

I hope this message finds you well. I am facing a challenge in setting up LDAP login in my MediaWiki version 1.41 and am in need of urgent assistance.

Specifically, I am looking for someone experienced in configuring and setting up LDAP login in MediaWiki. I would greatly appreciate any help or guidance you can provide.

Your assistance would be greatly appreciated. Please do not hesitate to reach out if you have the necessary expertise or know someone who might be able to assist me.

Thank you in advance!

Osnard (talkcontribs)

Have you checked out documentation at LDAP hub? If you get stuck, I can probably support you.

141.88.235.198 (talkcontribs)

Dear Support Team,

I hope this message reaches you safely. I would like to inform you that I have looked at the instructions in LDAP HUB. Therefore, I would like to use the following configuration to manage LDAP authentication and authorization:

Extension: LDAPProvider

Extension: LDAPAuthorization

I use the configuration in LocalSettings.php.

$LDAPProviderDomainConfigProvider = function() {

    $config = [

        "akg.lan" => [

            "connection" => [

                "server" => "ldap://akg-dc-01",

                "user" => "CN=Administrator,CN=Users,DC=AKG,DC=LAN",

                "pass" => "testtestt",

                "basedn" => "DC=AKG,DC=LAN",

                "groupbasedn" => "DC=AKG,DC=LAN",

                "userbasedn" => "DC=AKG,DC=LAN",

                "searchattribute" => "samaccountname",

                "searchstring" => "Administrator@akg.lan", // Replace USER-NAME with actual username

                "usernameattribute" => "samaccountname",

                "realnameattribute" => "cn",

                "emailattribute" => "mail",

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

            ],

            "authorization" => [

                "rules" => [

                    "groups" => [

                        "required" => [ "CN=Mediawiki,OU=Groups,DC=AKG,DC=LAN" ] // Adjust group DN as needed

                    ]

                ]

            ],

            "groupsync" => [

                "mechanism" => "mappedgroups",

                "mapping" => [

                    "sysop" => "CN=Projektmanagement,OU=Groups,DC=AKG,DC=LAN", // Map sysop and bureaucrat groups

                    "bureaucrat" => "CN=Mediawiki,OU=Groups,DC=AKG,DC=LAN"

                ]

            ],

            "userinfo" => [

                "email" => "mail",

                "realname" => "cn",

                // Add additional user info mappings as needed

            ]

        ]

    ];

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

};

Then i run this comands:

php maintenance/update.php --quick

php maintenance/rebuildLocalisationCache.php


Then when i Try to login on mediawiki i see this:

"The credentials provided could not be verified."


Could you please provide guidance or assistance regarding the setup of LDAPProvider and LDAPAuthorization for this purpose? Any documentation or step-by-step instructions you can share would be greatly appreciated.

Thank you in advance for your prompt attention to this matter. I look forward to your response.

Best regards,

Reply to "LDAP Login"

Mobile version doesn't update

2
ConstanceSL (talkcontribs)

Hi all,

I made a wiki with Miraheze for an event I'm organising. I was doing the last updates last night, when I saw that the mobile version wouldn't update anymore. I've tried to clear the cache, it doesn't help. So this morning I went to check the logs and hid all the small changes to the settings I had done. It just made things worst, as now the titles don't expend anymore and the whole wiki is basically useless on mobile. The weird thing is that from some pages, it displays the changes I made to the side bar since, and if I click on links to pages I had not made yesterday, it sometimes bring me to the page I made this morning, and sometimes it doesn't.

I've tried to just disable the mobile front end, as it works well on my phone when I request the desktop version. But it didn't work, it still shows me the broken mobile version by default.

I'm new to media wiki, and I have no idea how most of this works. But I'm pretty desperate. I've spent weeks preparing the wiki and was suppose to release it today to the participants. Any idea how to fix this?


Thanks!

Bawolff (talkcontribs)

Possibly this is a bug on the miraheze side where mobile is not recieving CDN purges. Please ask at miraheze support.

Reply to "Mobile version doesn't update"

I just installed MediaWiki 1.42, and I get fatal error connecting to DB

3
Sir Berzerk (talkcontribs)

Original exception: [ac5e92b0d2f6ecce1f33f1a8] /index.php Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'wiki_user'@'192.168.0.5' (using password: YES) (192.168.0.20)

It says the user is denied, but I used the same user that I installed with, and the installer had no trouble installing the tables.

Can someone explain why it can't connect to the DB? DB is remote, in the same network.

Sir Berzerk (talkcontribs)

I'm using mariadb also.

Sir Berzerk (talkcontribs)

Found out the cause, I needed to restart my php-fpm.