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

"Edit source" button doesn't work while in Visual Editor

3
Guillaume Taillefer (talkcontribs)

Hello. For some time now I have been having the problem where all the sudden when I try to click on "edit source" or "Source Editor" while in Visual Editor, it does nothing, in fact nothing loads. Sometimes it will give you the prompt: Invalid response from server.

Also I have the problem where now whenever I try to save long written articles the article will start saving and then prompt with: "server didn't respond in time"

I have updated the response time to being longer than was before and it sometimes works but usually does not and just gives that prompt.

This is on Mediawiki 1.40 btw.

Bawolff (talkcontribs)

I would suggest checking your php and apache error log to try and figure out if it is just a normal timeout or something else going wrong.

For timeout, be sure you have $wgMainCacheType set to something that works, as that can help a lot with performance.

Guillaume Taillefer (talkcontribs)

Thanks again @Bawolff! I will look into it and come back with what I see

Reply to ""Edit source" button doesn't work while in Visual Editor"

How to run a database upgrade on a local (XAMPP) MediaWiki?

1
2A10:8012:15:3790:9553:DACC:14EA:1F10 (talkcontribs)

Windows 11 Home with XAMPP 3.3.0 with MediaWiki 1.41

I have recently upgraded my local (XAMPP) MediaWiki directory from 1.36 to 1.41 and now I need to run a database upgrade command:

php maintenance/run.php update.php

As the site is offline on XAMPP, I can't SSH into the same system I am at and use Bash (as I would with my web hosting environment), so probably I have to work this out from Windows CMD or Powershell somehow?

Reply to "How to run a database upgrade on a local (XAMPP) MediaWiki?"

No CSS and all internal links lead to "Not found" pages

7
2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

Windows 11 Home with XAMPP 3.3.0 and MediaWiki 1.41

With the web browser command localhost/hanekudai I can access my local site but I only get the front page with no CSS and any internal link leads to a 404 "Not found" page.

Here is my full LocalSettings.php:

<?php

# URL settings
    $wgSitename = "hanekudai";
    $wgServer = "http://hanekudai";
    $wgArticlePath = '/wiki/$1';

## Database settings
    $wgDBtype = "mysql";
    $wgDBserver = "localhost";
    $wgDBname = "OMITTED";
    $wgDBuser = "OMITTED";
    $wgDBpassword = "OMITTED";
    $wgDBprefix = "";
    $wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

# Language settings
    $wgShellLocale = "C.UTF-8";
    $wgLanguageCode = "he";

# Extension settings
    wfLoadExtension( 'Cite' );
    wfLoadExtension( 'ParserFunctions' );

# Skin settings
    wfLoadSkin( 'Vector' );
    $wgDefaultSkin = "vector-2022";

I didn't find a general log file in the rather complex file tree of MediaWiki.

What have I done wrong?

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

This is the URL of my frontpage:

http://localhost/hanekudai/index.php?title=Hanekudai
Bawolff (talkcontribs)

Your $wgServer is incorrect given the url you listed.

It should be "http://localhost" since the server in question is named localhost not hanekudai.


There is a strong possibility your $wgScriptPath & $wgArticlePath is incorrect based on what you wrote (although hard to be sure as that can depend on other config files like .htaccess)

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

I have changed $wgServer according to your reply but still have the same problem - no CSS and all links are not found.

Is there any further data I could bring to you, that will help you help me, dear Bawolff?

Bawolff (talkcontribs)

What is $wgScriptPath set to? It should probably be "/hanekudai"

I would reccomend not setting $wgArticlePath at all.

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

I have removed $wgArticlePath altogether and added $wgScriptPath = "/hanekudai"; which was not there from the first place and now the website has CSS and I no longer have any 404 so the problem is solved !

Thanks a lot, dear Bawolff.

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

@Clump please delete the above reply (I should have putted it in another thread and will do so immediately) and please also mark this current thread as solved based on my reply above to Bawolff. Much thanks !

Module pages do not render on specific members of a wiki family

4
Marx.FelipeForte (talkcontribs)

In some language sections of our wiki, we get this error when opening any citation page:

[e151029d61b06caf6d0daf1f] /wiki/Module:Citation LogicException: This ParserOutput contains no text!

Backtrace:

from /var/www/prolewiki/includes/parser/ParserOutput.php(382)

# 0 /var/www/prolewiki/extensions/Scribunto/includes/ScribuntoContentHandler.php(224): ParserOutput->getRawText()
# 1 /var/www/prolewiki/extensions/Scribunto/includes/ScribuntoContentHandler.php(193): MediaWiki\Extension\Scribunto\ScribuntoContentHandler->highlight()
# 2 /var/www/prolewiki/includes/content/ContentHandler.php(1759): MediaWiki\Extension\Scribunto\ScribuntoContentHandler->fillParserOutput()
# 3 /var/www/prolewiki/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
# 4 /var/www/prolewiki/includes/Revision/RenderedRevision.php(259): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
# 5 /var/www/prolewiki/includes/Revision/RenderedRevision.php(232): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached()
# 6 /var/www/prolewiki/includes/Revision/RevisionRenderer.php(223): MediaWiki\Revision\RenderedRevision->getSlotParserOutput()
# 7 /var/www/prolewiki/includes/Revision/RevisionRenderer.php(164): MediaWiki\Revision\RevisionRenderer->combineSlotOutput()
# 8 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}()

...

The citations themselves work, and they can still be edited in source code, but they do not render any page in only two wikis.

e.g.: https://en.prolewiki.org/wiki/Module:Citation

e.g.: https://pt.prolewiki.org/wiki/Módulo:Referência

But on other languages, we don't see that error

e.g.: https://es.prolewiki.org/wiki/Módulo:Citación_web

e.g.: https://zh.prolewiki.org/wiki/Module:String

My initial suspicions is that it's a database problem? Because the English and Portuguese wikis were the first ones created, in a older version of MediaWiki, and they are the ones giving trouble. How can I further investigate this?

Bawolff (talkcontribs)

Often this is a problem with a third extension, and its often unclear which one. Older versions of SpamBlacklist caused a bug like this. Similarly some versions of Lingo extension had a bug like this.

If you can reliably reproduce you could try disabling extensions one by one to see what happens.


Its probably not a database problem. Its possibly a problem with parser cache but i think that's unlikely.

Marx.FelipeForte (talkcontribs)

Similarly some versions of Lingo extension had a bug like this.

True, as far as I've searched, I've seen a few mentions of Lingo as well.

I can try removing extensions one by one and see its effects, though all wikis have the same extension registry, even the wikis which have working Module pages

So it doesn't look to me like a conflict of extensions either, at least on immediate appearances...

Marx.FelipeForte (talkcontribs)

I noticed that if I comment the line where it throws the exception (line 382), the module page displays correctly, as it should.

public function getRawText() {
    if ( $this->mText === null ) {
        //throw new LogicException( 'This ParserOutput contains no text!' );
    }

    return $this->mText;
}

This shows that a null value for mText does not apparently affect the render of the page, but there may be a reson it's there, right?

Reply to "Module pages do not render on specific members of a wiki family"

create account users massively on mediawiki

4
Dbautistar (talkcontribs)

I have a question, is there a way to create user accounts in bulk on mediawiki? Or do I only have to do it as an administrator directly in the database?

If it is directly in the database, can you give me the script please?


thank you

Ammarpad (talkcontribs)

CreateAndPromote.php can be used to create users, one at a time. You can use it in a loop for batch creation.

Bawolff (talkcontribs)
38.25.30.65 (talkcontribs)

Greetings again.

I have tried extension:ImportUsers but I don't know how it really works.

There is no documentation or forums or videos that show how to use it.

The first method does work but at the moment it only allows you to establish a username and password.

I can't put email or real name.

Reply to "create account users massively on mediawiki"

How to get MediaWiki to work on XAMPP?

11
2A10:8012:15:3790:D867:A026:F730:1CA9 (talkcontribs)

Windows 11 Home with XAMPP 3.3.0 with MediaWiki 1.36

After creating a database username, password and a database with the same name (all matcing details in LocalSettings.php), and after a successful import of the data from a backup I am having trouble accessing MediaWiki from localhost.

The name of the website directory is hanekudai and LocalSettings.php file also contains these data:

$wgServer = "localhost://hanekudai";
$wgEnableCanonicalServerLink = true;

$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "OMITTED";
$wgDBuser = "OMITTED";
$wgDBpassword = "OMITTED";
$wgDBprefix = "";
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

In a web browser, the command localhost redirects me to XAMPP welcome page but the command localhost/hanekudai leads to the same webpage I am currently at.

How to get MediaWiki to work on XAMPP?

TheDJ (talkcontribs)

localhost:// is not a valid protocol. http:// and https:// are protocols.

2A10:8012:15:3790:D867:A026:F730:1CA9 (talkcontribs)

It is true that these two are protocols and I was confused and changing:

$wgServer = "localhost://hanekudai";

to:

http://localhost:hanekudai

Solved the problem.

2A10:8012:15:3790:D867:A026:F730:1CA9 (talkcontribs)

Oh, no it didn't solve the problem (it seemed to because I got an error after forgetting to turn on MySQL) but anyway I now get:

This page isn’t working right nowlocalhost sent an invalid response.

Any suggestions what to do?

TheDJ (talkcontribs)

http://localhost/hanekudai

Don't take this the wrong way... but if you don't know how URLs work, I don't think you are going to enjoy running a server. This is very basic required knowledge and if you got stuck here, there are going to be 100 more points after this that you are likely going to get stuck at.

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

@TheDJ

You are wrong. I know how URLs work since year 1996 approximately.

In this post I meant to write:

It is true that these two are protocols and I was confused and changing:

$wgServer = "localhost://hanekudai";

to:

$wgServer = "http://localhost:hanekudai";

didn't solve the problem.

I couldn't edit the post above to fix my mistake for some reason (it's very bad that anonymous users here can't edit their posts even for just one hour or 12 hours from the posting operation).

That being said

Evidently I had another mistake there confusing : instead of / after years I didn't set a local server environment on Windows so just chill out and don't be so demagogue about alleged 100 future probelms that never were and shouldn't be and about what I am going to enjoy or not.

Here is the first part of a Bash script I once wrote years ago to set my VPS on a Digital Ocean droplet, something I greatly enjoyed doing at the time:

#!/bin/bash

apt update -y
apt upgrade sshguard
apt upgrade ufw
ufw --force enable
ufw allow 22,25,80,443/tcp
ufw allow 22,25,80,443/udp
apt upgrade unattended-upgrades wget curl zip unzip tree git at
apt install lamp-server^
apt install certbot python3-certbot-apache
a2enmod http2 deflate expires # Activate Apache mods
systemctl restart apache2

Don't be hasty in your conclusions.

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

Anyway, to any user who wants to help, even with:

$wgServer = "http://localhost/hanekudai";

but the site still doesn't work. After executing localhost/hanekudai in a web browser, I am being redirected to:

http://localhost/hanekudai/index.php/Hanekudai

were I get the following error message:

This page isn’t working right now

localhost redirected you too many times.

  • Try deleting your cookies.

ERR_TOO_MANY_REDIRECTS

As suggested in the error message, I have flushed all caches from all time in another web browser and tried to execute the address again but got the same error message.

If anyone has any idea why that happens, pelase share it.

Bawolff (talkcontribs)

> $wgServer = "http://localhost/hanekudai";

This is wrong. $wgServer should only have the protocol and server part of the url not the path component. The path component goes in $wgArticlePath / $wgScriptPath.

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

If I am not mistaken, adding the following line to LocalSettings.php solves the problem:

$wgArticlePath = '/index.php?title=$1';

Manual:$wgArticlePath says:

This is the base URL that will be used to construct all internal links within MediaWiki. The default value points it to the main index.php script using a relative URL, but if you are using .htaccess for pretty URLs, this can be altered as required.

I don't know if and how it solves the problem because now I have another error relating to the skin Timeless which I recall modifying in the time.

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

I have solved the skin problem by replacing the skin to Vector and the site homepage goes up but without CSS and when I click the login link I am redirected to the XAMPP welcome page.

2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

Basically to solve this problem I had to upgrade MediaWiki to the current version which is 1.41 to prevent some strange PHP errors and PHP modifications I have made to Skin:Timeless which caused some problems (so I switched to a core Skin:Vector.

I have also created a whole new LocalSettings.php suitable for offline (local server) work.

What I did exactly, is described in this thread.

Reply to "How to get MediaWiki to work on XAMPP?"

Scribunto: Lua error: Internal error: The interpreter exited with status 127

19
85.221.134.80 (talkcontribs)

Hey I have a problem. I installed scuribunto. I have an error: Lua error: Internal error: The interpreter exited with status 127. What to do?

Malyacko (talkcontribs)

When I search for that error message I get many results on the internet and also some results on mediawiki.org. What have you tried so far from these results? Which MediaWiki version? Which steps to reproduce?

85.221.134.80 (talkcontribs)

Version 1.34.1

I set up chmod 755 /path/to/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua and /path/to/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic

LocalSetting.php:

wfLoadExtension( 'Scribunto' );

$wgScribuntoDefaultEngine = 'luastandalone';

MarkAHershberger (talkcontribs)
85.221.134.80 (talkcontribs)

only

sh: $'\001': command not found

Bawolff (talkcontribs)

127 means file does not exist/is not found. (If it simply wasnt executable it would be 126. We are using bash error codes). Check that the file exists, and no sandboxing mechanisms prevent it from being visible.

85.221.134.80 (talkcontribs)

What file is it about?

Malyacko (talkcontribs)

LocalSetting.php does not exist. LocalSettings.php does.

79.190.214.1 (talkcontribs)

I wrote LocalSetting.php:

wfLoadExtension('Scribunto');

$wgScribuntoEngineConf['luastandalone']['luaPath'] = 'extensions/Scribunto/includes/engines/LuaStandalone/biaries/lua5_1_5_linux_31_generic/lua';

MarkAHershberger (talkcontribs)

Since it looks like lua is not being found, could you tell us what happens when you try to run lua from the command line?

85.221.134.80 (talkcontribs)

The problem is over. I gave up on lua. I used another solution.

Шариф Ахмет (talkcontribs)

We have had such a problem on our website for about a month:

https://shekiwiki.com/encyclopedia/index.php

But we cannot eliminate this problem. Is there any way other than moving our site to another server?

Thanks in advance for your help.

Malyacko (talkcontribs)
Шариф Ахмет (talkcontribs)

After all, there is neither a folder nor a file called "popen" in the place you mentioned?

Malyacko (talkcontribs)

It says "function", not "file or folder".

Шариф Ахмет (talkcontribs)
Шариф Ахмет (talkcontribs)

It works normally on another server: https://sheki.org/wiki/Ana_s%c9%99hif%c9%99

  1. On the old server: https://wiki.sheki.org/wiki/R%C9%99hman_Orxan
  2. On the new server: https://sheki.org/wiki/R%C9%99hman_Orxan

The following errors in the Error Log, hundreds:

[04-Apr-2024 00:11:44 Asia/Baku] PHP Warning: proc_open(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/home/shaki/:/tmp/:/var/tmp/:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/php56/lib/:/usr/local/php82/lib/:/usr/local/php74/lib/:/usr/local/lib/php/) in /home/shaki/domains/shaki.info/public_html/wiki/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php on line 153 [04-Apr-2024 00:11:44 Asia/Baku] PHP Warning: proc_open(/dev/null): failed to open stream: Operation not permitted in /home/shaki/domains/shaki.info/public_html/wiki/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php on line 153 [04-Apr-2024 00:11:44 Asia/Baku] PHP Warning: proc_open(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/home/shaki/:/tmp/:/var/tmp/:/opt/alt/php73/usr/share/pear/:/dev/urandom:/usr/local/php73/lib/:/usr/local/php73/lib/:/usr/local/php56/lib/:/usr/local/php82/lib/:/usr/local/php74/lib/:/usr/local/lib/php/) in /home/shaki/domains/shaki.info/public_html/wiki/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php on line 153

Malyacko (talkcontribs)

Have you tried entering "open_basedir restriction in effect." in an internet search engine? What were the results?

Шариф Ахмет (talkcontribs)

Here is a discussion: . There is no concrete result. There is not and never was a "LuaStandaloneInterpreter.php" file on our site.

Reply to "Scribunto: Lua error: Internal error: The interpreter exited with status 127"

Deactivate "Preview" (when editing a page) ?

1
Varlin (talkcontribs)

Hi, on my wiki, I'd like to deactivate the functionality to Preview a page before saving it (mainly because it causes some issues on my wiki - loss of data - and I don't use it enough to fix them). I could hide the button Preview, but is there a proper way ? Thanks

Reply to "Deactivate "Preview" (when editing a page) ?"

Please allow anonymous users to edit posts here for at least 1 hour to 12 hours after posting

3
2A10:8012:15:3790:648F:A136:37E7:E9D8 (talkcontribs)

Please allow anonymous users to edit posts here for at least 1 hour to 12 hours after posting.

This can be done without much problem based on IP address AND a web browser cookie (and the time limit of up to twelve hours would really seal the deal I guess).

Although not speaking English (or any other Germanic language) as a first language I control it quite good but still more prone to error in it and I currently I also suffer from a psychiatric condition and tend to confuse and have typos or phrasing mistakes more often; I should get better soon but it will take a two months or so probably.

I control HTML, Wiki, and Markdown quite good for years now and usually very pedantic about them but had a thread here with two mistakes (yes @TheDJ two mistakes instead of just one are also possible even for an experienced user) and it is great of a trouble for me that I can't edit posts in my last thread in which I confused twice and had several phrasing mistakes.

Please, for accessibility's sake, allow anonymous users to edit their posts at last for some small time.

@Malyacko

@Bawolff

@Jonathan3

Bawolff (talkcontribs)

No. We aren't going to change this.

If you want to be able to edit previous posts, create an account.

Malyacko (talkcontribs)

No, thanks.

Reply to "Please allow anonymous users to edit posts here for at least 1 hour to 12 hours after posting"

The /.cagefs/tmp/ folder keeps creating merge files

2
Шариф Ахмет (talkcontribs)

Our site has been moved to a new server for 1 day: https://sheki.org/wiki/index.php

The /.cagefs/tmp/ folder keeps creating merge files like 'merge-your-xYOkiL', 'merge-old-LUv354' etc. in their names. 3-6 times per minute. Each of these consists of the HTML code of one page of the site (5-6 pages in total, mostly large pages). I want to know, what is it for? Should it be avoided?

Thanks in advance.

Bawolff (talkcontribs)

Hi,

This is used during edit conflicts (when two people edit the same page at the same time) to try and automatically resolve the conflict.

There is no harm in these files, and they should be deleted automatically after the edit.

It is possible to disable by setting $wgDiff3 but i dont reccomend as that will significantly increase the frequency of edit conflict pages.

Reply to "The /.cagefs/tmp/ folder keeps creating merge files"