Project:Support desk

Jump to navigation Jump to search

About this board

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

There are also other places where to ask :

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
Previous page history was archived for backup purposes at Project:Support_desk/old on 2015-07-30.
Other languages: English  العربية čeština Esperanto français 日本語 中文
Adpete (talkcontribs)

Is there any way to force a number to display a fixed number of decimal points, as in the "%.1f" formatter in C, Python etc. (or "%.2f" for 2 decimal places, and so on)? So I have a table where I want every number to display to 1 decimal point of precision, but e.g. {{#expr:701/100 round 1}} displays as 7, but what I want is 7.0. More detail at

Bawolff (talkcontribs)

if using lua there is string.format() which is a lot like c's printf

Adpete (talkcontribs)

So it seems I have to either write a Lua module, or use something like LuaCall? Anyway, the best I could come up with was {{#invoke:LuaCall|main|p=%.1f|a={{#expr:701/100}}|string.format(p,a)}}, which works on Wikipedia (see my Sandbox at ) but not here. I feel that is way more complicated than it needs to be... any better suggestions are welcome.

Reply to "Rounding in "expr" function"

Problems with composer in a new (clean) install of MW 1.34 (or 1.33)

Mgreis (talkcontribs)

I'm looking for some help with Composer on a new (clean) install of Mediawiki and SMW.

As background, I've been using SMW for 5+ years. Like many - I suspect - my use of Composer is pretty much limited to what's needed to install and maintain SMW. My installation is at MW 1.28 and SMW 3.0.1. There was a pretty significant problem with MW 1.30+, PHP 7 and Sphinx Search, so I haven't been able to consider upgrading in some time. At this point, the challenges of going from MW 1.28 -> 1.34 and PHP 5.6 to PHP 7.2 have made upgrading my current wiki a dubious proposition.

Instead, I am creating a new MW 1.34 wiki on a new server, installing my extensions and planning to export my pages from the current wiki and import them into the new wiki. That's the plan, anyway....

When I install MW 1.34 (on a cPanel-based server, so cPanel does the installation), there is no composer.json file in the root directory of the wiki. I can't put SMW in a composer.local.json file and have it recognized.

I can create a minimal composer.json with one or two extensions. However, when the update script is later run and I'm prompted to run composer to create a lock file, a whole bunch of libraries required by MW are removed. It took me the better part of a day to realize what was happening (since the first symptom was a HTTP 500 error). My research uncovered some of the syntax required in composer.json to look for the composer.local.json file and to look for other composer.json files in the MW directory structure, but it's not clear what I need to have in composer.json to ensure that everything MW needs to run is accounted for along with SMW.

I looked back at my current MW 1.28 implementation, and the composer.json file has a lot of statements that were clearly provided by MW, along with my additions for SMW. Somewhere between my first implementation and this, that seems to have changed.

I've been trying to forensically recreate a composer.json that would at least not blow away my MW but that is proving difficult and doesn't make a lot of sense to me.  Why should I re-create a file that MW absolutely must have to operate once composer is used? I may be missing something, but I'm at a loss to understand what.

Any help would be appreciated!

Bawolff (talkcontribs)

honestly,my main advice would be to not use cpanel to install mediawiki but use the official tarball.

Mgreis (talkcontribs)

That's the next step I'm trying.

But can you or anyone tell me, am I correct that there should be a composer.json in the base directory after I've unzipped and installed it? That's the rub. If I can use composer to install SMW and my other extensions without destroying the installation, I should be good to go.

And if not, how do I get/create a composer.json to install extensions without wrecking the installation?

Thanks, @Bawolff

Bawolff (talkcontribs)

afaik the tarball should have a composer.json. mw core dependencies are preinstalled but its there just in case. I think. I havent looked at the tarball recently.

The whole installing extensions via composer isnt really officially reccomended but the smw people seem very insistent on it :S

Mgreis (talkcontribs)

Oh, dear. I don't want to get into the middle of one of those conversations. To your first point, the core dependencies are pre-installed. The problem is that the creation of a minimal composer.json file for one or more of these extensions is eventually followed by having to run either a composer update or a maintenance/update.php script. That results in the removal of those pre-installed, required libraries because they are not referenced in the minimal composer.json. Removing the libraries results in a non-functional wiki and a reinstall.

That, in a nutshell, is my problem. I'm having this conversation in parallel now on the semediawiki-user mailing and hoping that one of these sources helps me find a way out of this mess.

Bawolff (talkcontribs)

whats the library that is missing after composer update? The included composer.json should list all the dependencies needed to run mediawiki

Reply to "Problems with composer in a new (clean) install of MW 1.34 (or 1.33)"
RyanKunk (talkcontribs)

i have been having a few issues lately. My first is that my page formatting is coming up plain text

the site is

MediaWiki 1.25.1
PHP 7.3.13 (cgi-fcgi)
MySQL 5.5.62-log

any help is appreciated

This post was hidden by (history) (talkcontribs)
Malyacko (talkcontribs)
Bawolff (talkcontribs)

check your php error log for "headers already sent" error.

Reply to "formatting help"
2610S (talkcontribs)
  1. wfLoadExtension( 'PdfHandler' ); gives me an error while uploading PDF file.
  2. wfLoadExtension( 'LastUserLogin' ); gives me an error to change or confirm email address.
Ammarpad (talkcontribs)

What's the error? You have to give enough information about the kind of error you saw, otherwise no one can give you informed response.

2610S (talkcontribs)


  1. PdfHandler = Unable to run external programs, proc_open() is disabled
  2. LastUserLogin = CAS update failed on user_touched. The version of the user to be saved is older than the current version

When I delete them from LocalSetting I do not have these error

Bawolff (talkcontribs)

for the first one - seems pretty self explanatory. Fix your php.ini if you want to use pdfhandler.

For the second one, not sure, i would guess maybe that extension only works on older mediawiki.

Reply to "2 Wiki errors"
2601:58C:4080:CD50:BC2E:340C:757C:8655 (talkcontribs)

I received a "receipt" from my wiki donations for 2019. I don't remember donating a fixed amount each month. I normally give a set amount once a year - which I did in 2019.

How can I cancel an automatic monthly donation?

I cannot log into wikipedia. My normal user name is in use, but none of my standard passwords work. I also cannot reset the password, for whatever reason.

Bawolff (talkcontribs)

hi. This forum is only for mediawiki support. We cant help you with donation related queries (or any sort of question that needs to be answered officially). Plesse contact instead.

Reply to "donations"
Bonu (talkcontribs)

I entered a lot of additional information to the page of past-Swiss-counsellor [[Dumeni Columberg]] .

When - after a couple of hours of editing - I wanted to publish the changes, the system refused and asked me to contact an administrator.

I then checked the source code and took out Link-Text<! becuase I do not understand what it does. Thereupon I was able to publish and everything looks fine.

Did I corrupt something?

Ammarpad (talkcontribs)

The edit was blocked by Abuse filter. You probably inserted the markup by unintentionally clicking somewhere on the editor toolbar, as that's what the filter seems to prevent. There's nothing to worry about.

Bonu (talkcontribs)

Great - thanks for the fast reply - have fun

Reply to "Link-Text<! item"
Gil Borlin (talkcontribs)


I don't know what is causing this but I can't login to my wiki anymore. Sort of.

After I type in my username and password and after I hit login button, website takes me back to Main Page without remembering my login. When I go back to Login page there is a + sign between my first and last name (instead of space) in the username field, for example Gil+Borlin.

I also noticed that this login error only persists with usernames which have multiple words (spaces inside username). Users with usernames without spaces (single word usernames) can login successfully.

Any ideas what might be causing this?



Ammarpad (talkcontribs)

This issue is tracked at phab:T243667. There's a workaround in the phab task which you can use pending resolution of the issue.

Ammarpad (talkcontribs)

Also this intermittent time-out error phab:T243713 caused me to post reply 5 times here.

Gil Borlin (talkcontribs)

Yes, I've noticed that. But I think everything is working fine now.

Gil Borlin (talkcontribs)

Thank you for helping me out.

Reply to "Can't login to my wiki"
Rexcall (talkcontribs)

I’m looking for a page that is no longer available. Can you help please?

Bawolff (talkcontribs)

not unless you tell us more details about the situation (like what page)

Rexcall (talkcontribs)

Ok, so I’m trying to get some information on Michael Rodden the bass player from the band “Hinder”. There use to be a page on him but it’s no longer available. How can that page be retrieved?

Leaderboard (talkcontribs)

I suspect you're referring to Wikipedia? Unfortunately this is not the page to ask questions regarding it. See Project:About.

Rexcall (talkcontribs)

Thank you

Reply to "Help"

Problem entering Database Information while installing MediaWiki

Xalomoph (talkcontribs)


when i try to install MediaWiki on my server i do have a weird problem. I run through the installation and then enter my database information which is definitely correct. When i click to proceed i get an error saying:

Cannot access the database: :real_connect(): (HY000/1045): Access denied for user 'testuser@'' (using password: YES).

I see in this line that the installer tried to connect to which i did not enter into the "Databaseserver" field. I entered the ip into the field. The IP is the IP of the server itself. Somehow the installation process is ignoring my userinput and taking the current server IP.

Can anyone tell my why this is? The Setup just wont take my Databaseserver IP when i input it and instead always falls back to the actual server ip where the wiki itself is stored.

P.S.: The IP-Adresses and other data used is just an example because i do not want to give away my real serverdata of course.

Thank you very much in advance!

Bawolff (talkcontribs)

you are misreading the error message.

In mysql access is controlled by both username and what server the user is connected from. The error is saying that testuser connecting from is not authorized.

Xalomoph (talkcontribs)

Thank you so much, you are right. I will keep on searching the error then and update this post as soon as i have the solution Thank you, that helped a lot.

Reply to "Problem entering Database Information while installing MediaWiki"

There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form. - again, but on a local host

Keyacom (talkcontribs)

Hello, I have installed MediaWiki on a local host, but this message appeared while logging in to the MediaWiki account: "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form." I'm using XAMPP to launch the local host.

Bawolff (talkcontribs)

try setting $wgSessionCacheType = CACHE_DB;

This issue usually means something is wrong with cache config (e.g. apcu). It will likely also make your wiki be slow.

Check also you have cookies enabled

Keyacom (talkcontribs)

But then, I got the following (in Polish):

[acc7e29f297d1335de199a15] 2020-01-26 08:07:31: Krytyczny wyjątek typu „InvalidArgumentException”

I refreshed the page and got:

[894563b0ab7719a1d0e77f99] 2020-01-26 08:07:57: Krytyczny wyjątek typu „InvalidArgumentException”

I copied the coding and placed in LocalSettings.php, with quote marks around "CACHE_DB". I ended up removing the quote marks. The login works.

Bawolff (talkcontribs)

yes, not having quote marks is important. CACHE_DB is a constant not a string.

Reply to "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form. - again, but on a local host"