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".
Fokebox (talkcontribs)

I have notice that MW sites (including this one) has a button in the bottom-right corner. Could some one let me know how to have it at my wiki?

Bawolff (talkcontribs)

Maybe part of vector-2022? Im not sure.

Fokebox (talkcontribs)

I have vector-2022 skin at my MW 1.38, but can't see this button or any settings to switch it in on.

Ammarpad (talkcontribs)

Please share image of the button.

Fokebox (talkcontribs)

Here it is:

Wide screen button at Mediawiki
Malyacko (talkcontribs)

The button is part of Vector 2022 / Desktop Improvements , as a common dislike of existing community members was the limited content width.

Fokebox (talkcontribs)

How switch it on at my wiki?

Reply to "Wide screen button"

DynamicPageList and Categories

HirnSpuk (talkcontribs)

Hello, due to a lack of community-Contributors (content is more or less fine) I would have liked to work on some automatic structuring-"tools" based on categories and DPL on dewikibooks. Now I read, DPL has problems (and possibly might be abandoned in the future? Compare phab:T287380) and I found w:en:Category:Overpopulated_categories . So I'm worried, if my ideas will be feasible at all.

What I would like to do: via categorization of pages sort the structure of Wikibooks more or less automatically, so that content contributors need only to worry about categorization and not editing community-pages. Hence less edits, less errors, less archive-work. To do this and to have some kind of control of the visual representation I would have liked to use DPL. Because of the above mentioned problem I don't think this might be a good idea. Now, if I discard the idea of having some kind of control on the visual representation, I could use category-pages itself. But if those are limited in some way it might be a bad idea for the future. Not that I expect to run into problems in the near future, but there might come the time, when somebody will. Restructuring then might become a pretty big task. So, if my ideas do not have any structural benefit for the future (aka "exploding" categories instead of "exploding" other pages) it might be a good idea to retire the idea and think about something else.

So two short questions:

  1. can someone elaborate in short where the problem is with dpl, because I'm not quite sure if I understand it correctly? And as a follow up: Would you recommend not using it? The answer here is probably not really crucial, because I already think it's a good idea not to use it extensively. But any explanation here will be highliy appreciated.
  2. is there a physical limit on how many pages a category can contain, and if so, which is it and where can I read up on this topic?

Thank you very much for any help anyone can provide. Best regards, HirnSpuk (talk) 18:16, 29 November 2022 (UTC)

Bawolff (talkcontribs)

Honestly, i would just use DPL for now. There is unease with the extension, but as of right now there doesn't seem to be any positive plan to get rid of it.

So the problem with the extension: If you combine (intersect) multiple categories it does that inefficiently for large categories. i.e. It works by loading all the entries in the first category, and checking each one to see if it is in all the other categories[1]. If the first category has 200 entries, this is fine. If instead it has 2 million entries, this is not so fine.

However if you are only using DPL with 1 category, then none of this applies. DPL just looks at the entries of the category it needs and displays them. It takes the same amount of time regardless of how big the category is. [And the sorting method is categorysortkey or categoryadd. Sorting by lastedit, length, created may require loading the whole category]

Anyways, is really small, so things should be fine no matter what you do.

In conclusion, I would suggest using DPL if its useful. Keep in mind that should really take off and increase in size by 10 or 20 times, you might have to change your templates if they use DPL with multiple categories intersecting.

As far as the drama goes with - A lot of that was due to the community not being very cooperative with developers. In the very unlikely event that something happens and developers tell you you need to change something due to performance concerns, just change whatever needs to be changed. As they say on en wikipedia at w:Wikipedia:Don't worry about performance - generally speaking you shouldn't worry too much, but if something does happen, just cooperate with the people who are trying to fix whatever it is.

For question 2: No limit. de.wikibooks only has about 70,000 pages, so i suppose at most you could have a category with 70,000 pages in it (And currently the biggest is much smaller ). Most of MediaWiki is designed so that if you look at a category, mediawiki only has to load the first 200 entries not the entire thing, so it doesn't matter much how big they get (DPL when intersecting multiple categories is an exception to this).

[1] - Please note, I'm oversimplifying a lot here, and strictly speaking this is not quite true, but its mostly close enough.

HirnSpuk (talkcontribs)

Thank you very much for the explanation, that's exactly the "simplified" version I was looking for. Regarding "oversimplification", just one follow-up for question 2:

  • So I'm getting it right, there's no limit at all? Not only "no limit, because de.wb is small"? Is this in any way server-cost relevant if categories are large? Can I read up on this somewhere?

That said, another thing regarding oversimplification, being curious and seeing that you might have deeper insights, please feel free to elaborate further, if you'd like. I'm electrical engineer by training can program a little and might get it, if I'm not forced to look at a lot of pages figuring out the causal relations by myself. Use any of my talk pages, if you have the time and would like to.

Another side-note: I didn't follow the mentioned "drama". It might not be a question of "wanting to cooperate", but of availability, activity in the wikimedia-universe, enough spare time and ability (regarding rights and/or knowledge). Sure, I'd like to cooperate, but I might not be able to guarantee it because of "real-life-constraints" ;-). Thanks again, regards, HirnSpuk (talk) 12:06, 30 November 2022 (UTC)

Reply to "DynamicPageList and Categories"

Troubles with installing extentions on MediaWiki 1.35

Vasisualy2009 (talkcontribs)


I successfully installed MediaWiki 1.35 on Ubuntu 20.04 and Nginx.

But I can't install extention Echo. So, I can't both run update.php script and access web updater. More, some extensions like MobleFrontend, which don't change database, dropped my wiki to Error 500 too. What should I do? Thanks for any help!

PHP v 7.4

update.php output:

wikiadmin@wiki-ubuntu:/var/lib/mediawiki/maintenance$ sudo php update.php

PHP Fatal error:  Uncaught Exception: Unable to open file vendor/wikimedia/parsoid/extension.json: filemtime(): stat failed for vendor/wikimedia/parsoid/extension.json in /var/lib/mediawiki/includes/registration/ExtensionRegistry.php:177

Stack trace:

#0 /var/lib/mediawiki/includes/GlobalFunctions.php(51): ExtensionRegistry->queue()

#1 /var/lib/mediawiki/LocalSettings.php(151): wfLoadExtension()

#2 /var/lib/mediawiki/includes/Setup.php(143): require_once('/var/lib/mediaw...')

#3 /var/lib/mediawiki/maintenance/doMaintenance.php(91): require_once('/var/lib/mediaw...')

#4 /var/lib/mediawiki/maintenance/update.php(253): require_once('/var/lib/mediaw...')

#5 {main}

  thrown in /var/lib/mediawiki/includes/registration/ExtensionRegistry.php on line 177

PHP Fatal error:  Uncaught Error: Class 'WebRequest' not found in /var/lib/mediawiki/includes/HeaderCallback.php:63

Stack trace:

#0 [internal function]: MediaWiki\HeaderCallback::callback()

#1 {main}

  thrown in /var/lib/mediawiki/includes/HeaderCallback.php on line 63


server {

    listen default_server;

    server_name wikibase;

    root /var/www/html/mediawiki;

    client_max_body_size 5m;

    client_body_timeout 60;

    location / {

        try_files $uri $uri/ @rewrite;


    location /wikibase/ {

        try_files $uri $uri/ @rewrite;


    location @rewrite {

        #rewrite ^/(.*)$ /index.php?title=$1&$args;

        rewrite ^/(.*)$ /index.php?title=%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%>


location ^~ /maintenance/ {

        return 403;


    location ~ \.php$ {

        include fastcgi_params;

        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

        fastcgi_param SCRIPT_FILENAME $request_filename;


#    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {

#       root /var/www/html/mediawiki;

  #      expires max;

   #     log_not_found off;

   # }

#   location ~ ^/(skins|extensions)/.+\.(css|js|gif|jpg|jpeg|png|svg|wasm)$ {

#               try_files $uri 404;

#               add_header Cache-Control "public";

#               expires 7d;

#       }

    location /rest.php/ {

    try_files $uri $uri/ /rest.php?$query_string;


    location ^~ /cache/ {

        deny all;



E.Holgeri (talkcontribs)

Topic was marked as solved, but there wasn't described how.

I've had the same problem with MediaWiki 1.36 an Ubuntu 20.4 with Apache.

I changed wfLoadExtension( 'Parsoid', "$PARSOID_INSTALL_DIR/extension.json" );

in LocalSetting.php, which worked with MediaWiki 1.34, to

wfLoadExtension( 'Parsoid', __DIR__ . "/vendor/wikimedia/parsoid/extension.json" );

and phpupdate ran without problems.

Hope, that helps others with the same problem.

Hyperreview (talkcontribs)

It worked also for me.

I had: wfLoadExtension( 'Parsoid', 'vendor/wikimedia/parsoid/extension.json' );

instead of

wfLoadExtension( 'Parsoid',  __DIR__ .'/vendor/wikimedia/parsoid/extension.json' );

Cojoilustrado (talkcontribs)

I just had this issue while upgrading to 1.37. This solved it. Thanks.

Reply to "Troubles with installing extentions on MediaWiki 1.35" (talkcontribs)

Might be the wrong place to ask but I'm finding it difficult to find a wiki farm that suits my needs. Preferably, I'd want something run with MediaWiki, with access to the Vector skin (Wikipedia style) and all the basic functions and options for extensions. Miraheze seems to be the closest to what I'm looking for but I really hate their hands-on approach and would rather have something moderation-free. ShoutWiki was another good suggestion but it's currently down and has been for a while. Could anyone help me out here? Thanks

Bawolff (talkcontribs)
AlexGRFan97 (talkcontribs)

Is self-hosting not an option in your current situation? I'd consider a web service that specialises in MW like A2, pay the extra premium for your first year, and then you can relax and pay comparatively pennies for however long you plan to run your website for. Plus, no moderation and no rules.

Skins are also just about the easiest thing to install on MW.

Reply to "Wiki farm recommendation?"

Is it possible to have templates parse individual characters from a parameter?

AlexGRFan97 (talkcontribs)

To try and explain what I want, in the clearest manner possible:

I have a template, Song.

I have a parameter, songname.

I wish to alter the template so it will automatically take the first letter of the songname parameter (i.e. if the song's name is "Jessica", then it will take the "J", and that will allow me to create a sub-parameter that will then link to a page called "List of music featured in automotive journalism media/J", which will then have (#songname) appended to the end so it automatically jumps to the relevant song in that article.

Thanks in advance.

Bawolff (talkcontribs)
AlexGRFan97 (talkcontribs)

Right, the second option sounds good to me!

My only question how would I then use the substring as a parameter of its own once it's been generated?

So I'd imagine it would be set up like:

{{#sub:{{{songname}}}|1}} and that would get me the substring I seek without modifying the data already input. So if the songname variable was "Jessica", the "1" would denote it to sample only the J.

I would then append a link to [[List of music featured in automotive journalism media/{{{substringvarname}}}#{{{songname}}}]] in the template. If I'm right, it should just be a case of putting the "sub" template in the place of "substringvarname", but I could be wrong.

Bawolff (talkcontribs)


AlexGRFan97 (talkcontribs)

Right, that's sorted.

For future reference, in case anyone wants to do what I did, you need to use {{#sub:{{{songname}}}|0|1}}so it takes only the first letter of the phrase, as opposed to just "1" on its own, which takes away the first letter and leaves the rest of the string intact.


The revision #0 of the page named "x" does not exist.

Spiros71 (talkcontribs)

I get this error for a specific page (MW 1.31) without following a history link.

The revision #0 of the page named "x" does not exist.

This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log.

When I try to edit and save, I get the same error and/or

Someone else has changed this page since you started editing it. The upper text area contains the page text as it currently exists. Your changes are shown in the lower text area. You will have to merge your changes into the existing text. Only the text in the upper text area will be saved when you press "Save changes".

But when saving and then accessing the page I get the same as the first error.

Bawolff (talkcontribs)
Spiros71 (talkcontribs)
Bawolff (talkcontribs)

i mean, if it was many years ago, but just happening now, the cause is probably different.

You need to figure out what is wrong with db. Basically find the entry in the page table for that page and the corresponding revision entry, and see if anything it references is 0 or missing.

Spiros71 (talkcontribs)

It may have been there all along, but just now I discovered it.

The first screen from a working page, second from dodgy one

Revision table

I can see in a working revision table entry the rev_parent_id has a value, whereas in the non-working one it is 0 but I guess this only means that there are no other revisions for that page.

Reply to "The revision #0 of the page named "x" does not exist."

Variable number of parameters in template?

RPI2026F1 (talkcontribs)

How do I make a template that can accept any number of arguments? I want to make a template that will call another template for every argument provided, but I'm not sure if this is possible to do without dropping down to Lua.

Reply to "Variable number of parameters in template?"

template is deleted accidently

Pooja2425 (talkcontribs)


Team one template is deleted by user, so facing issue in lot of wiki page Titles.

tempalte deletion issue

please suggest how we can restore deleted templates.??

Bawolff (talkcontribs)

Use Special:undelete on your wiki

Reply to "template is deleted accidently"

Looking for subsection text

1 (talkcontribs)

For an extension I need to obtain the parsed and fully rendered, formatted HTML from a subsection.

I have a content object in `$content` and can get sections via `$content->getSection("3")` and can proceed with $`getText()` but what I actually need is something like `$content>getSection("3.1")`

Unfortunately this returns `false`.

However, I do get the text of the entire section via `$content->getSection("3.0")->getText()` so I am a bit confused...

This is with 1.38.0 (e5cd267)

Reply to "Looking for subsection text"

Wiki family and redirect issue

2 (talkcontribs)

Hi. I was trying to setup a wiki farm (family) on my hosting. I've created two subdomain, placed installation files to one, and set other one's Document Root to the subdomain where installation is located.

But when I try to enter second subdomain, it redirects to installation subdomain instead of showing second wiki.

Any idea what can cause this on MediaWiki's side?

Bawolff (talkcontribs)

Check $wgServer in LocalSettings.php

Reply to "Wiki family and redirect issue"