Jump to content

Project:Support desk

Add topic
From mediawiki.org
Latest comment: 6 hours ago by GpieroMW in topic Manual:Security --> == Upload security ==
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 Add topic.

编辑界面右侧预览时<syntaxhighlight>不生效

[edit]

如题,如果启用了显示预览时不重新加载页面,则点击“显示预览”出来的预览里面语法高亮也不工作 Pawsdt (talk) 04:53, 30 August 2026 (UTC)Reply

@Pawsdt: Do you have a wiki that you can point to this happening on? --MarkAHershberger(talk) 01:37, 1 September 2026 (UTC)Reply
b:zh: Pawsdt (talk) 10:33, 1 September 2026 (UTC)Reply
I cannot reproduce the problem:
--MarkAHershberger(talk) 18:31, 1 September 2026 (UTC)Reply

namespace Newsletter: english text remains but mixed with translated sentences

[edit]

On my page -> https://www.mediawiki.org/wiki/Newsletter:Translators I see a mix of french text and the Description part remains in english. I have no menu for Modify or even View source. How is it possible to have the equivalent text translated coherently according to user interface language ? Thanks. -- 08:35, 31 August 2026 (UTC) 🚨 Christian 🇫🇷 FR (talk) 08:35, 31 August 2026 (UTC)Reply

If you switch the interface language to French, you'll see the parts of the page supplied by MediaWiki displayed as French. If the page is marked for translation (and the page has been completely translated to French), you'll automatically be shown the French sub-page.
I'm not sure how well translation works for pages in the Newsletter namespace, but, seeing that @Siebrand: created the Newsletter extension, I would expect that you can translate newsletters. However, clicking through on the edit source for newsletters, it looks like they may not have that support. Looking at phabricator, it looks like this was requested. --MarkAHershberger(talk) 01:16, 1 September 2026 (UTC)Reply

关于语法高亮/About Grammar Highlights

[edit]

{{{{{|safesubst:}}}#if: }}应该显示为/should be shown as{{{{{|safesubst:}}}#if: }}Pawsdt (talk) 14:21, 31 August 2026 (UTC)Reply

You have used different CSS classes (e.g., "cm-mw-template-bracket cm-mw-template-ground" for the first bracket vs "cm-mw-parserfunction-bracket cm-mw-parserfunction-ground" for the second bracket) and you expect them to be displayed the same? Then you should edit your CSS so that they are.
It would help if you provided a link to where you were seeing this. It does not sound like a MediaWiki issue. --MarkAHershberger(talk) 01:26, 1 September 2026 (UTC)Reply
我认为应该这么显示(#if是一个解析器函数而非模板)。就Extension:CodeMirror的语法高亮。 Pawsdt (talk) 10:35, 1 September 2026 (UTC)Reply
Please create an issue in phabricator for this. --MarkAHershberger(talk) 19:40, 1 September 2026 (UTC)Reply

Couldn't go to my self-hosted wiki

[edit]

I downloaded the latest version of MediaWiki from the downloads, and after i did the usual setup, i went to the wiki page, but then suddenly i see "LocalSettings.php not found." and the version number was 1.39.7, which is 2 years old. So what's going on? I downloaded the right version from the official download page so idk. Wikipedian2025 (talk) 14:38, 2 September 2026 (UTC)Reply

@Wikipedian2025: It sounds like you are looking at an old version of your wiki. Did you back it up before you started? --MarkAHershberger(talk) 15:01, 2 September 2026 (UTC)Reply

Table rendering issue—compound multi-row header, action=render differs: anon vs logged-in

[edit]

I initally posted to Project:Village_Pump#Table_render_(action=render),_for_nested_header,_differs_based_on_logged-in/-out_status, but it seems more like a software issue that a site-specific concern.

I'm not sure how to diff this issue further. safemode=1, and explicit useskin=vector-2022

Screenshot

[edit]
Correct table render? Logged-in / anon Options action=render, correctly?
default safemode useskin
Yes anon Yes - - Yes
No logged-in No - - No

Other experiments

[edit]
Correct table render? Logged-in / anon Options action=render, correctly?
default safemode useskin
No logged-in Yes - - No
No logged-in No Yes - No
No logged-in No - Yes No
No logged-in No Yes Yes No

-- Mcint (talk) 20:01, 2 September 2026 (UTC)Reply

I believe an installed browser extension is at fault, chrom*:table-sort-js -- Mcint (talk) 21:53, 2 September 2026 (UTC)Reply

what do we apply to translate a block of code comments

[edit]

In -> https://www.mediawiki.org/w/index.php?title=Help:Extension:Translate/Configuration&diff=next&oldid=8592063 the user has split a TU of a block of comments in as many lines as present in the block.

I have proposed the block to be a single TU. The advantage are :

- according to the recommendtions, we avoid a patchwork of translations
- the TU is coherent by itself
- if the translated sentence is too long because you cannot always follow the terms in the translated language, translators may add additional lines reporting the initial indentation 
- you avoid orphan terms on single lines.
A contrario, the presentation of the TU is a bit ugly since it includes the original indentation structure.

Section -> https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Code_comments is too poor on this subject and should be developped to avoid edit wars.

What is the best ? Thanks -- 🚨 Christian 🇫🇷 FR (talk) 19:33, 5 September 2026 (UTC)Reply

The part detailing the Translate extension configuration options was never meant to be translated. It's even 10 years outdated now. Please let's just remove it completely you cannot leave it untranslated.
Bigger point is that substantial text on a page should not be in code comments. Nikerabbit (talk) 11:07, 8 September 2026 (UTC)Reply

edition: need to see tag indentation error message in the Preview session

[edit]

As a transadmin, when I request the Preview of a page where tags <translate> are not correctly indented, I display the result and I must peek among all pairs to understand where the error could be.
Now on the other side, if I copy the text in the sandbox of the project (left side link) and I request immediate Save, I see the helpful message :

L’imbrication de balises <translate> n’est pas autorisée.
Contenu de la balise :
For syck we're shelling out to perl. <translate nowrap>So you need:...

which allows me to find immediately where the mismatch is located.
It would be nice to have this message displayed in the preview pass. Advice ? Thanks. -- 🚨 Christian 🇫🇷 FR (talk) 11:03, 7 September 2026 (UTC)Reply

How to migrate existing files to a different format while preserving file history?

[edit]

Hello!

I have a fairly old wiki that is currently running MediaWiki 1.46.0. It contains a large number of old files with their own wiki history. Since there are quite a lot of these files now, I would like to migrate them to formats that can reduce their file sizes and save storage space.

Are there any ways to migrate, for example, from PNG to WebP? (There are more possible source formats, and the target format is not important at this point.)

I have tried the following approaches, but neither worked:

1. Temporarily moving File:image.png to File:image.webp is not possible, as it results in an error stating that the file extension does not match its contents:

 You do not have permission to move this page, for the following reason:
 The new file extension does not match its type.

2. Uploading a WebP file to the server as a new version of File:image.png also does not work:

 File extension ".png" does not match the detected MIME type of the file (image/webp).

I would appreciate any information on how to migrate existing files to newer formats while preserving their file histories, as well as any advice on how this could be done in bulk.

Thank you! ~2026-48657-84 (talk) 18:52, 8 September 2026 (UTC)Reply

I wonder whether you could turn MIME type checking off. See Manual:MIME type detection and Manual:Configuring file uploads. The latter mentions Manual:$wgStrictFileExtensions which led me to Manual:$wgCheckFileExtensions, which in turn led me to Manual:$wgVerifyMimeType! Then upload the new file, then move/rename the wiki page (if that's not done automatically). Jonathan3 (talk) 18:59, 11 September 2026 (UTC)Reply
[edit]

Hi,

It looks like the link below leads to a page that does not exist.

Could someone please check it, please?

Regards

GpieroMW

https://owasp.org/index.php/PHP_Security_Cheat_Sheet

GpieroMW (talk) 13:11, 11 September 2026 (UTC)Reply

Hi,
could be this one the proper link?
https://cheatsheetseries.owasp.org/cheatsheets/PHP_Configuration_Cheat_Sheet.html
Regards GpieroMW (talk) 13:31, 11 September 2026 (UTC)Reply
fixed... thanks! --MarkAHershberger(talk) 18:25, 11 September 2026 (UTC)Reply

Manual:Security | T:78

[edit]

Hi,

I would need some clarification about the string below. Is it a link? The page with that name appears to have been deleted. How should the string be understood?

Regards

"MediaWiki: namespace" GpieroMW (talk) 15:38, 12 September 2026 (UTC)Reply

No, it is referring to the "Mediawiki" namespace as opposed to "Main" or "Help" or "Translation" etc. --Clump (talk) 17:11, 12 September 2026 (UTC)Reply
thanks GpieroMW (talk) 06:10, 13 September 2026 (UTC)Reply

https://www.mediawiki.org/wiki/Help:Wikitext_examples/it

[edit]

Hi,

I suggest that this page be deleted. It appears to be 100% translated into Italian, but most of the content is actually in English, and some sections are not readable in Italian.

Thanks,

Regards GpieroMW (talk) 06:17, 13 September 2026 (UTC)Reply

Mosta are english, because original page is not prepared for translation. Could you fix these bad translations? wargo (talk) 06:59, 13 September 2026 (UTC)Reply

Manual:Security --> == Upload security ==

[edit]

Hi,

before T:89 some tag <translate></translate> seems to be missing as showed below:

thanks

>If you receive an error when reloading Apache with the config and the error log says "Invalid command 'Header'" you may need to enable the headers module. You can do so by running a2enmod headers.<


Regards GpieroMW (talk) 16:15, 13 September 2026 (UTC)Reply