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

How to change the MediaWiki base URL?

3
The.machine.preacher (talkcontribs)

I installed the Bitnami MediaWiki on Google Cloud and registered a new domain name (e.g. http://example.com) then redirected it to my MediaWiki IP.

I then changed $wgServer in LocalSettings.php to reflect my new domain.

The $wgScriptPath variable in LocalSettings.php remained $wgScriptPath = '' as before.

Typing http://example.com in the browser gets me to my MediaWiki site, however the URL still remains an IP address (i.e. http://xx.xxx.xx.xx/wiki/Main_Page).

How do I make it such that the base URL changes to the new domain name (i.e. http://example.com/wiki/Main_Page)?

Bawolff (talkcontribs)

How did you redirect example.com to your mediawiki ip? You need to ensure that you set the A record for the domain to your mediawiki ip. If you used a different method of redirecting the domain it might not work

The.machine.preacher (talkcontribs)

Thank you! That worked!

Reply to "How to change the MediaWiki base URL?"
Summary by Atsme

Figured it out - no longer an issue.

Atsme (talkcontribs)

Example: https://mdwiki.org/wiki/Basal-cell_carcinoma <––in the footer, the word Wikipedia links to the actual Wikipedia article on Basal-cell_carcinoma. How do you write the code to link to the WP article and Meta in the footer?

The position of the table of contents (TOC) has changed after the update to 1.39

2
5.113.89.48 (talkcontribs)

I'm having trouble with the new floating table of contents and would like to go back to the previous version if possible.

Bawolff (talkcontribs)

Do you mean use the vector skin instead of the vector-2022 skin? You can set that in LocalSettings.php

Reply to "The position of the table of contents (TOC) has changed after the update to 1.39"

Reporting wikis that used MediaWiki software

2
SpinnerLaserzthe2nd (talkcontribs)

I had founded a MediaWiki wiki that contains a lot of gravedancing (insulting blocked users) and false medical information.


Is there is anyway I can report a wiki that used MediaWiki software?

Bawolff (talkcontribs)

We have no control over how mediawiki software is used by other people. (Excluding, of course the wikis that we ourselves host like Wikipedia)

You can potentially report it to the hosting provider they are using. You can often find that out by using the whois tool on the domain - https://whois.domaintools.com/ and looking forthe abuse contact. If they own their own domain, first lookup what the ip address is with https://toolbox.googleapps.com/apps/dig/#A/ (selecting A) and then look the ip address up in the whois tool.

Generally hosting providers only care in extreme cases.

If they are doing something illegal you can report them to the police.

Reply to "Reporting wikis that used MediaWiki software"

Issues with pages after moving to new server

3
Alliball (talkcontribs)

I have just moved my mediawiki to a new server. I have imported the db and files.


On the home page the links seem to be going to create a page however if you search the page name the contents is available.


I have ran php update. Some of home page links have content and some dont.


Any help appreciated

Malyacko (talkcontribs)

Hi, please see "Post a new question" in the sidebar and provide config info for the old and new server

Bawolff (talkcontribs)

Try making an edit to LocalSettings.php (doesnt matter what, add a space somewhere).

If that doesnt work, try running refreshLinks.php

Reply to "Issues with pages after moving to new server"

"The file you submitted was too large." / "This file is bigger than the server is configured to allow."

3
Summary by Jonathan3

Just needed to change post_max_size and upload_max_filesize.

Jonathan3 (talkcontribs)

"Maximum file size: 100 MB"

... but the PDF I'm trying to upload is only 8 MB.

I don't know whether this is relevant, but I recently upgraded from 1.34 to 1.35.8.

Jonathan3 (talkcontribs)
Jonathan3 (talkcontribs)

I changed post_max_size and upload_max_filesize both to 10M and it works all right now. Mustn't have had such a large file before. In my case I typed:

sudo nano /etc/php/7.4/apache2/php.ini
sudo systemctl restart apache2

Password reset link missing in 1.39

3
Jbennett56 (talkcontribs)

Hello,

We've updated MediaWiki from 1.38.1 to 1.39 and the password reset link seems to be missing. Is there any setting that's required to bring it back to a working state so that we can allow registered users to reset their passwords? Thanks.

Bawolff (talkcontribs)

Generally it is controlled by $wgPasswordResetRoutes. If you dont have email enabled that also might make the link dissappear.

Keep in mind that if the user is blocked that will also prevent them from resetting a password.

Jbennett56 (talkcontribs)

We set $wgPasswordResetRoutes to true both for email and username initially and at first it didn't seem like it made any difference but we came into work today and the link is now showing which is really weird but is working now, thank you.

Reply to "Password reset link missing in 1.39"

This maintenance script requires a SQLite database

3
195.239.115.122 (talkcontribs)

Debian 11

Product Version
MediaWiki 1.39.0
PHP 7.4.30
Sqlite 3.34.1

I want to do backup my database with script maintenance/SqliteMaintenance.php --backup-to <file>

but, i get error:

This maintenance script requires a SQLite database

How to fix this problem?

Bawolff (talkcontribs)

Not sure about the script, but you could also backup the DB using the sqlite3 commandline tool.

For that matter with sqlite you could probably just make a copy of the db files using normal filesystem tools.

95.52.96.233 (talkcontribs)

Thank you for answer

Reply to "This maintenance script requires a SQLite database"

Transclusion at end of a sentence (full stop).

7
193.110.182.11 (talkcontribs)

Hello everybody,


I have checked the help page but didn't find a solution for my problem.


Transclusion - MediaWiki


When I have an optional parameter in dem middle of a sentence it would l write something like this.


The {{{Parameter|rabbits}}} are in the garden.


This construction works when its an optional parameter and when no parameter is given only one space is between the parameter and the rest of the sentence. Like this.


The are in the garden.


however when I try to substitute something at the end of the sentence (in the garden) I would get something like.


"The rabbits are in the garden ." When I'm using the parameter with an space at the beginning, it does not take the space. I tried to do it like


The rabbits are{{{ in the garden}}}. Which results in


The rabbits arein the garden.


Does anybody knows a good solution for this. I would have to create all templates with fullstop at the end when used at the end of a sentence?


Thank you very much.

Bawolff (talkcontribs)

Did you try using &#32; instead of a space?

If that doesn't work, try &nbsp;

Fhihu (talkcontribs)

Thank you very much Bawolff for your reply,

I tried using the template and before the parameter string I used either &#32 and

&nbsp. But it seems not to work. Is it correct like this

{{Template|Location=&#32in the garden}}.

Thank you very much for your reply.

Bawolff (talkcontribs)

The semicolon is important.

What is the precise thing you are doing?

Because when i tried:

the rabbits are {{{param|in the garden}}}.

I got

The rabbits are in the garden.

With no weird spacing issues.

80.120.111.178 (talkcontribs)

Hello Bawolff, thank you very much for your kind reply.


Yes I forgot the semicolon. Perfect.


When you use a parameter everything is okay.

the rabbits are {{{param|in the garden}}}.

results in:

The rabbits are in the garden.


But when you don't use a parameter (optional) in this case leaving "in the garden" empty

the rabbits are {{{param|}}}.

results in:

The rabbits are .


So between the last letter and the fullstop is a space.


Thats why I thought about creating template like this:


the rabbits are{{{param|&nbsp;in the garden}}}.

which result in

The rabbits are in the garden.


An when I don't use a parameter

the rabbits are{{{param|}}}.

I get

The rabbits are.


Where the fullstop is following the last character. I hope it's understandable what Im trying to achieve.


Greetings.

fhihu

Bawolff (talkcontribs)
Fhihu (talkcontribs)

Hello Bawolff, thank you very much for your kind reply and help.


I have checked the parser function in templates helppage

Help:Parser functions in templates


But I don't fully understand how it works.


I created a template (Tmplte 1) like this:

The {{{Noun|rabbit}}} plays with the dog{{#if:{{{Where|}}}|{{{Where}}}|}}.

The “Where” param is optional.

When I call the template I use

{{tmplte_1|Noun=rabbit|Where=in the garden}}

Which results in

The rabbit plays with the dogin the garden.

I can’t see any advantage to the way I did it before.

Do I have to use also an non-breaking space like this

The {{{Noun|rabbit}}} plays with the dog{{#if:{{{Where|}}}|&nbs;{{{Where}}}|}}.

Thank you very much

hihu

Reply to "Transclusion at end of a sentence (full stop)."

Sorting of numbers in Spanish

3
Cojoilustrado (talkcontribs)

Hi all, under the latest rules of writing numbers in Spanish, numbers largers than 9999 should be separated by space, not a comma or a period. In the past 20K was 20.000, but now it's 20 000. Naturally things don't get sorted right in tables with these numbers. What adjustment should I make to get it to sort under this rule? Is it possible?

Fokebox (talkcontribs)

{{formatnum:200000}}

Cojoilustrado (talkcontribs)

Thank you!

Reply to "Sorting of numbers in Spanish"