Jump to content

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

"Use non-JavaScript interface" in "Recent changes" as default?

1
Spiros71 (talkcontribs)

Can this be done? MW 1.39

Reply to ""Use non-JavaScript interface" in "Recent changes" as default?"

Error 1062: Duplicate entry 'en-messages:apihelp-query+revisions-example-first5-not-localhost' for key 'PRIMARY'

1
Spiros71 (talkcontribs)

I get this error (and similar ones, different every time) when I try to edit or view a page (but not all the time). This appeared first after enabling Cirrus search.

I reran update.php and composer.

Product Version
MediaWiki 1.39.10
PHP 8.1.30 (fpm-fcgi)
MariaDB 10.6.19-MariaDB-log
ICU 69.1
Lua 5.1.5
Pygments 2.11.2
Elasticsearch 7.10.2
Error 1062: Duplicate entry 'en-messages:apierror-appendnotsupported' for key 'PRIMARY'
Function: LCStoreDB::finishWrite
Query: INSERT INTO `l10n_cache` (lc_lang,lc_key,lc_value) VALUES ('en','messages:apierror-appendnotsupported',.....
Original exception: [ZwrlgCP9iyJSkMwGD7x5WwAEiQU] /index.php?title=%CF%80%CE%B5%CE%BD%CE%B9%CE%BA%CE%B9%CE%BB%CE%AF%CE%BD%CE%B7&action=edit TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given
Backtrace:
from public_html/includes/language/Language.php(627)
Error 1062: Duplicate entry 'en-messages:exif-flashpixversion' for key 'PRIMARY'
Function: LCStoreDB::finishWrite
Error 1062: Duplicate entry 'en-messages:recentchanges-label-plusminus' for key 'PRIMARY'
Function: LCStoreDB::finishWrite
Query: INSERT INTO `l10n_cache` (lc_lang,lc_key,lc_value) VALUES ('en','messages:recentchanges-label-plusminus','s:48:\"en:The page size changed by this number of 
Error 1062: Duplicate entry 'en-messages:apihelp-query+revisions-example-first5-not-localhost' for key 'PRIMARY'
Function: LCStoreDB::finishWrite
Query: INSERT INTO `l10n_cache` (lc_lang,lc_key,lc_value) VALUES ('en','messages:apihelp-query+revisions-example-first5-not-localhost','s:117:\"en:Get first 5 revisions of the [[{{MediaWiki:Mainpage}}]] that were not made by anonymous user <kbd>127.0.0.1</kbd>.\";'),('en','messages:apihelp-query+revisions-example-first5-user','s:115:\"en:Get first 5 revisions of the [[{{MediaWiki:Mainpage}}]] that were made by the user <kbd>MediaWiki default</kbd>.\";'),('en','messages:apihelp-query+revisions+base-param-prop','s:45:\"en:Which properties to get for each revision:\";'),

.....

Backtrace:

from public_html/includes/libs/rdbms/database/Database.php(1618)
#0 public_html/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException(string, integer, string, string)
#1 public_html/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#2 public_html/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#3 public_html/includes/libs/rdbms/database/Database.php(1838): Wikimedia\Rdbms\Database->query(string, string, integer)
#4 public_html/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->insert(string, array, string)
#5 public_html/includes/libs/rdbms/database/DBConnRef.php(382): Wikimedia\Rdbms\DBConnRef->__call(string, array)
#6 public_html/includes/language/LCStoreDB.php(98): Wikimedia\Rdbms\DBConnRef->insert(string, array, string)
#7 public_html/includes/language/LocalisationCache.php(1136): LCStoreDB->finishWrite()
#8 public_html/includes/language/LocalisationCache.php(544): LocalisationCache->recache(string)
#9 public_html/includes/language/LocalisationCache.php(453): LocalisationCache->initLanguage(string)
#10 public_html/includes/language/LocalisationCache.php(352): LocalisationCache->loadSubitem(string, string, string)
#11 public_html/includes/language/MessageCache.php(722): LocalisationCache->getSubitem(string, string, string)
#12 public_html/includes/language/MessageCache.php(1235): MessageCache->isMainCacheable(string, string)
#13 public_html/includes/language/MessageCache.php(1126): MessageCache->getMsgFromNamespace(string, string)
#14 public_html/includes/language/MessageCache.php(1097): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)
#15 public_html/includes/language/MessageCache.php(1039): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)
#16 public_html/includes/language/Message.php(1473): MessageCache->get(string, boolean, LanguageEn)
#17 public_html/includes/language/Message.php(1122): Message->fetchMessage()
#18 public_html/extensions/CirrusSearch/includes/Hooks.php(204): Message->isDisabled()
#19 public_html/includes/libs/objectcache/BagOStuff.php(216): CirrusSearch\Hooks::CirrusSearch\{closure}(integer)
#20 public_html/extensions/CirrusSearch/includes/Hooks.php(208): BagOStuff->getWithSetCallback(string, integer, Closure)
#21 public_html/extensions/CirrusSearch/includes/Hooks.php(104): CirrusSearch\Hooks::overrideMoreLikeThisOptionsFromMessage()
#22 public_html/extensions/CirrusSearch/includes/Hooks.php(76): CirrusSearch\Hooks::initializeForRequest(WebRequest)
#23 public_html/includes/HookContainer/HookContainer.php(338): CirrusSearch\Hooks::onBeforeInitialize(Title, NULL, OutputPage, User, WebRequest, MediaWiki)
#24 public_html/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#25 public_html/includes/HookContainer/HookRunner.php(938): MediaWiki\HookContainer\HookContainer->run(string, array)
#26 public_html/includes/MediaWiki.php(208): MediaWiki\HookContainer\HookRunner->onBeforeInitialize(Title, NULL, OutputPage, User, WebRequest, MediaWiki)
#27 public_html/includes/MediaWiki.php(904): MediaWiki->performRequest()
#28 public_html/includes/MediaWiki.php(562): MediaWiki->main()
#29 public_html/index.php(50): MediaWiki->run()
#30 public_html/index.php(46): wfIndexMain()
#31 {main}
[ZwrwvGH_bMozWQZTb7-w8gABTwI] /wiki/%E1%BC%80%CE%BC%CF%86%CE%BF%CF%84%CE%AD%CF%81%CF%89%CE%B8%CE%B5%CE%BD TypeError: CLDRPluralRuleParser\Evaluator::evaluateCompiled(): Argument #2 ($rules) must be of type array, null given, called in public_html/includes/language/Language.php on line 4847

Backtrace:

from public_html/vendor/wikimedia/cldr-plural-rule-parser/src/Evaluator.php(58)
#0 public_html/includes/language/Language.php(4847): CLDRPluralRuleParser\Evaluator::evaluateCompiled(integer, NULL)
#1 public_html/includes/language/Language.php(3982): Language->getPluralRuleIndexNumber(integer)
#2 public_html/includes/parser/CoreParserFunctions.php(413): Language->convertPlural(integer, array)
#3 public_html/includes/parser/Parser.php(3439): CoreParserFunctions::plural(Parser, integer, string, string)
#4 public_html/includes/parser/Parser.php(3124): Parser->callParserFunction(PPFrame_Hash, string, array)
#5 public_html/includes/parser/PPFrame_Hash.php(275): Parser->braceSubstitution(array, PPFrame_Hash)
#6 public_html/includes/parser/Parser.php(2953): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#7 public_html/includes/parser/Parser.php(961): Parser->replaceVariables(string, PPFrame_Hash)
#8 public_html/includes/parser/Parser.php(4922): Parser->preprocess(string, Title, ParserOptions)
#9 public_html/includes/language/MessageCache.php(1359): Parser->transformMsg(string, ParserOptions, Title)
#10 public_html/includes/language/Message.php(1456): MessageCache->transform(string, boolean, LanguageEn, Title)
#11 public_html/includes/language/Message.php(1009): Message->transformText(string)
#12 public_html/includes/language/Message.php(1053): Message->format(string)
#13 public_html/includes/skins/Skin.php(621): Message->text()
#14 public_html/includes/skins/SkinTemplate.php(764): Skin->getCategoryLinks()
#15 public_html/includes/skins/Skin.php(667): SkinTemplate->getCategoryLinks()
#16 public_html/includes/skins/SkinTemplate.php(259): Skin->getCategories()
#17 public_html/includes/skins/SkinTemplate.php(146): SkinTemplate->prepareQuickTemplate()
#18 public_html/includes/skins/SkinTemplate.php(177): SkinTemplate->generateHTML()
#19 public_html/includes/OutputPage.php(2876): SkinTemplate->outputPage()
#20 public_html/includes/MediaWiki.php(922): OutputPage->output(boolean)
#21 public_html/includes/MediaWiki.php(562): MediaWiki->main()
#22 public_html/index.php(50): MediaWiki->run()
#23 public_html/index.php(46): wfIndexMain()
#24 {main}
Reply to "Error 1062: Duplicate entry 'en-messages:apihelp-query+revisions-example-first5-not-localhost' for key 'PRIMARY'"

Recent changes on MobileFrontend

4
Flounder ceo (talkcontribs)

Recent changes screen shows "Unfortunately, grouping results by page is not available on mobile. If you would like to use the group by page feature, please visit the desktop site."

This message fills most of the landing screen on mobile and detracts from the user experience. How can I get rid of it?

Ammarpad (talkcontribs)
Flounder ceo (talkcontribs)

Thank you. That worked for me. Is there a way to change the default behavior all users?

Ammarpad (talkcontribs)
Reply to "Recent changes on MobileFrontend"

Problemas con tildes en mi wiki

3
Mmtorou (talkcontribs)

Buenas tardes. Me pasa que en mi wiki, las páginas cuyos nombres contienen tildes me aparecen vacías o me muestran error. Yo asumo que es un problema de configuración pero no se como solucionarlo. Estoy actualizando a la versión 1.39.8 para luego hacerlo a la 1.42.1. Muchas gracias.

I have a problem with the pages in my wiki whose names contain accents, which appear empty or show me an error. I assume it is a configuration problem, but I don't know how to fix it. I am updating to version 1.39.8 and then to 1.42.1. Thank you very much.

Bawolff (talkcontribs)

It would help if you said what the error you got is.

Mmtorou (talkcontribs)

Los links de la izquierda en la página principal cuyos nombres contienen tildes (topónimos y bibliografía por ejemplo) llevan a páginas en blanco. De igual manera algunos links con tildes, diéresis o ñ aparecen en blanco, no muestra el texto del link. Esto pasó luego de la actualización de la versión 1.34.0 ala 1.39.8.

Reply to "Problemas con tildes en mi wiki"

How can you report a user account on here?

2
2601:195:C281:D40:5585:154B:295C:D938 (talkcontribs)

The Atlantia wiki page has had a user adding what appears to be chatGPT generated advertising, and posting it as pages there. Is there any way to report a user for this? What is MediaWiki doing to prevent this from happening?

Samwilson (talkcontribs)

Are you talking about the English Wikipedia page Atlantia? It doesn't look like there's been any changes there lately.

Anyway, wherever the page is that you're concerned about, you need to ask on that wiki. This is MediaWiki.org, the wiki relating to the software that runs other wikis. So we can't help you here.

Reply to "How can you report a user account on here?"

Someone could help me to fix?

3
79.148.155.12 (talkcontribs)

Deprecated: FatalError overrides getHTML which was deprecated in MediaWiki 1.42. [Called from MWExceptionHandler::report in C:\xampp\htdocs\includes\exception\MWExceptionHandler.php at line 127] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

Deprecated: FatalError overrides getText which was deprecated in MediaWiki 1.42. [Called from MWExceptionHandler::report in C:\xampp\htdocs\includes\exception\MWExceptionHandler.php at line 127] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

Deprecated: Use of MWException::reportHTML was deprecated in MediaWiki 1.42. [Called from MWException::report in C:\xampp\htdocs\includes\exception\MWException.php at line 225] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

Deprecated: Use of MWException::getPageTitle was deprecated in MediaWiki 1.42. [Called from MWException::reportHTML in C:\xampp\htdocs\includes\exception\MWException.php at line 198] in C:\xampp\htdocs\includes\debug\MWDebug.php on line 379

$wgServer must be set in LocalSettings.php. See https://www.mediawiki.org/wiki/Manual:$wgServer.

TheDJ (talkcontribs)

Deprecation warnings are expected. If you want to disable deprecation warnings, you should configure php to ignore deprecation warnings by modifying php.ini and setting error_reporting to explicitly ignore deprecation warnings like so:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

Bawolff (talkcontribs)

The only important one here is $wgServer. Set it in LocalSettings.php like the message says

Reply to "Someone could help me to fix?"

IntlException: Constructor failed on new instance

7
TheKtk (talkcontribs)

Hi MediaWiki team,

I'm trying to upgrade an old 1.22 version of MediaWiki on a new server of mine. I'm running MediaWiki on FreeBSD for years, so far without any issues. On the new server however I seem to run into issues I really can't wrap my head around so I though I'll start a new install to see if I get there without upgrading from a super old LocalSettings.php.

I tried several versions of MediaWiki meanwhile, including the last LTS version (mediawiki-1.39.8) and the latest one (mediawiki-1.42.). In every case the installer starts & asks for the language. As soon as I select it, I get this error:

[c60a54151a3ddda7467158ca] /mw-config/index.php?page=Welcome IntlException: Constructor failed

Backtrace:

from /data/httpd/netlabs.org/vwiki/includes/language/Language.php(3236)

#0 /data/httpd/netlabs.org/vwiki/includes/language/Language.php(3236): NumberFormatter->__construct()

#1 /data/httpd/netlabs.org/vwiki/includes/language/Language.php(3179): Language->formatNumInternal()

#2 /data/httpd/netlabs.org/vwiki/includes/parser/Parser.php(4315): Language->formatNum()

#3 /data/httpd/netlabs.org/vwiki/includes/parser/Parser.php(1647): Parser->finalizeHeadings()

#4 /data/httpd/netlabs.org/vwiki/includes/parser/Parser.php(723): Parser->internalParse()

#5 /data/httpd/netlabs.org/vwiki/includes/installer/Installer.php(781): Parser->parse()

#6 /data/httpd/netlabs.org/vwiki/includes/installer/WebInstallerOutput.php(100): Installer->parse()

#7 /data/httpd/netlabs.org/vwiki/includes/installer/WebInstallerWelcome.php(31): WebInstallerOutput->addWikiTextAsInterface()

#8 /data/httpd/netlabs.org/vwiki/includes/installer/WebInstaller.php(270): WebInstallerWelcome->execute()

#9 /data/httpd/netlabs.org/vwiki/mw-config/index.php(82): WebInstaller->execute()

#10 /data/httpd/netlabs.org/vwiki/mw-config/index.php(40): wfInstallerMain()

#11 {main}


Strangely there is nothing logged to the apache error log of that vhost, it's really all I have.

I found exactly one result when I search for that error and it was not related to MediaWiki. Then I though it might be because I have PHP 8.2 which according to the install instructions is not the best tested version. So I changed mod_php & all modules to 8.1 but I get the exact same error.

So I'm really running out of ideas here. No entry in my apache logs, no additional context for this error and almost no results for the error, especially in context of MediaWiki. It's a new FreeBSD 14.1 server with Apache24, MySQL & PHP.

Anyone has some ideas of what I could check to get this fixed?

Thanks for the support & all the work over decades with MediaWiki!

Bawolff (talkcontribs)

It seems like this is probably something wrong with how php is configured. There are some reports that this happens if php's date.timezone is set incorrectly.


Intl is at the php level, so the error will probably still be there for different versions of mediawiki.

TheKtk (talkcontribs)

That was indeed a good hint, but unfortunately I couldn't solve it yet. But I created a minimal testcase:

<?php

// Set the locale to test

$locale = 'en_US.UTF-8';

// Check if Intl extension is loaded

if (!extension_loaded('intl')) {

  die("Intl extension is not loaded!\n");

}

// Display the current locale settings

echo "Current locale: " . setlocale(LC_ALL, 0) . "\n";

// Test the Intl NumberFormatter

try {

  $formatter = new NumberFormatter($locale, NumberFormatter::DECIMAL);

  echo "Number formatting test: " . $formatter->format(12345.67) . "\n";

} catch (Exception $e) {

  echo "IntlException: " . $e->getMessage() . "\n";

}

?>

on cli php this outputs:

Current locale: C/C.UTF-8/C/C/C/C

Number formatting test: 12,345.67

and in Apache:

Current locale: C/C.UTF-8/C/C/C/C

IntlException: Constructor failed

I have no idea why though, even tried setting locale in Apache itself and phpinfo reports all as expected.

Will follow up here once I hopefully figure out what's wrong.

Bawolff (talkcontribs)

Try comparing your cli php.ini file and your apache php.ini file and check what differs between them.

2001:1620:B12:1:D80F:F21C:5DC8:8F29 (talkcontribs)

According to phpinfo() they both use the same file. That's why I am so confused.

TheKtk (talkcontribs)

Found the problem, that was a stupid error on my side...

Got the hint to add intl_get_error_message() and then got an even weirder error I couldn't understand. Now it took me a few days of thinking about it and figuring out that in a totally unrelated issue, I managed to accidentally f-up permissions on some directories, among other on "lib".

So poor apache runs on www and couldn't read lib anymore, which lead to this super esoteric error. And because my tests on cli were as root, I couldn't reproduce the problem on the same machine.

So all good, neither locale nor any other problem, just me killing read access on the "lib" dir for poor apache.


Thanks anyway for the hints, the path lead me to the fix :)

Bawolff (talkcontribs)

Glad to hear you got it working. Kind if weird php does not give a better error for that.

Reply to "IntlException: Constructor failed on new instance"

MediaWiki docker container behind NGINX Proxy Manager (also a docker container) works but can't use edit button

7
Summary by 107.77.211.11

Duydyd

ScarUY (talkcontribs)

As described in the title, managed to getting working with this but if I try to use the "edit" in the main page I get:

"Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK"

I can edit if I enter the URL manually, like"/index.php?title=Main_page&action=edit"

It does allow me to open the code editor, just not the normal editor, and I have no Idea where to go from here.

Both docker containers are running rootless in the same Debian host, I have the company DNS pointing at the docker host for "mywiki.ourdomain.com" and I have our certs loaded in NPM so for the lan this web is seen as secure by all browsers, this is an internal wiki and it will always be only in the lan.

Thank you all in advance.

TheDJ (talkcontribs)

The server needs to connect to itself. As documented on the Parsoid page, you have to configure $wgVirtualRestConfig['modules']['parsoid'], so that it knows to connect internally, instead of externally to itself.

ScarUY (talkcontribs)

Thank you for your answer, although it seems way over my head, the $wg you're referring to is under the title "Linking a developer checkout of Parsoid", and I'm no programmer so I don't understand how to begin to adapt that to my situation, as far as I understand, I don't have a Parsoid instance other than the one included in the mediawiki docker, I have no idea what modules it refers to, and thus I've advanced very little (at least I know the general direction of where the problem lies), care to elaborate a bit on how I should solve my problem, or point me to somewhere where this is a bit more plainly explained or has more examples?

I don't want to sound bad, but putting a wiki behind a reverse proxy seems to me a pretty common thing, so perhaps I missed something in the documentation or the documentation is missing something about the config necessary behind reverse proxies?

Bawolff (talkcontribs)

On the bright side, i think this requirement is going away in a future version of MediaWiki. The following only applies if using the VisualEditor extension.

So if from within the container your web server is accessible at 127.0.0.1 on port 8080 on plain http you would do something like:

$wgVirtualRestConfig['modules']['parsoid'] = [ 'url' => 'http://127.0.0.1:8080' ];
ScarUY (talkcontribs)

I jumped to the LocalSettings.php the moment I saw your message...

I didn't willingly installed parsoid, I only found about its existence when reading TheDJ's answer, I think I just marked the option "VisualEditor" in the initial setup, had I known that, or had I read some kind of warning, I wouldn't have marked it, I didn't expected it'll cause me (and you reading this) so mucho trouble.

In any case since my docker-compose states "ports: - 8280:80" I'm assuming I have to change the 'http://127.0.0.1:8080' for 'http://127.0.0.1:80', but neither worked (I rebuilt the container after each change) , naturally I also uncommented "wfLoadExtension( 'VisualEditor' );" before trying your suggestion.

Since we're using this wiki with the "classic" editor, I'll just leave it commented and as soon as I can I'll spin up another identical container to try some more, (if I keep taking this one down I'll be in trouble).

Thank you for your time, and a humble suggestion, while this is neccesary (you said it's going away in future versions) shouldn't be a note somewhere about it? There's no way I would have linked the "VisualEditor" and "Parsoid" without TheDJ's comment, even after I enabled some more verbose errors! The proxy section in the help/manual ($wgCdnServers) says nothing about the VisualEditor or Parsoid, thet could use some improvement!

TheDJ (talkcontribs)

> says nothing about the VisualEditor or Parsoid, that could use some improvement!

well this is a wiki, so…. Go right ahead !

ScarUY (talkcontribs)

Gladly! As soon as I know what to put there, I still don't know much more than "be carefull when first time boioting mediawiki as a docker container, if you mark the "VisualEditor" option you'll require aditional configuration in your localsettings.php otherwise you won't be able to edit behind a reverse proxy with https" and I don't think that'll be of much help to anyone but to scare or discourage new users, it'll be just warning about a (I hope) solvable problem without offering a solution, and as far as I've read here, that's not the spirit of this project.

Reply to "MediaWiki docker container behind NGINX Proxy Manager (also a docker container) works but can't use edit button"

All image uploads are blank

2
Robstar1 (talkcontribs)

I am running Mediawiki 1.42.3 on a Linux system. I just configured file uploads which works fine. Uploading works and the images arrive at the backend but when I insert them into a page I only get a blank (white) image with the html missing image icon. Then when I try to select them from the search tab they also display with the missing image icon.

TheDJ (talkcontribs)

well that means that thumbnails are not being generated. Often when you open the image url directly, and then use the web inspector, you will be able to find an error being returned by the webserver. That's your starting point for Manual:How to debug

Reply to "All image uploads are blank"

Searchindex table is empty

1
138.43.109.247 (talkcontribs)

I am running Mediawiki on raspberry pi using postgresql as a database. I've migrated this wiki from a linux server where I had it running for a few years in the past. After migration I noticed that the searches for not return expected results. After doing some research I noticed that the searchindex table is empty. Tried to run rebuildtextindex.php but I get "This script is not needed when using Postgres." Any pointers on how to fix this would be greatly appreciated.

Reply to "Searchindex table is empty"