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

Other places to ask for help:

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

Bot request - text select/cut help

1
Summary by SpiritHawk7

I found in the wiki editing tools under "page options" that it allows the selected text to be replaced without needing an input value (basically cutting the text by replacing it with nothing). Other programs like Word require a value.

SpiritHawk7 (talkcontribs)

I've been looking around and I'm not sure where I can make a bot request for editing mediawiki projects, such as for editing a Fandom wiki. I've seen a bot request page for Wikipedia itself, but I'm not editing that.

I'm definitely not an experienced coder, so I don't know how to create one from scratch, nor add it to a wiki, etc.

I'm asking for a bot to remove (not replace) a single certain text from multiple certain pages. The reason behind this request is that while I'm editing, I'm able to use my browser's "find" feature to highlight the text I want, but unfortunately, this feature does not also duel select the highlighted text for me to easily cut (I have to manually do this with my cursor which is quite tedious and time consuming as the text is repeated hundreds of times on a single page). Is there a way to easily autoselect the same text and cut it without needing a bot?

My example:
Specific source code text to be removed: <br />
From all main pages titled: placeholderarticlepagename/Transcript

(Note: The pages I intend to edit out these breaks are not template pages)

PorzWiki (talkcontribs)

Hello,

in the LocalSettings I filled in:

$wgMaxUploadSize = [  '*' => 1024 * 1024, // 1000 KB

   'url' => 500 * 1024, // 500 KB ];

But how can I change the warning?

$wgUploadSizeWarning = 1000000;

for example is without any effect. If I test it with a oversized jpg the system says:

"Etwas ist schief gelaufen. Offset plus current chunk is greater than claimed file size"

How can I change this message into "Diese Datei ist zu groß. Maximal sind 1000 KB zulässig" ?

FreedomFighterSparrow (talkcontribs)

This looks like two system messages together: "ooui-dialog-process-error" says "Etwas ist schief gelaufen" (or "visualeditor-dialog-error" says "Etwas ist schief gelaufen …"), and then "apierror-invalid-chunk" adds "Offset plus current chunk is greater than claimed file size."

You can edit those message through their pages, e.g. "MediaWiki:apierror-invalid-chunk", but here's a couple of points:

  • You probably shouldn't change the first message, as it's a generic error message, followed by a more specific one, and might be used in a lot of other places.
  • "apierror-invalid-chunk" isn't the error message you're supposed to get if the file size is too big - that's either:
    • "file-too-large": "Die hochgeladene Datei war zu groß.", or "uploadstash-file-too-large" or
    • "uploadstash-file-not-found-not-exists": "Der Pfad konnte nicht gefunden werden oder die Datei ist nicht eindeutig."
    • "apierror-invalid-chunk" is supposed to show when the original file size claimed was X, but the current chunk uploaded (when the upload is in chunks) already exceeds that claimed file size. If it shows for files that are simply too big, that might be a bug...
Reply to "$wgUploadSizeWarning"
Nasirkhan (talkcontribs)

I want to use the custom Favicon and use the logo configured in the LocalSettings.php file. I found the following code in the Skin:Example, but unfortunately it does not show the logo.


Please help me to solve the issue and you may refer a doc where I can find the solution.


```

<div id="p-logo" class="mw-portlet" role="banner">

               <a href="{{link-mainpage}}">

               {{#data-logos}}

                   {{#icon}}<img src="{{.}}" width="40" height="40">{{/icon}}

                   {{#wordmark}}<img src="{{src}}" width="{{width}}" height="{{height}}">{{/wordmark}}

                   {{^wordmark}}<h1>{{msg-sitetitle}}</h1>{{/wordmark}}

               {{/data-logos}}

               </a>

           </div>

```

Nasirkhan (talkcontribs)

anyone knows the answer?

Reply to "Skin Favicon and Logo"
UFO-Alien Database (talkcontribs)

Is it possible to migrate a wiki.fandom.com database of almost 1,000 pages to a mediawikia.org project without having to redo each page.

PerfektesChaos (talkcontribs)

Basically, yes.

For a good programmer it is no big deal to populate a wiki automatically from any external source.

There are some WMF wikis which are almost only written by automatic bot activities.

Reply to "Migrate"

Mediawiki 1.36.0 Installer not working!

3
Summary by Ciencia Al Poder
Nasirkhan (talkcontribs)

I just downloaded Mediawiki 1.36.0 and tried to install from Windows 10. And it failed to open the installation page! Here I have attached the installation page.

I would like to mention that, on this same environment i am running a Mediawiki 1.35.1

Ammarpad (talkcontribs)

You should just ignore these warnings for the meantime. This is phab:T278037

Nasirkhan (talkcontribs)
Reply to "Mediawiki 1.36.0 Installer not working!"
Nasirkhan (talkcontribs)

I need to use some fonts on my skin. Can you please let me what is the best/ recommended approach to embed an external font?


I need to add a Google Font for the text and also want to FontAwesome icon fonts to the skin.

Tanbirzx (talkcontribs)
Malyacko (talkcontribs)

@Tanbirzx The question was how to add an external font to a skin. How is your link related at all to answering that question?

Tanbirzx (talkcontribs)

@Malyacko I have just given this link for taking some needful sense about webfonts and texts. Thank you

Malyacko (talkcontribs)

@Tanbirzx The question was how to add a custom external font (!) to a skin (!). Your links do not help answer the question...

Nasirkhan (talkcontribs)

thanks @Tanbirzx for your links but unfortunately those links does not help. I have the links to google font and I know how to use in in a website. @Malyacko understands my question properly and I agree with him that those links will not help to what I asked for.


If i repeat my question here again, I need to know the recommended way to use a Google font to a mediawiki skin. I know I can use Common.css and I know there might be extensions to meet the need, but as I am developing a skin I want to add it with the skin. So I do not want to use any external approach to achieve the goal, unless using a extension is the recommended way.

Reply to "Add Webfonts to the skin"

Short URL Redirects to index.php

13
136.158.7.154 (talkcontribs)

Hi.

I am currently implementing the short url into my wiki. It works, however it does not redirect to the wiki url but the index.php file.

Everything is copied from the short url configs.

Thanks in advance.

Ciencia Al Poder (talkcontribs)
136.158.7.154 (talkcontribs)

I did copy everything.

Ciencia Al Poder (talkcontribs)
136.158.7.154 (talkcontribs)

It’s not really helping since I already told you that I copied everything.

Ciencia Al Poder (talkcontribs)

The information you provide is not helpful either to figure out what's wrong.

You can start by sharing your configuration, link to your site, etc

2404:3C00:255D:3100:0:0:0:2 (talkcontribs)

Hi,

Same user as before. Coping it led to a 404 error.

2404:3C00:255D:3100:0:0:0:2 (talkcontribs)

Here is the code:

# Enable the rewrite engine
RewriteEngine On

# Short URL for wiki pages
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]

# Redirect / to Main Page
RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L]

LocalSettings.php:

$wgScriptPath = "/w";     
$wgArticlePath = "/wiki/$1";
Ciencia Al Poder (talkcontribs)

If you manually type an index.php URL, it won't redirect to a /wiki/ URL.

The configuration purpose is:

  • The wiki will generate /wiki/ URLs on normal view links (not edit, diff, history links). This is the LocalSettings.php configuration.
  • Your webserver will recognize /wiki/ URLs and translate them into /w/index.php URLs (without a redirect, browser will stay at /wiki/). This is what the apache configuration does.

Does it work for you as I explained?

136.158.7.154 (talkcontribs)

I have done it to an article link, it still leads to a 404 error.

Ciencia Al Poder (talkcontribs)

Basically, it looks like your rewrite rules are not applied, or %{DOCUMENT_ROOT} points to the wrong location.

Try changing %{DOCUMENT_ROOT}/w/index.php to the full path of index.php (in the filesystem).ç

Also, set up some debugging to see how the rewrite is being done (or if it's being applied at all): https://stackoverflow.com/a/9632952/7268905

136.158.7.154 (talkcontribs)

It’s still the same, even with the webroot in.

Ciencia Al Poder (talkcontribs)

Debugging is your only option. Or your server is pretty broken

Reply to "Short URL Redirects to index.php"

Cargo query export to Excel or CSV gives error This page isn’t working

9
Pharmankur (talkcontribs)

Hi,

I am trying to install Mediawiki for our internal Documentation in organisation.

Product Version
MediaWiki 1.35.2
PHP 8.0.7 (apache2handler)
MariaDB 10.1.48-MariaDB-0ubuntu0.18.04.1
ICU 65.1
Lua 5.1.5

When I am setting a cargo query to output as table, it works fine. But when I set it to export results to CSV or Excel file then on clicking file download link, it shows a blank page saying --


This page isn’t working

XXX.XX.XXX.XX is currently unable to handle this request.

HTTP ERROR 500


I am sure our server is working fine, so there is no problem with it.

I also did NOT find any special settings instructions in Cargo to enable export in CSV or Excel. So I am clueless what is wrong or where to find out.

Please help !

Osnard (talkcontribs)

Hi! Are there any logs available? PHP error log for example? Please have a look at Manual:How_to_debug to learn about getting logs.

Jonathan3 (talkcontribs)

You'd definitely get an answer on the Cargo talk page.

Pharmankur (talkcontribs)

@Osnard

Hi, Php error reporting is already enabled by


<?php

error_reporting( -1 );

ini_set( 'display_errors', 1 );


@Jonathan3

Somehow I did not find any help available on setting up excel or csv export !

Osnard (talkcontribs)

An Error 500 must leave traces in the logs. Without them the error can not be fixed.

Jonathan3 (talkcontribs)

What's your Cargo query?

Pharmankur (talkcontribs)

Hi

@Osnard

With my default log setting LogLevel warn [ in /etc/apache2/apache2.conf ]

Only log entry there [ in /var/log/apache2/error.log ] is :-


[Sat Jun 19 13:24:29.712779 2021] [mpm_prefork:notice] [pid 21458] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations

[Sat Jun 19 13:24:29.712864 2021] [core:notice] [pid 21458] AH00094: Command line: '/usr/sbin/apache2'


If there is any other place to look for the logs, I am not aware.


@Jonathan3

My cargo query which works (shows a table on webpage) :-

{{#cargo_query: tables=Infobox |fields=Infobox._ID, Infobox._pageName, Infobox.Description, Infobox.01_Type_of_Document, Infobox.02_Doc_ID_No, Infobox.03_Supersede_by, Infobox.06_Effective_from_date, Infobox.07_Review_on_date, Infobox.04_For_Department, Infobox.09_Other_Info, Infobox.10_Prepared_by, Infobox.11_Checked_by, Infobox.12_Approved_by |format=table }}


But when I want the same table downloadable in excel, I am trying (and gives error in the discussion) :-

{{#cargo_query: tables=Infobox |fields=Infobox._ID, Infobox._pageName, Infobox.Description, Infobox.01_Type_of_Document, Infobox.02_Doc_ID_No, Infobox.03_Supersede_by, Infobox.06_Effective_from_date, Infobox.07_Review_on_date, Infobox.04_For_Department, Infobox.09_Other_Info, Infobox.10_Prepared_by, Infobox.11_Checked_by, Infobox.12_Approved_by |format=excel }}

Pharmankur (talkcontribs)
Jonathan3 (talkcontribs)

That's helpful. I get the same error:

This page isn’t working
www.... is currently unable to handle this request.
HTTP ERROR 500

format=csv works and can be loaded by Excel.

I wonder whether @Yaron Koren: could help here.

Reply to "Cargo query export to Excel or CSV gives error This page isn’t working"
88.109.79.246 (talkcontribs)

Please could you help? I'm trying to run the example script in locuszoom (as denoted on the manual: https://genome.sph.umich.edu/wiki/LocusZoom_Standalone) however get the following error message.


(base) clovegrove@gechco:/data/clovegrove/locuszoom/examples$ ./run_example.py

Running: /data/clovegrove/locuszoom/bin/locuszoom --metal Kathiresan_2009_HDL.txt --refgene FADS1

Traceback (most recent call last):

  File "/data/clovegrove/locuszoom/bin/locuszoom", line 26, in <module>

    from m2zfast import main

  File "/data/clovegrove/locuszoom/bin/../src/m2zfast.py", line 126

    exec "self.%s = v" % str(k)

        ^

SyntaxError: invalid syntax


Thank you!

Malyacko (talkcontribs)

Welcome to the support desk for the MediaWiki (!) software. We cannot help with potentially incorrect content on random third-party website. You may want to ask on that wiki instead.

Reply to "locuszoom"

Changing homepage name to site name per $wgSitename value

11
2001:44C8:44C8:6B18:B0B9:2D7D:C2AA:6000 (talkcontribs)

MediaWiki 1.35.2 in Hebrew.

I desire that the <h1> heading of my website's homepage would be the site name as the $wgSitename value, instead the current, default-created, generic heading עמוד ראשי (which I would translate to English as "main page").

I want to achieve that:

  • Without creating any 301 redirect
  • Without installing any addon extension

Is it possible from the core somehow, perhaps by utilizing SITENAME magic word?

Bawolff (talkcontribs)

The page named MediaWiki:Mainpage controls the "name" of the main page. Edit that page.

2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

Hello @Bawolff

I think I don't have such a page; from a search on all webpages with מדיה-ויקי: (MediaWiki:) namespace, I got:

  • מדיה ויקי:Cite references link many
  • מדיה ויקי:Cite references link one
  • מדיה ויקי:Common.css
  • מדיה ויקי:Common.js
  • מדיה ויקי:Emailsubject
  • מדיה ויקי:Sidebar
  • מדיה ויקי:Sitenotice

Furthermore, navigating to example.com/MediaWiki:Mainpage brings not found 404.


What should a user do in such a case?

Jonathan3 (talkcontribs)
2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

@Jonathan3

In the FAQ there is the section:

How do I change the Main Page title?

Simply click on the "Move" tab, and move the page to the desired page title.

Usually you also want to change which page is the configured as "main page".

This brings me back to the MediaWiki:Mainpage I mentioned above.

2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

@Jonathan3 to further clarify my point: After "moving the main page to another name" the logo links to a deleted webpage

Again, I humbly remind that I don't want to use redirects.

2001:44C8:44C8:6B18:484F:35FB:CD28:A71C (talkcontribs)

Okay,

What I did and might have solved this, was to go to Special pages --->>> System Messages and there to search for "mainpage" (without quote marks) and to edit:

  • מדיה ויקי:Mainpage
  • מדיה ויקי:Mainpage-description
  • מדיה ויקי:Mainpage-nstab

I have edited the system message for each one of them to {{SITENAME}} and saved now the logo image points to my "new" homepage with the new name;

I think that the only thing left for me to do is to also edit the sidebar menu link to point to it as well, because it's currently hard-wired to point to the "old" homepage.

Bawolff (talkcontribs)

Just to clarify a previous point, pages starting with mediawiki: (including translations) have a default value even if they don't exist, and you have to create them to change their defaults.


The default sidebar will use MediaWiki:mainpage as the link to the main page (and mediawiki:mainpage-description as the text of the link). Its possible you customized the sidebar to be hardcoded, or maybe some caching is happening, in which case a dummy edit to mediawiki:sidebar might help (or just wait a few days)

2001:44C8:44C8:6B18:F523:B14E:AB6B:5379 (talkcontribs)

@Bawolff if I am not wrong, the original value of the sidebar link was (as in the sidebar edit page):

mainpage|עמוד ראשי

I then changed it too:

mainpage|MediaWiki


It might have been something else than mainpage|עמוד ראשי but I don't recall ever changing it before my action earlier today.

2001:44C8:44C8:6B18:F523:B14E:AB6B:5379 (talkcontribs)

if I am not wrong, the original value of the sidebar link was (as in the sidebar edit page):

mainpage|עמוד ראשי

I then changed it too:

mainpage|{{SITENAME}}

It might have been something else than mainpage|עמוד ראשי but I don't recall ever changing it before my action earlier today.

2001:44C8:44C8:6B18:F523:B14E:AB6B:5379 (talkcontribs)

Added <nowiki></nowiki> tags in my second post.

Reply to "Changing homepage name to site name per $wgSitename value"