Project:Support desk

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(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 versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. 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.
  3. To start a new thread, click "Start a new topic".
BHPphil (talkcontribs)

Now when I try to log into the web and see our wiki (should be at: "bhp.mywikis.wiki/Main_Page "), I get this error.


"[2c54cfe70897692dd7533069] 2022-10-01 00:00:18: Fatal exception of type MWException"

Reply to "Generic"
BHPphil (talkcontribs)

I'm trying to download a table I've created in our wiki. It's not huge -- I could re-type the 20 or so rows, or paste cell contents, but I'd like to capture the current table, and take it offline. Is there a way other than print it and scrape it?

Version details:

Product Version
MediaWiki 1.35.7
PHP 7.4.30 (fpm-fcgi)
MariaDB 10.3.34-MariaDB-0+deb10u1-log
Jonathan3 (talkcontribs)

Do you mean you want the HTML version of a wikitext table?

BHPphil (talkcontribs)

That would be fine. We want to give it to something like Excel or Google Sheets, turn it into a spreadsheet.

Jonathan3 (talkcontribs)
BHPphil (talkcontribs)

OK, that looks promising. I tried to log into our wiki, now getting this. I'll start a new thread. I don't see any answers already logged on this error.


[2c54cfe70897692dd7533069] 2022-10-01 00:00:18: Fatal exception of type MWException

Reply to "download a page?"

WimiMedia Gerrit - Clone Repos -> Not permissions

4
Justman10000 (talkcontribs)

Hi, the error always appears

justman10000@gerrit.wikimedia.org: Permission denied (publickey). fatal: Could not read from remote repository.

Although I did everything the the tutorial says!

Bawolff (talkcontribs)

Most commonly this is caused by git using a different pubkey then the one you submitted to gerrit or if your wikitech shell name is different from your username and you use the wrong

If you do: GIT_SSH_COMMAND="ssh -vvv" git clone ssh://justman1000@gerrit.wikimedia.org:29418/mediawiki/core.git


It will give detailed info, which can help you figure out which key it is using.


If you absolutely cannot figure it out, you can use https instead ( git clone https://justman1000@gerrit.wikimedia.org:29418/mediawiki/core.git). However your password when using git over https is not your normal one but a diffferent one viewable in your gerrit preferences.

Justman10000 (talkcontribs)

Well, I created an SSH key via the Help tab in Git Gui and also registered it with Gerrit...

Malyacko (talkcontribs)

Please always include a full exact command that creates some output. This thread has no steps to reproduce. Thanks.

Reply to "WimiMedia Gerrit - Clone Repos -> Not permissions"
Lovro Asks (talkcontribs)

I installed Bitnami MediaWiki AMI on AWS EC2 and that works great when accessed directly through the IP address.

I then created a CloudFront distribution and added a CNAME entry to my domain to point to it. I also changed `$wgServer='//mydomain.com'` in `LocalSettings.php`.

The problem is that when the wiki is opened, there is no styling, just plain HTML. I tried to debug what's happening, and it's the following:

<link rel="stylesheet" href="/load.php?lang=sr-el&modules=mediawiki.ui.button%2Cicon%7Cskins.vector.icons%2Cstyles&only=styles&skin=vector-2022">

Instead of CSS, it just returns this:

/* This file is the Web entry point for MediaWiki's ResourceLoader: <https://www.mediawiki.org/wiki/ResourceLoader>. In this request, no modules were requested. Max made me put this here. */


So, any call to `https://mydomain.com/load.php?...` with any parameters just returns the comment above.

I don't know why this happens and what to do. Thanks for any hint!

Bawolff (talkcontribs)

That's weird. I would guess something is misconfigured in the cloudfront distribution causing url parameters to be dropped (or colesced). Can you double check your cloudfront settings?

TheDJ (talkcontribs)

Cloudflare has a caching level called "Ignore Query String", which you might have enabled.

Lovro Asks (talkcontribs)

Changing filename prefix blacklist of my own mediawiki installation

4
Herrmanthegerman (talkcontribs)

Hello,

I'm running an older version of mediawiki on my NAS.

I'd like to change the blacklist of forbidden filename prefixes which can be found here:

MediaWiki:Filename-prefix-blacklist

How do I do this? Even as Administrator I can not change this page so I assume the original data is included somewhere in the PHP code ín the installation folder on the server. Could anybody please point me to it?

Thanks.


Background information: filename of uploaded image files is checked against a list of prefixes. When a match is found, a "filename-bad-prefix" message is shown to the uploader and the upload does not continue. In English version of Mediawiki this messags reads as 'The name of the file you are uploading begins with '''\"\$1\"''', which is a non-descriptive name typically assigned automatically by digital cameras. Please choose a more descriptive name for your file.'

Bawolff (talkcontribs)

You should be able to edit that as an admin. Some mediawiki namespace pages also require interface-admin rights but i dont think that's one of them.

Bawolff (talkcontribs)

Check also that on Special:listgrouprights on your wiki that your user is in a group that has editinterface rights

Herrmanthegerman (talkcontribs)

Thanks Bawolff.👍 Strangely enough, I can now edit this page. I don't know why I could not edit this page before.

I checked on "Spezial:Benutzer" that my user is in the Administrator group.

I'm not sure but I think that when I opened "MediaWiki:Filename-prefix-blacklist", there was only a "View Source" link (no "edit" link) and I clicked on it and the page had a "Save" button below the text area. 🤷‍♂️

Reply to "Changing filename prefix blacklist of my own mediawiki installation"
ArrakisMiner (talkcontribs)

I seem to be having a little trouble with my LocalisationCache, and I'm not entirely sure why, and how to solve it. Basically, I keep having to run <code>rebuildLocalisationCache.php</code> several times a day. If I don't, I get an error that certain magic words don't exist, and this prevents me from using certain extensions such as ParserFunctions etc as it basically crashes my wiki, throwing an exception. It also means that whenever I add a new extension, I need to run the script or the messages for the extension aren't registered — I'm not entirely sure what's causing this, but this is what I can see from the error log:

[localisation] LocalisationCache using store LCStoreNull
[localisation] LocalisationCache::isExpired(en): cache missing, need to make one
[localisation] LocalisationCache::recache: got localisation for en from source
[DBConnection] Wikimedia\Rdbms\LoadBalancer::reuseConnection: freed connection 0/centralauth
[session] SessionManager using store SqlBagOStuff
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getAnyOpenConnection: found 'foreignFree' connection to #0.
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::open [0s] localhost: SET group_concat_max_len = 262144, sql_mode = ''
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: opened new connection for local/0
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0s] localhost: SELECT @@GLOBAL.read_only AS Value
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::getServerVersion [0s] localhost: SELECT  VERSION()     LIMIT 1  
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::fieldInfo [0s] localhost: SELECT * FROM `change_tag` LIMIT 1
[DBQuery] DatabaseUpdater::doCollationUpdate [0s] localhost: SELECT  COUNT(*)  FROM `categorylinks`    WHERE cl_collation != 'uppercase'  LIMIT 1  
[DBQuery] DatabaseUpdater::addField [0s] localhost: SHOW TABLES LIKE 'externallinks'

I assume from this error that the cache keeps expiring, or something of the sort? How can I stop this?

Bawolff (talkcontribs)

The line:

> [localisation] LocalisationCache using store LCStoreNull

Sounds suspicious. What are your caching configs in LocalSettings.php?

ArrakisMiner (talkcontribs)

These are the settings I'm using:

	'wgSessionCacheType' => [
		'default' => CACHE_DB,
	],
	'wgMainCacheType' => [
		'default' => CACHE_ACCEL,
	],
        'wgSharedTables' => [
		'default' => ['objectcache'],
	],

$wgLocalisationCacheConf['storeClass'] = LCStoreCDB::class;
$wgLocalisationCacheConf['storeDirectory'] = '/var/www/html/mw/mediawiki/cache/l10n';
if ( !file_exists( '/var/www/html/mw/mediawiki/cache/l10n/l10n_cache-en.cdb' ) ) {
	$wgLocalisationCacheConf['manualRecache'] = false;
}
Bawolff (talkcontribs)

Delete the last 3 lines (i.e. delete the line starting with if and everything after). Although it is confusing because manualRecache being false should be the default. Are you sure you dont have any additional $wgLocalisationCacheConf settings?

Also verify that the cache directory and files in it are writable by the webserver.

Reply to "Issue with LocalisationCache"

MySQL binlog files filling up rapidly (sometimes)

6
2003:C2:3F12:5F00:4991:A98C:6259:6575 (talkcontribs)

Ubuntu 20.04, Apache 2.4, PHP 7.4.3, MySQL 8.0 & MediaWiki 1.35.7


Howdy,

usually the binlogs match (roughly) with the activities shown in the recent changes page. Sometimes within the last days I encountered a mysterious phenomenon; the binlog grows rapidly while there is only few activity in the wiki for some hours.


Example:

-rw-r-----  1 mysql mysql    3697808 Sep 22 01:25 mysql-bin.001100

-rw-r-----  1 mysql mysql  157288660 Sep 22 18:53 mysql-bin.001101

-rw-r-----  1 mysql mysql  157372133 Sep 22 20:50 mysql-bin.001102

-rw-r-----  1 mysql mysql  157311099 Sep 22 21:25 mysql-bin.001103

-rw-r-----  1 mysql mysql  157388609 Sep 22 21:50 mysql-bin.001104

-rw-r-----  1 mysql mysql  157291160 Sep 22 22:07 mysql-bin.001105

-rw-r-----  1 mysql mysql  157367584 Sep 22 22:34 mysql-bin.001106

-rw-r-----  1 mysql mysql  157343097 Sep 22 22:42 mysql-bin.001107

-rw-r-----  1 mysql mysql  157383979 Sep 22 22:50 mysql-bin.001108

-rw-r-----  1 mysql mysql  157354101 Sep 22 22:57 mysql-bin.001109

-rw-r-----  1 mysql mysql  157420107 Sep 22 23:17 mysql-bin.001110

-rw-r-----  1 mysql mysql  157487073 Sep 22 23:37 mysql-bin.001111

-rw-r-----  1 mysql mysql  157536460 Sep 22 23:55 mysql-bin.001112

-rw-r-----  1 mysql mysql  130376490 Sep 23 00:13 mysql-bin.001113

-rw-r-----  1 mysql mysql  157559320 Sep 23 00:35 mysql-bin.001114

-rw-r-----  1 mysql mysql  157322415 Sep 23 01:02 mysql-bin.001115

-rw-r-----  1 mysql mysql   72729153 Sep 23 01:25 mysql-bin.001116


On September 22th, from 0:01 am till 20:50 pm, I count approx. 130 changes. I don't quite understand why this few changes can produce 2 x 150 MB binlogs, but even worse: from 20:50 pm - 23:55 pm there are no more than 31 edits <-> 10 x 150 MB binlogs!?


Does anyone have any ideas WHAT the database is doing here?

Bawolff (talkcontribs)

I would suggest looking in the binlogs and seeing which tables are being modified.

2003:C2:3F14:7B00:C10B:EF0C:21EA:45B1 (talkcontribs)

There are some initializations like


# The proper term is pseudo_replica_mode, but we use this compatibility alias

# to make the statement usable on server versions 8.0.24 and older.

/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;

/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;

DELIMITER /*!*/;

# at 4

#220926 18:39:36 server id 1  end_log_pos 126 CRC32 0x29358cf7  Start: binlog v 4, server v 8.0.30-0ubuntu0.20.04.2 created

220926 18:39:36

BINLOG '

yNUxYw8BAAAAegAAAH4AAAAAAAQAOC4wLjMwLTB1YnVudHUwLjIwLjA0LjIAAAAAAAAAAAAAAAAA

......

/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;

......

SET TIMESTAMP=1664210377/*!*/;

SET @@session.pseudo_thread_id=1176709/*!*/;

...........

BEGIN

/*!*/;

# at 320

#220926 18:39:37 server id 1  end_log_pos 386 CRC32 0xf526a6b3  Table_map: `ppdb`.`objectcache` mapped to number 105

# at 386

#220926 18:39:37 server id 1  end_log_pos 318739 CRC32 0x5d08e762       Update_rows: table id 105 flags: STMT_END_F

BINLOG '

ydUxYxMBAAAAQgAAAIIBAAAAAGkAAAAAAAEABHBwZGIAC29iamVjdGNhY2hlAAMP/BIE/AMDAAYD


after that, there are thousands of lines of unreadable hexcodes. Of course I cannot view the whole file.

Is there a way to exclude the objectcache table from the binary log?

Bawolff (talkcontribs)

It would probably be better to ask mysql specific questions on a mysql forum

2003:C2:3F14:7B00:B0FB:6588:E0D2:9FAB (talkcontribs)

Of course you're completely right. Only I thought you might have an idea why there is so much database activity on the objectcache table while there is nearly no activity within the wiki ...?

Bawolff (talkcontribs)

Could be lots of reasons. Maybe you wiki isn't as inactive as you think it is. At the very least, it would be helpful to know the keyname field of the rows that are being updated.

Reply to "MySQL binlog files filling up rapidly (sometimes)"

Determine caller (page request source) in parser hook

2
176.59.102.209 (talkcontribs)

I need to make different output in my parser hook function (specific tag rendering) for page requested by the user on wiki and requested by external service via MW API. What can I use (on wiki server side of course)?

Bawolff (talkcontribs)

You probably need to call $parser->getOutput()->updateCacheExpiry(0) which disables caching. This is slow, but also means you can use things like RequestContext::getMain()->getRequest() to find out what url is being requested without causing cache pollution.

Reply to "Determine caller (page request source) in parser hook"

Private methods cannot be final as they are never overridden by other classes in C:\xampp\htdocs\wiki\includes\actions\Action.php on line 67

2
195.233.26.87 (talkcontribs)

Private methods cannot be final as they are never overridden by other classes in C:\xampp\htdocs\wiki\includes\actions\Action.php on line 67

Getting above errorr after the Xampp upgrade . Can anyone guide how do we resolve the warning message,

Bawolff (talkcontribs)

Use newer version of mediawiki if using php8 (ideally use 1.38.3 or 1.39.0, but those arent released yet, but even 1.38.2 should fix this particular issue).

The warning can be safely ignored.

Reply to "Private methods cannot be final as they are never overridden by other classes in C:\xampp\htdocs\wiki\includes\actions\Action.php on line 67"

Passwords must be at least 10 characters

10
Vicarage (talkcontribs)

Mediawiki 1.35.0, LocalSettings.php has

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8;

But when I try to change my (administrator account) password, I get the red text 'Passwords must be at least 10 characters', and it won't accept the 8 character password I want

Ammarpad (talkcontribs)

That is the 'default' only as the name suggests. Any more specific policy will override it. You're being asked for 10 because that's the requirement for users in 'sysop' group. You must to change it there too: $wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8;. If you're in interface-admin or bureaucrat groups you must also change it for each group.

Vicarage (talkcontribs)

That occurred to me, though its hardly obvious, as a default I specify should override something set inside code so I added the lines to correspond to Special:ActiveUsers

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8; $wgPasswordPolicy['policies']['administrator']['MinimalPasswordLength'] = 8; $wgPasswordPolicy['policies']['interface administrator']['MinimalPasswordLength'] = 8; $wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 8;

And nothing changed. I even added sysop, in case that was some daft hidden group

Only by editing includes/DefaultSettings.php and changing all the 10s to 8s did I manage to beat it into submission. Grrrr

Bawolff (talkcontribs)

$wgPasswordPolicy['policies'] = [ 'default' => ['MinimalPasswordLength' => 8]];

Alternatively, you can put var_dump( $wgPasswordPolicy); die(); at the very end of LocalSettings.php to figure out the final value and see if its what you expect.

Ammarpad (talkcontribs)

There's no group 'administrator', so that line would not do any anything. The canonical name of the group is 'sysop'. You're not supposed to edit DefaultSettings.php. You better copy the relevant lines to LocalSettings.php

Vicarage (talkcontribs)

Basic information

Username:John: Member of groups:Administrators, Autoconfirmed users, Bureaucrats, Interface administrators, Users

No sign of sysop here

$wgPasswordPolicy['policies'] = [ 'default' => ['MinimalPasswordLength' => 12];

makes my system lock up. I will stick with editing includes/DefaultSettings.php and moaning

TheDJ (talkcontribs)

"No sign of sysop here"

Sysop is the technical name of the administrators group in the software. The 'human' name value of it is "Administrator". This fact is arguably so well hidden in the interface these days, that it is hard to know if you don't know about the old name. A place where you can still see it is in the url of list users: Special:ListUsers/sysop

$wgPasswordPolicy['policies'] = [ 'default' => ['MinimalPasswordLength' => 12];

[] need to be balanced. you are missing a ] at the end there.

Vicarage (talkcontribs)
158.174.93.211 (talkcontribs)

Maybe you solved this by now but if someone else struggle with this like I did today, here's what worked for me (added to LocalSettings.php):

## Change MinimalPasswordLength

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 8;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 8;

$wgPasswordPolicy['policies']['interface-admin']['MinimalPasswordLength'] = 8;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 8;

KHFischbach (talkcontribs)

Hi,

I yesterday installed a local copy of mediawiki and have the same problem as @Vicarage. I have set the the dump as recommended by @Bawolff. Result is:

array(2) {  ["policies"]=>  array(5) {    ["bureaucrat"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(6)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["sysop"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(6)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["interface-admin"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(10)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["bot"]=>    array(2) {      ["MinimalPasswordLength"]=>      int(10)      ["MinimumPasswordLengthToLogin"]=>      int(1)    }    ["default"]=>    array(5) {      ["MinimalPasswordLength"]=>      int(6)      ["PasswordCannotBeSubstringInUsername"]=>      array(2) {        ["value"]=>        bool(true)        ["suggestChangeOnLogin"]=>        bool(true)      }      ["PasswordCannotMatchDefaults"]=>      array(2) {        ["value"]=>        bool(true)        ["suggestChangeOnLogin"]=>        bool(true)      }      ["MaximalPasswordLength"]=>      array(2) {        ["value"]=>        int(4096)        ["suggestChangeOnLogin"]=>        bool(true)      }      ["PasswordNotInCommonList"]=>      array(2) {        ["value"]=>        bool(true)        ["suggestChangeOnLogin"]=>        bool(true)      }    }  }  ["checks"]=>  array(6) {    ["MinimalPasswordLength"]=>    string(48) "PasswordPolicyChecks::checkMinimalPasswordLength"    ["MinimumPasswordLengthToLogin"]=>    string(55) "PasswordPolicyChecks::checkMinimumPasswordLengthToLogin"    ["PasswordCannotBeSubstringInUsername"]=>    string(62) "PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername"    ["PasswordCannotMatchDefaults"]=>    string(54) "PasswordPolicyChecks::checkPasswordCannotMatchDefaults"    ["MaximalPasswordLength"]=>    string(48) "PasswordPolicyChecks::checkMaximalPasswordLength"    ["PasswordNotInCommonList"]=>    string(50) "PasswordPolicyChecks::checkPasswordNotInCommonList"  } }

From my perspective it shows the param is set and accepted.

But still, when trying to change the password for a user (the only user created as admin during setup), i get the message the minimum password length is 10.

$wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['bureaucrat']['MinimalPasswordLength'] = 6;

$wgPasswordPolicy['policies']['sysop']['MinimalPasswordLength'] = 6;

Any idea why this happens?

Regards

Kallewirsch


Upate:

when writing the reply I reconcnized the user created during setup might be of role "interface-admin" (makes sense). I added this to the params and now it works for the user where I tested it.

Reply to "Passwords must be at least 10 characters"