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".

How do I change the colour?

2
MWQs (talkcontribs)

Can I make just slight modifications to the existing skins? I like the layout and functionality of vector (or whichever one it is that matches most Wikipedias?) but I want to give it some themed colours to suit our own

wikiCan I locate the file for that skin (where?) and just change a few he codes? Or is it more complicated than that?

Ciencia Al Poder (talkcontribs)

Do not touch installation files for this. That would complicate your upgrades.

Instead, generate override stylesheets on the wiki, as described in Manual:Interface/Stylesheets. You would create MediaWiki:vector.css or MediaWiki:vector-2022.css (depending on your vector skin) with the styles to override, usually just colors. You'd have to copy the entire selector to override and modify the colors as you wish, removing other rules that you don't want to modify.

Note that changes may not be applied immediately due to caching. You better try it yourself live on the page by using the browser's development tools, or in your personal stylesheet and using the preview button.

Reply to "How do I change the colour?"

I forgot my password

2
AEroles (talkcontribs)

I forgot my password for an Internal wiki however I still have access to the LocalSettings.php and the database. I am the main admin for the site. What can I do to either retrieve my password or create a new account?

Osnard (talkcontribs)
Reply to "I forgot my password"

Problems with updating Mediawiki LDAP

8
MSchmitt0815 (talkcontribs)

I am trying updating LDAP. Having difficulty understanding what belongs where and how... following the Description as good as i can.

Please Help.

When i run the maintenance/update.php script it says to me Found invalid JSON in file: /var/www/html/ldap.json

At the end of the Script it prints:

BadMethodCallException from line 506 of /var/www/html/mediawiki/includes/session/SessionProvider.php: MediaWiki\Session\SessionProvider::preventSessionsForUser must be implemented when canChangeUser() is false

#0 /var/www/html/mediawiki/includes/session/SessionManager.php(453): MediaWiki\Session\SessionProvider->preventSessionsForUser()

#1 /var/www/html/mediawiki/includes/user/User.php(886): MediaWiki\Session\SessionManager->preventSessionsForUser()

#2 /var/www/html/mediawiki/extensions/AbuseFilter/includes/FilterUser.php(57): MediaWiki\User\User::newSystemUser()

#3 /var/www/html/mediawiki/extensions/AbuseFilter/includes/FilterUser.php(48): MediaWiki\Extension\AbuseFilter\FilterUser->getUser()

#4 /var/www/html/mediawiki/extensions/AbuseFilter/maintenance/NormalizeThrottleParameters.php(151): MediaWiki\Extension\AbuseFilter\FilterUser->getUserIdentity()

#5 /var/www/html/mediawiki/extensions/AbuseFilter/maintenance/NormalizeThrottleParameters.php(484): MediaWiki\Extension\AbuseFilter\Maintenance\NormalizeThrottleParameters->normalizeParameters()

#6 /var/www/html/mediawiki/maintenance/includes/LoggedUpdateMaintenance.php(49): MediaWiki\Extension\AbuseFilter\Maintenance\NormalizeThrottleParameters->doDBUpdates()

#7 /var/www/html/mediawiki/maintenance/update.php(197): LoggedUpdateMaintenance->execute()

#8 /var/www/html/mediawiki/maintenance/includes/MaintenanceRunner.php(703): UpdateMediaWiki->execute()

#9 /var/www/html/mediawiki/maintenance/doMaintenance.php(100): MediaWiki\Maintenance\MaintenanceRunner->run()

#10 /var/www/html/mediawiki/maintenance/update.php(298): require_once('/var/www/html/m...')

#11 {main}

PHP Notice:  Uncommitted DB writes (transaction from MediaWiki\Extension\AbuseFilter\Maintenance\NormalizeThrottleParameters::doDBUpdates) in /var/www/html/mediawiki/includes/libs/rdbms/database/TransactionManager.php on line 586

PHP Notice:  DB transaction writes or callbacks still pending (MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::providerChangeAuthenticationData, MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::providerChangeAuthenticationData, MediaWiki\User\User::saveSettings, MediaWiki\User\User::saveSettings, MediaWiki\User\User::clearSharedCache) in /var/www/html/mediawiki/includes/libs/rdbms/database/Database.php on line 3344


My ldap.json:

1 {

"internet.adress": {

¦ "connection": {

¦ ¦ "server": "First-Domain-Controller",

¦ ¦ "port": "389",

¦ ¦ "user": "CN=firstUser,OU=Device-User,OU=Benutzer,Some=SomeUser,One=OneUser",

¦ ¦ "pass": "SomeChars",

¦ ¦ "enctype": "clear",

¦ ¦ "options": {

¦ ¦ ¦ "LDAP_OPT_DEREF": 1

¦ ¦ },

¦ ¦ "basedn": "Some=SomeUser, One=OneUser",

¦ ¦ "userbasedn": "OU=Benutzer,Some=SomeUser,One=OneUser",

¦ ¦ "groupbasedn": "OU=SafetyGroups,Some=SomeUser,One=OneUser",

¦ ¦ "searchattribute": "samaccountname",

¦ ¦ "usernameattribute": "samaccountname",

¦ ¦ "realnameattribute": "cn",

¦ ¦ "emailattribute": "mail",

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

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

¦ ¦ "SyncMechanismRegistry": {

¦ ¦ ¦ ¦ "mappedgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\MappedGroups::factory",

¦ ¦ ¦ ¦ ¦ "allgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\AllGroups::factory"

¦ ¦ }

¦ },

¦ "userinfo": [],

¦ "authorization": []

}

}

For more Information just ask.

Greetings

Malyacko (talkcontribs)

Which exact MediaWiki version? Which exact version of which exact extension related to LDAP?

MSchmitt0815 (talkcontribs)

MediaWiki Version: 1.41

The Extension would be LDAPAuthentication2 Version: 1.39 and LDAPProvider Version: 1.39

MSchmitt0815 (talkcontribs)

Thanks for the fast reply!!!

Osnard (talkcontribs)

The error message Found invalid JSON in file: /var/www/html/ldap.json indicates a syntax error in the file /var/www/html/ldap.json. Try using a tool like jsonlint or use a code editor with syntax-checker like VSCode to compose the file.

I did this with the snippet you provided above:

{
    "internet.adress": {
        "connection": {
            "server": "First-Domain-Controller",
            "port": "389",
            "user": "CN=firstUser,OU=Device-User,OU=Benutzer,Some=SomeUser,One=OneUser",
            "pass": "SomeChars",
            "enctype": "clear",
            "options": {
                "LDAP_OPT_DEREF": 1
            },
            "basedn": "Some=SomeUser, One=OneUser",
            "userbasedn": "OU=Benutzer,Some=SomeUser,One=OneUser",
            "groupbasedn": "OU=SafetyGroups,Some=SomeUser,One=OneUser",
            "searchattribute": "samaccountname",
            "usernameattribute": "samaccountname",
            "realnameattribute": "cn",
            "emailattribute": "mail",
            "grouprequest": "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",
            "presearchusernamemodifiers": [
                "spacestounderscores",
                "lowercase"
            ],
            "SyncMechanismRegistry": {
                "mappedgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\MappedGroups::factory",
                "allgroups": "MediaWiki\\Extension\\LDAPGroups\\SyncMechanism\\AllGroups::factory"
            }
        },
        "userinfo": [],
        "authorization": []
    }
}

Be aware that SyncMechanismRegistry is not a valid key in this config. It is a global variable configuration $LDAPGroupsSyncMechanismRegistry and I don't think you need to set it at all.

MSchmitt0815 (talkcontribs)

Good Morning,

i copied your snippet and fitted it for my need in extension to that i use jsonlint. And my Json file seems correct. I tried some more config variations and nothing seems to work.


Do you got another hint or direction which i can try/go?


Greetings and big Thanks

MSchmitt0815 (talkcontribs)

Ps: Do you need additional information?

Osnard (talkcontribs)

Does it still tell you Found invalid JSON in file:...? If so, check if the webserver user can read the file.

Reply to "Problems with updating Mediawiki LDAP"

why do the kombumerri people still live in the gold coast.

1
203.100.2.130 (talkcontribs)

this inquiry question is for schoolies and some inquiry questions are similar to this, so the quotation of this question is Aboriginal according to the Wikipedia funds of the Australian government. 

Reply to "why do the kombumerri people still live in the gold coast."

Doesn't recognize my original or new name, new e-mail address, and passwords

1
KramdenII (talkcontribs)

I keep trying to sign into Closing Logos. When I enter my e-mail address (which has changed from the previous one) and request a new password, I receive no e-mail. Then I try to establish a new account name and use the temporary password to create a new password, but it keeps coming in as "not identified."

What's the problem? Has Closing Logos kept me from signing back in again? I don't recall making any bad comments; if I disagree with something I just overlook it.

Please tell me what I can do about this. Thanks.

Reply to "Doesn't recognize my original or new name, new e-mail address, and passwords"

Media Wiki Installing error

10
Nexovia (talkcontribs)

I am facing this problem and I have tried opening php.ini file and deleting ; this from extension I am using Xampp local host for all process can somone help to get out fro this.

MediaWiki 1.41 internal error

Installing some PHP extensions is required.

Required components

You are missing a required extension to PHP that MediaWiki requires to run. Please install:

Malyacko (talkcontribs)

You need to install the PHP intl extension. I am not sure how to rephrase the error message to make it clearer, please elaborate what is unclear.

Nexovia (talkcontribs)

The problem as I has mentioned is the exact problem it says for installation of php so how could I do it.

Bawolff (talkcontribs)

What happened when you deleted the ; ?

Did you restart xampp? You have to restart for changes to take effect

Nexovia (talkcontribs)

I have restarted xamppp but it's not working.

Malyacko (talkcontribs)

It is still not clear to me: Did you successfully install the PHP intl extension?

Nexovia (talkcontribs)

I am confused in actually how to install it I have't installed it yet.

Malyacko (talkcontribs)

That depends on your operating system. Please refer to PHP documentation as this question is not related to MediaWiki itself but to PHP (which MediaWiki uses).

Nexovia (talkcontribs)

From where can I get help of this topic at all.

Malyacko (talkcontribs)

In a PHP support forum. Or maybe from your hosting provider if you have one.

Reply to "Media Wiki Installing error"
2003:C2:3F21:FD00:29DF:84AE:2326:3100 (talkcontribs)
Reply to "Importing gadgets"

Double URLs on certain links, other URL issues

1
Summary by MisterGoon

Silly me, I realised that the server needed to include the http:// at the start, and not simply be www.domain.com

MisterGoon (talkcontribs)

Hello, I have just installed MediaWiki following the "Running MediaWiki on ArchLinux" guide.

I am currently getting an issue where certain actions forward the user to an incorrect URL. Namely, if editing a page and hitting "save" the user gets redirected to MYDOMAIN/mediawiki/MYDOMAIN/mediawiki/index.php/Main_Page

This is happening with other links within MediaWiki as well, where they redirect to a URL where the domain appears twice.

I have not attempted to make short links, my wgScriptPath is set to "/mediawiki" and my wgServer is set to (domain redacted) "mydomain.com".

I've been trying to read documentation but nothing I've tried has been able to fix the issue, I'm hoping I've just missed something simple.


Any help is greatly appreciated!

MWException from line 724 of WikiImporter.php: Expected <mediawiki> tag, got mysqldump

6
Realaaa (talkcontribs)

hi guys!

I was sure I'd find something quickly on this, but getting stuck it seems - and cannot find exactly the same error which is weird

basically trying to restore my old wiki XML dump on newer wiki, which is running on Synology

  • MediaWiki 1.39.2
  • PHP 8.0.28 (fpm-fcgi)
  • MariaDB 10.11.2-MariaDB
  • ICU 64.2


the file is quite big and has multiple languages in it (mostly english, but also Russian and Japanese etc).

what else can I try? I am hoping that I can import it like this (without having to restore older files & try to match MySQL version for mysqldump which I also have etc etc).

appreciate any tips !

user@Syn:/var/services/web_packages/mediawiki/maintenance$ php74 importDump.php --conf ../LocalSettings.php < /volume1/Syn/User/mediawiki_backups/wikidb_20140913.xml

MWException from line 724 of /volume1/web_packages/mediawiki/includes/import/WikiImporter.php: Expected <mediawiki> tag, got mysqldump

#0 /volume1/web_packages/mediawiki/maintenance/importDump.php(364): WikiImporter->doImport()

#1 /volume1/web_packages/mediawiki/maintenance/importDump.php(305): BackupReader->importFromHandle(Resource id #760)

#2 /volume1/web_packages/mediawiki/maintenance/importDump.php(139): BackupReader->importFromStdin()

#3 /volume1/web_packages/mediawiki/maintenance/includes/MaintenanceRunner.php(309): BackupReader->execute()

#4 /volume1/web_packages/mediawiki/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()

#5 /volume1/web_packages/mediawiki/maintenance/importDump.php(369): require_once('/volume1/web_pa...')

#6 {main}

Realaaa (talkcontribs)

just for reference beginning of this XML file is


<?xml version="1.0"?>

<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<database name="wikidb">

<table_structure name="mw_archive">

<field Field="ar_id" Type="int(10) unsigned" Null="NO" Key="PRI" Extra="auto_increment" Comment="" />

<field Field="ar_namespace" Type="int(11)" Null="NO" Key="MUL" Default="0" Extra="" Comment="" />

<field Field="ar_title" Type="varbinary(255)" Null="NO" Key="" Default="" Extra="" Comment="" />

<field Field="ar_text" Type="mediumblob" Null="NO" Key="" Extra="" Comment="" />

<field Field="ar_comment" Type="tinyblob" Null="NO" Key="" Extra="" Comment="" />

<field Field="ar_user" Type="int(10) unsigned" Null="NO" Key="" Default="0" Extra="" Comment="" />

<field Field="ar_user_text" Type="varbinary(255)" Null="NO" Key="MUL" Extra="" Comment="" />

<field Field="ar_timestamp" Type="binary(14)" Null="NO" Key="" Default="" Extra="" Comment="" />

<field Field="ar_minor_edit" Type="tinyint(4)" Null="NO" Key="" Default="0" Extra="" Comment="" />

<field Field="ar_flags" Type="tinyblob" Null="NO" Key="" Extra="" Comment="" />

<field Field="ar_rev_id" Type="int(10) unsigned" Null="YES" Key="MUL" Extra="" Comment="" />

<field Field="ar_text_id" Type="int(10) unsigned" Null="YES" Key="" Extra="" Comment="" />

<field Field="ar_deleted" Type="tinyint(3) unsigned" Null="NO" Key="" Default="0" Extra="" Comment="" />

<field Field="ar_len" Type="int(10) unsigned" Null="YES" Key="" Extra="" Comment="" />

<field Field="ar_page_id" Type="int(10) unsigned" Null="YES" Key="" Extra="" Comment="" />

<field Field="ar_parent_id" Type="int(10) unsigned" Null="YES" Key="" Extra="" Comment="" />

<field Field="ar_sha1" Type="varbinary(32)" Null="NO" Key="" Default="" Extra="" Comment="" />

<field Field="ar_content_format" Type="varbinary(64)" Null="YES" Key="" Extra="" Comment="" />

<field Field="ar_content_model" Type="varbinary(32)" Null="YES" Key="" Extra="" Comment="" />

<key Table="mw_archive" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="ar_id" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_archive" Non_unique="1" Key_name="name_title_timestamp" Seq_in_index="1" Column_name="ar_namespace" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_archive" Non_unique="1" Key_name="name_title_timestamp" Seq_in_index="2" Column_name="ar_title" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_archive" Non_unique="1" Key_name="name_title_timestamp" Seq_in_index="3" Column_name="ar_timestamp" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_archive" Non_unique="1" Key_name="usertext_timestamp" Seq_in_index="1" Column_name="ar_user_text" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_archive" Non_unique="1" Key_name="usertext_timestamp" Seq_in_index="2" Column_name="ar_timestamp" Collation="A" Cardinality="0" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_archive" Non_unique="1" Key_name="ar_revid" Seq_in_index="1" Column_name="ar_rev_id" Collation="A" Cardinality="0" Null="YES" Index_type="BTREE" Comment="" Index_comment="" />

<options Name="mw_archive" Engine="InnoDB" Version="10" Row_format="Compact" Rows="0" Avg_row_length="0" Data_length="16384" Max_data_length="0" Index_length="49152" Data_free="5242880" Auto_increment="1" Create_time="2014-09-13 02:23:19" Collation="binary" Create_options="" Comment="" />

</table_structure>

<table_data name="mw_archive">

</table_data>

<table_structure name="mw_category">

<field Field="cat_id" Type="int(10) unsigned" Null="NO" Key="PRI" Extra="auto_increment" Comment="" />

<field Field="cat_title" Type="varbinary(255)" Null="NO" Key="UNI" Extra="" Comment="" />

<field Field="cat_pages" Type="int(11)" Null="NO" Key="MUL" Default="0" Extra="" Comment="" />

<field Field="cat_subcats" Type="int(11)" Null="NO" Key="" Default="0" Extra="" Comment="" />

<field Field="cat_files" Type="int(11)" Null="NO" Key="" Default="0" Extra="" Comment="" />

<key Table="mw_category" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="cat_id" Collation="A" Cardinality="40" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_category" Non_unique="0" Key_name="cat_title" Seq_in_index="1" Column_name="cat_title" Collation="A" Cardinality="40" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<key Table="mw_category" Non_unique="1" Key_name="cat_pages" Seq_in_index="1" Column_name="cat_pages" Collation="A" Cardinality="40" Null="" Index_type="BTREE" Comment="" Index_comment="" />

<options Name="mw_category" Engine="InnoDB" Version="10" Row_format="Compact" Rows="40" Avg_row_length="409" Data_length="16384" Max_data_length="0" Index_length="32768" Data_free="5242880" Auto_increment="41" Create_time="2014-09-13 02:23:19" Collation="binary" Create_options="" Comment="" />

</table_structure>

<table_data name="mw_category">

<row>

<field name="cat_id">1</field>

<field name="cat_title">Debian</field>

<field name="cat_pages">18</field>

<field name="cat_subcats">0</field>

<field name="cat_files">0</field>

Ciencia Al Poder (talkcontribs)

importDump.php only accepts XML dumps generated from Special:Export or Manual:dumpBackup.php

Your XML dump seems to be a *database* dump, which is more low-level than MediaWiki's dumps. You should import it directly to the mysql/mariadb database, not with MediaWiki.

Realaaa (talkcontribs)

thanks @Ciencia Al Poder !

I just checked what script I used, it seems like it was dumpBackup.php indeed

I do have a second set of pure .sql files as well, those are indeed created by mysqldump (and those I am trying not to use due to old version)


php /usr/share/mediawiki/maintenance/dumpBackup.php --full --output=bzip2:wikixml-$(date '+%Y%m%d').tar.bz2

Ciencia Al Poder (talkcontribs)
Realaaa (talkcontribs)

@Ciencia Al Poder thanks ! indeed yes, I get that the format is wrong

however I am pretty sure that this was the command which generated the file (unless I'm mixing something up)

my only guess now is that it is some very ancient version - I think that MediaWiki version was 1.18.1 or something like that

I'll have to do via a MySQL restoration indeed, cheers

Reply to "MWException from line 724 of WikiImporter.php: Expected <mediawiki> tag, got mysqldump"

MediaWiki Mobile Access

1
Nexovia (talkcontribs)

I have recently installed MediaWiki and tried accessing it to my android mobile so how can I access that wiki and open it on my mobile?

Reply to "MediaWiki Mobile Access"