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

Why is logging in disabled on this wiki?

3
2601:C6:D200:E9B0:6895:D447:CA56:E4C0 (talkcontribs)

Hello. I'm not a creator of a MediaWiki, I'm just here to ask a question. I want to create an account and edit on the Touhou wiki (https://en.touhouwiki.net/wiki/Touhou_Wiki) which was created with MediaWiki (I am NOT a vandal, by the way, I'll probably make a couple of blog posts for my personal Touhou fanworks and edit some typos/things that need to be changed because they're outdated, etc.). It says that registering an account on the wiki is disabled and to do so you have to request it on their Discord server. I do not use Discord and I don't want to go through the pain of making an account and all that stuff just to have an account on the Touhou wiki. I wonder if there's a reason to this, I think it is most likely to prevent vandals (but there could be another reason), and I'm not asking to have one right now, I am just wondering.

Clump (talkcontribs)

You'd have to ask on Touhou_Wiki. This is a different wiki, using the same software, but not administratively connected.

2601:C6:D200:E9B0:6895:D447:CA56:E4C0 (talkcontribs)

I think there's nowhere I can use on the Touhou wiki that I can chat on. There don't seem to be discussions, and you can't edit without an account.

Reply to "Why is logging in disabled on this wiki?"

Invicti Scan detected Possible BREACH Attack on Watchlist

4
Molsen7970 (talkcontribs)

We are looking for guidance on remediating a security vulnerability that Invicti (Netsparker) identified on:

https://website/wiki/Special:Watchlist.

The scan has highlighted the word "token" in the http response. (ex: mw.user.tokens.set, wltoken, ...)

We are not sure of which cookie the remediation notes are referring to when it says using the SameSite Cookie attribute will mitigate the issue.

Invicti Enterprise reported a Possible BREACH Attack issue because the target web page meets the following conditions that facilitate it:

  • Served from a server that uses HTTP-level compression (ie. gzip)
  • Reflects user-input in the HTTP response bodies
  • Contains sensitive information (such as a CSRF token) in HTTP response bodies

To mitigate the issue, we recommend the following solutions:

  1. If possible, disable HTTP level compression
  2. Separate sensitive information from user input
  3. Protect vulnerable pages with CSRF token. The SameSite Cookie attribute will mitigate this issue, because to exploit this issue an attacker forces the victim to visit a target website using invisible frames. With the SameSite cookie attribute added, cookies that belong to the target won't be sent with a request that does not include top level navigation.
  4. Hide the length of the traffic by adding a random number of bytes to the responses.
  5. Add in a rate limit, so that the page maximum is reached five times per minute.
Bawolff (talkcontribs)

Key word being "possible". This is not an actual breach attack vulnerability, just a false positive. At least for mw.user.tokens.set.


For, wltoken, there is a theoretical possibility it might be subject to a breach-style attack, however it seems like such an attack is not really plausible in practise, and the risk is low as wltoken only controls watchlist access.

Bawolff (talkcontribs)

Filed phab:T374766. If you create a phabricator account and tell me your phab username, i will add you to the ticket.

Molsen7970 (talkcontribs)

Thank you! My Phabricator username is Molsen7970.

Reply to "Invicti Scan detected Possible BREACH Attack on Watchlist"

How to restrict special characters in text field

2
2401:4900:560E:C1D4:36D2:2CB5:DD4F:E755 (talkcontribs)

We want to restrict some special characters in text area.

Malyacko (talkcontribs)

Which problem would that solve? What is "the text area"? What blocks you from doing it? Please also read "Post a new question" in the sidebar.

Reply to "How to restrict special characters in text field"

Problem with URL when migrating to new server

3
JohnnyBruv (talkcontribs)

I'm migrating from a 1.35 Mediawiki on Centos 7, to 1.42 on Ubuntu. I've followed this guide: Manual:Running_MediaWiki_on_Debian_or_Ubuntu

The login page: wiki.mypage.com

After login: wiki.mypage.com/index.php/PageName


On Ubuntu it looks like this:

The login page: wiki-ubuntu.mypage.com/mediawiki/

After login: wiki-ubuntu.mypage.com/mediawiki/index.php/PageName


So on Ubuntu, I have a mediawiki-part extra in the URL. This is a problem since we have quite a few links to wiki pages spread out here and there.

Any easy-ish way to fix this? I tried URL rewriting, which didn't work - and I'm guessing it is because I'm unfamiliar with it (I asked Copilot for help!).

Bawolff (talkcontribs)

So rewrite rules is one way to fix it, but another way is to move mediawiki one directory up.

Like right now you probably have it somewhere like /var/www/html/mediawiki/ if instead you got rid of the mediawiki directory and placed it in /var/www/html/ it would probably fix your problem (You may need to also adjust $wgScriptPath )

JohnnyBruv (talkcontribs)

Ah, thanks! I moved it, changed the $wgScriptPath and also the document folder in the Apache2 config, and now the URL's on the old and the new are identical.

Date of creation in footer

1
Nanash (talkcontribs)

Hello,

Do you know a way of adding the page creation date to the footer, similar to the last revision date?

Given that this date is generated automatically in the info page, I suppose it's possible but I can't find a way of doing it.

Reply to "Date of creation in footer"

Call to undefined function OOJSPlus\mwsInitComponents()

8
YeahImNoob (talkcontribs)

I'm continuing to do the migration of a wiki from MW 1.27 to MW 1.35 and solving problems that are showing up alongside.

I've added OOJSPlus extension as BlueSpiceFoundation requires it, but when I'm trying to run the update.php, I'm getting an error message:

PHP Fatal error:  Uncaught Error: Call to undefined function OOJSPlus\mwsInitComponents() in /var/www/html/wiki/extensions/OOJSPlus/src/Extension.php:7

What can be the possible problem and how it can be solved?

PHP: 7.3

MediaWiki: 1.35

OS: Ubuntu 24.04

Osnard (talkcontribs)
YeahImNoob (talkcontribs)

Okay.

  1. Should I delete those from the extensions folder then?
  2. Won't the Composer update those to the most recent versions that can be incompatible with MediaWiki 1.35?
Osnard (talkcontribs)

Yes, you can remove them from the extensions/ folder. You need to specify the proper versions in the composer.local.json. E.g. dev-REL1_35. But you should also consider updating your wiki, as 1.35 is no longer supported.

YeahImNoob (talkcontribs)

I’ve followed the instructions for installing using Composer, but it didn’t help.

I’ll update the wiki to the most recent version once I sort it out, because I need to update it to 1.35 first to avoid losing the database (I’m updating from 1.27).

OOJSPlus is needed for me because there are some BlueSpice extensions (e.g., UserMerge) that are mandatory. Without them, the user base breaks and articles disappear. :(

Osnard (talkcontribs)
Pavel.petrovic (talkcontribs)

Well, I see this error on MediaWiki 1.42...

[php:error] [pid 135114] [client 3.224.220.101:33713] PHP Fatal error:  Uncaught Error: Call to undefined function OOJSPlus\\mwsInitComponents() in /var/www/somefolder/extensions/OOJSPlus/src/Extension.php:7\nStack trace:\n#0 /var/www/somefolder/includes/registration/ExtensionRegistry.php(561): OOJSPlus\\Extension::callback()\n#1 /var/www/somefolder/includes/registration/ExtensionRegistry.php(320): ExtensionRegistry->exportExtractedData()\n#2 /var/www/somefolder/includes/Setup.php(288): ExtensionRegistry->loadFromQueue()\n#3 /var/www/somefolder/includes/WebStart.php(85): require_once('...')\n#4 /var/www/somefolder/index.php(50): require('...')\n#5 {main}\n  thrown in /var/www/somefolder/extensions/OOJSPlus/src/Extension.php on line 7

We need this just for the very simple thing - __HIDETITLE__, because __NOTITLE__ is not working anymore and __HIDETITLE__ requires BlueSpiceFoundation, which requires OOJSPlus.. And all that because of a bit careless design of MediaWiki to push the title of the page to URL, as if the page ID would not be good enough, which of course is a kind of funky idea for non-english alphabet...

Osnard (talkcontribs)

If you really just want to hide the title in the skin of the application, you may be better off using some custom CSS. Also have a look at Extension:TemplateStyles for that.

Reply to "Call to undefined function OOJSPlus\mwsInitComponents()"

Rollback not working as expected

6
2A00:23C8:2D11:9001:6D02:830A:56AF:7271 (talkcontribs)

Rollback failed - Missing required parameters on request.

my wiki rollback isn't working, I have done some forum scraping but I can't really find anyone with the same issue as me. i'm honestly so confused

MediaWiki 1.41.1

PHP 8.3.6

Lua 5.1.5

Ubuntu 24.04.1 LTS

Ammarpad (talkcontribs)

Please supply the required parameters (per the error message) and see if it still does not work.

2A00:23C8:2D11:9001:6D02:830A:56AF:7271 (talkcontribs)

It just returns an error, and I'm pressing the rollback button when it tells me I don't have all of the parameters, so I assumed it would have just worked

{

    "error": {
        "code": "mustpostparams",
        "info": "The following parameter was found in the query string, but must be in the POST body: token.",
        "*": "See https://dovedale.wiki/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
    }
}
Leaderboard (talkcontribs)

Where are you getting this message? Is this part of a script?

Bawolff (talkcontribs)

There are scenarios where mw core can generate that error when clicking the built-in rollback button, but it would be super unusual. Like misconfigured reverse proxy.

Bawolff (talkcontribs)

Do you have any custom JS or gadgets enabled?

If you create a fresh new account, does rollback work from that account?

If all else fails, it might be helpful if you can generate a HAR file of doing a rollback and share it, which will let us see what is really going on. ( https://support.zendesk.com/hc/en-us/articles/4408828867098-Generating-a-HAR-file-for-troubleshooting ) [Note however, HAR files often contain session cookies, which can be used to compromise your account, so you want to log out immediately after generating the file to ensure that the info can't be used nefariously, and maybe not post the HAR file publicly]

Reply to "Rollback not working as expected"

Option to apply filters on a large wikitable

7
Abhidevananda (talkcontribs)

I have created a "data" page with a single, sortable wikitable (with six columns of information).

This is a very large table (well over 3000 rows now, and it will eventually reach more than 5000 rows). Besides raw data, each row contains a link to a distinct article. As it stands, the page is quite useful. Nevertheless, I want to enhance its value by letting users apply filters to the table so that only the filtered rows are displayed. Chief among the filters that must be available would be a Category filter. And I also want to offer a filter based on search string.

I have seen something similar to what i want on Special pages. For example, Special:All_pages has something like that. Is it possible to do the same thing on my own page?

Bawolff (talkcontribs)
Abhidevananda (talkcontribs)

@Bawolff thanks for giving some thought to my question and your reply. However, having cast a quick glance at those two extensions, I'm also thinking "not really". :)

Osnard (talkcontribs)
Abhidevananda (talkcontribs)

@Osnard thanks. Yes, I have looked at the BlueSpice extensions. From what I can tell, they add some cosmetic value but are mostly dependent on the existing data in the table's columns. What would be most useful for me is to filter on the basis of information not available in the columns but rather stored within Categories. But I have concluded that this is probably not possible at present... at least not without more work than I am prepared to invest on it.

Jonathan3 (talkcontribs)

You could 100% do that with Cargo. It has a built-in "Drilldown" page with filters. You can use your own template to replace the standard list with a table.

Also, for queries it has a dynamic table output format, though I don't know whether it would cope with a 5000-line table. Maybe ask on the extension's talk page.

Abhidevananda (talkcontribs)

@Jonathan3, thanks for the input. I just looked closer at Cargo. Yes, it might work. But there were some caveats in the documentation. Unfortunately, it seems that the installation and configuration of this extension would require more technical expertise than I currently have, in other words, the sysop that I currently am missing. :) I will keep this in mind for the future.

Reply to "Option to apply filters on a large wikitable"
Azoundria (talkcontribs)

Currently using MediaWiki version 1.39.1.

The article for the page table says "The text of the page itself is stored in the text table. To retrieve the text of an article, MediaWiki first searches for page_title in the page table. Then, page_latest is used to search the revision table for rev_id, and rev_text_id is obtained in the process. The value obtained for rev_text_id is used to search for old_id in the text table to retrieve the text."

However, there is no rev_text_id in the revision table anymore. I believe this changed in more recent versions. I have been trying to figure out how to get the right entry in the text table for a given page (the latest revision of that page) and not sure how to do this now. If anyone could help that would be very appreciated!

Bawolff (talkcontribs)
Reply to "1.39.1"

How do I make a footnote on Mediawiki?

12
35.40.141.252 (talkcontribs)

I think there is a template that is missing from my wiki since I have only 2 pages on there.

35.40.141.252 (talkcontribs)

Help:Cite, like William Shakespeare, it doesn't work. I copied and pasted the code and what did it do? NOTHING!

Ammarpad (talkcontribs)

What code have you pasted? Also have you enabled the relevant extension Extension:Cite?

97.91.34.184 (talkcontribs)

The code that I pasted was this:

The Sun is pretty big.<ref>E. Miller, ''The Sun'', (New York: Academic Press, 2005), 23–25.</ref> The Moon, however, is not so big.<ref>R. Smith, "Size of the Moon", ''Scientific American'', 46 (April 1978): 44–46.</ref>

==Notes==
<references />
97.91.34.184 (talkcontribs)

Also, no, I haven't enabled the extension. I'm not even sure how to do it.

Ammarpad (talkcontribs)
97.91.34.184 (talkcontribs)

I think that saw the extension's folder, but does that mean that it is installed?

Ammarpad (talkcontribs)

It probably means it's downloaded not installed. Please read Extension:Cite from the top.

97.91.34.184 (talkcontribs)

I think that I downloaded it just a few seconds ago.

97.91.34.184 (talkcontribs)

But it still doesn't work and I still see the code even after I saved the changes.

97.91.34.184 (talkcontribs)

That is, I want the code to work and stay hidden outside of editing, but this just is not happening.

97.91.34.184 (talkcontribs)

Never mind, I got the extension to work! I just added some code in the local settings and it works!

Reply to "How do I make a footnote on Mediawiki?"