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

Extension causes wiki to crash (with specific languages)

2
JacoboTheFurst3366 (talkcontribs)

I'm attaching a bug report that I reported it in phabricator Auth_remoteuser project. There I was told that I should perhaps post it here, as there it seemed that no calls from the extension appeared in the stack trace.

After installing MediaWiki 1.41.1 on a server (Vector skin, MySQL database, language: ES) and making sure installation works fine, I installed Auth_remoteuser (for release 1.41).

Then the wiki crashes. You can see top bar (with correct logged user) and left sidebar. But content area shows internal error (stack trace included later).

Removing the extension, installation works fine again. Instead of removing it, simply changing language to EN causes installation to work fine also. Returning to ES it crashes again.

Some languages tried: ES and FR crash. EN, IT, RU work fine.

All the tried languages work fine if the extension is removed.

For other details or stack trace: https://phabricator.wikimedia.org/T366986

Bawolff (talkcontribs)

I wasn't able to reproduce when i tried, but multiple people have reported this (most without any extensions). Is there anything else unique about your setup?


If you want to try stuff, does removing line 589 of extensions/Auth_Remoteuser/src/UserNameSessionProvider.php have any effect on the error message? (This isnt a fix, just an attempt to understand what is happening)

Reply to "Extension causes wiki to crash (with specific languages)"
2A02:A03F:66D9:F301:512D:41C:6D44:DFFF (talkcontribs)

Hello everyone !

I recently installed mediawiki with the 'Parser' extension.

But when I try to log in to my wiki, I get this error :

"[ZkDhPaXGad5SVb3nIP2RQAAAAAM] /wiki_test2/index.php?title=Accueil MWException: Parser state cleared while parsing. Did you call Parser::parse recursively? Lock is held by: #0 /var/www/alternc/t/titouan/www/queernet.xyz/wiki_test2/includes/parser/Parser.php(882): Parser->lock()"

Does anyone have an idea what might be causing this ?

Thanks :)

Bawolff (talkcontribs)

I have never heard of an extension named "Parser". Presumably the extension is broken.

2A02:A03F:66D9:F301:512D:41C:6D44:DFFF (talkcontribs)

i think the extension is called ParserFunctions. its under the Syntax Analyser Add-ons options when you install mediawiki

Bawolff (talkcontribs)

There is a very big difference between "Parser" and "ParserFunctions".

Normally the error message should be longer then that. The rest of the error message likely provides information on the cause of the problem.

Syntax Analyzer Add-ons is not a product we make (nor have i ever heard of it). If you are having trouble with a third party distribution of MediaWiki, consider using the official version at Download. The amount of help we can provide for unofficial distributions made by third parties is limited.

2A02:A03F:66D9:F301:2D10:2604:D876:5217 (talkcontribs)

Hey,

I don't think this is a third party issue since I downloaded via the official mediawiki site. However I might have gotten the name of the categories wrong since I installed it in French (it was called 'greffons d'analyseur syntaxique') and I'm not sure what the English name is.

The whole error message is pretty long so I'm going to spilt it to avoid getting blocked. Here is the first part :

[ZkIaXNlSSMkzRXDjL4XVsgAAACk] /wiki_test2/index.php?title=Accueil MWException: Parser state cleared while parsing. Did you call Parser::parse recursively? Lock is held by: #0 /var/www/alternc/t/titouan/www/queernet.xyz/wiki_test2/includes/parser/Parser.php(882): Parser->lock()

2A02:A03F:66D9:F301:2D10:2604:D876:5217 (talkcontribs)
Bawolff (talkcontribs)

I did not get the error when going to your site (maybe it only happens if not logged in), but the image of the error was what i needed.

I think its unlikely that this error has anything to do with the ParserFunctions extension.

Can you double check to make sure that your version of vector skin is the correct version for your wiki? Does the error message happen on other skins too or just vector?

If that doesn't work, i would suggest disabling all skins & extensions, then re-enabling them one by one to see if a specific extension/skin is causing it.

P.s. if there is something you're not sure what the english name of is, just also include the french name.

Titouan315 (talkcontribs)

Hi !

Sorry for getting back to you after so much time.

It is indeed only when you log in that you get the error.

I have tried changing skins and the error persits with every skin.

I have also tried disabling all extensions but even with all of them disabled, I was still getting the error.

I have also tried downloading media wiki again without extensions but that didn't work either.

Do you have any other idea as to what might cause the issue?

Bawolff (talkcontribs)

Weird, you are the second person to report this , both on the french localization. Maybe there is a MediaWiki bug here.

Bawolff (talkcontribs)

See further discussion at phab:T366986. Multiple people have reported this, all using languages with grammatical gender (french, spanish), but we are having trouble reproducing the issue ourselves. If you can think of anything that makes your wiki unique, please tell us in order to help us track down this issue.

Reply to "parser error"
Jef-unc (talkcontribs)

Hi team,

I've installed mediawiki from the official download link (https://releases.wikimedia.org/mediawiki/1.41/mediawiki-1.41.1.tar.gz). Environment is PHP.8.2.19 and MySQL 8.2

All seems great until I try to switch language to French or Canadian French then comes a message

[ace29be1f11173093572d0ca] /index.php?title=Sp%C3%A9cial:Pr%C3%A9f%C3%A9rences&useskin=vector&wprov=vctw1 MWException: Parser state cleared while parsing. Did you call Parser::parse recursively? Lock is held by: #0 C:\www\mediawiki\includes\parser\Parser.php(882): Parser->lock()

#1 C:\www\mediawiki\includes\parser\Parser.php(4821): Parser->preprocess('Votre page d\xE2\x80\x99...', Object(MediaWiki\Title\Title), Object(ParserOptions)) ....


Backtrace:

from C:\www\mediawiki\includes\parser\Parser.php(6309)

#0 C:\www\mediawiki\includes\parser\Parser.php(882): Parser->lock()

#1 C:\www\mediawiki\includes\parser\Parser.php(4821): Parser->preprocess(string, MediaWiki\Title\Title, ParserOptions)

#2 C:\www\mediawiki\includes\language\MessageCache.php(1442): Parser->transformMsg(string, ParserOptions, MediaWiki\Title\Title)

#3 C:\www\mediawiki\includes\language\Message.php(1464): MessageCache->transform(string, boolean, Language, MediaWiki\Title\Title)

#4 C:\www\mediawiki\includes\language\Message.php(1011): Message->transformText(string)

#5 C:\www\mediawiki\includes\language\Message.php(1059): Message->format(string)

#6 C:\www\mediawiki\includes\linker\Linker.php(2207): Message->text()


Any idea ?

Bawolff (talkcontribs)

What extensions do you have installed. Does it still happen if all extensions are disabled?

Does this only happen on Special:Preferences or all pages?

Jef-unc (talkcontribs)

No extension at all or default extensions brings the same result.

It seems to be the on every page and further the markups are not interpretated anymore (such as the sitename that renders as {{ SlTENAME }}and not the site name by itself)

Bawolff (talkcontribs)

By any chance does the error message go on longer than that?

Bawolff (talkcontribs)

Huh, you are the second person to report this issue. Both of you were using the french localization. I wonder if there is a MW bug here.

Jef-unc (talkcontribs)

Here is the complete error message. I've also tried with other skins than default and same result. I wonder about some issue with the Parser.php or with language data (bad escape sequences for apostrophs may be ?)

[b2f0906e38269c1116736832] /index.php/Accueil MWException: Parser state cleared while parsing. Did you call Parser::parse recursively? Lock is held by: #0 C:\www\mediawiki\includes\parser\Parser.php(882): Parser->lock()

#1 C:\www\mediawiki\includes\parser\Parser.php(4821): Parser->preprocess('Votre page d\xE2\x80\x99...', Object(MediaWiki\Title\Title), Object(ParserOptions))

#2 C:\www\mediawiki\includes\language\MessageCache.php(1442): Parser->transformMsg('Votre page d\xE2\x80\x99...', Object(ParserOptions), Object(MediaWiki\Title\Title))

#3 C:\www\mediawiki\includes\language\Message.php(1464): MessageCache->transform('Votre page d\xE2\x80\x99...', true, Object(Language), Object(MediaWiki\Title\Title))

#4 C:\www\mediawiki\includes\language\Message.php(1011): Message->transformText('Votre page d\xE2\x80\x99...')

#5 C:\www\mediawiki\includes\language\Message.php(1059): Message->format('text')

#6 C:\www\mediawiki\includes\linker\Linker.php(2207): Message->text()

#7 C:\www\mediawiki\includes\linker\Linker.php(2388): MediaWiki\Linker\Linker::titleAttrib('pt-userpage', Array, Array, Object(DerivativeContext))

#8 C:\www\mediawiki\includes\skins\components\SkinComponentLink.php(236): MediaWiki\Linker\Linker::tooltipAndAccesskeyAttribs('pt-userpage', Array, Array)

#9 C:\www\mediawiki\includes\skins\components\SkinComponentLink.php(183): MediaWiki\Skin\SkinComponentLink->applyLinkTitleAttribs(Array, true, Array)

#10 C:\www\mediawiki\includes\skins\components\SkinComponentLink.php(254): MediaWiki\Skin\SkinComponentLink->makeLink('userpage', Array, Array)

#11 C:\www\mediawiki\includes\skins\components\SkinComponentListItem.php(170): MediaWiki\Skin\SkinComponentLink->getTemplateData()

#12 C:\www\mediawiki\includes\skins\components\SkinComponentListItem.php(221): MediaWiki\Skin\SkinComponentListItem->makeListItem('userpage', Array, Array, Array)

#13 C:\www\mediawiki\includes\skins\components\SkinComponentMenu.php(166): MediaWiki\Skin\SkinComponentListItem->getTemplateData()

#14 C:\www\mediawiki\includes\skins\Skin.php(2470): MediaWiki\Skin\SkinComponentMenu->getTemplateData()

#15 C:\www\mediawiki\includes\skins\SkinTemplate.php(641): Skin->getPortletData('user-page', Array)

#16 C:\www\mediawiki\includes\skins\SkinTemplate.php(181): SkinTemplate->getPortletsTemplateData()

#17 C:\www\mediawiki\includes\skins\SkinMustache.php(125): SkinTemplate->getTemplateData()

#18 C:\www\mediawiki\skins\Vector\includes\SkinVector22.php(329): SkinMustache->getTemplateData()

#19 C:\www\mediawiki\includes\skins\SkinMustache.php(92): MediaWiki\Skins\Vector\SkinVector22->getTemplateData()

#20 C:\www\mediawiki\includes\skins\SkinTemplate.php(174): SkinMustache->generateHTML()

#21 C:\www\mediawiki\includes\Output\OutputPage.php(2947): SkinTemplate->outputPage()

#22 C:\www\mediawiki\includes\MediaWiki.php(978): MediaWiki\Output\OutputPage->output(true)

#23 C:\www\mediawiki\includes\MediaWiki.php(613): MediaWiki->main()

#24 C:\www\mediawiki\index.php(50): MediaWiki->run()

#25 C:\www\mediawiki\index.php(46): wfIndexMain()

#26 {main}

Bawolff (talkcontribs)

Multiple people have reported something like this, but its unclear what the trigger is. It seems to happen in languages with gendered grammar (e.g. Spanish and french).

Some people report a connection to authorization extensions like extension:Auth_remoteuser.

See phab:T366986. If there is anything about your wiki that would make it different from the average wiki, please let us know in order to help us track down this issue.

Reply to "Fatal error"

Custom extension not load css

3
Mkepler (talkcontribs)

I "create" custom tag extension....

... extension not load css.

What am I messing up?


extension.json

 ...
  "AutoloadClasses": {
                "MKCalendar": "includes/MKCalendar.php"
  },

  "Hooks": {
    "BeforePageDisplay": "MKCalendar::onBeforePageDisplay",
    "ParserFirstCallInit": "MKCalendar::efMKCalendarParserInit"
  },

  "ResourceFileModulePaths": {
    "localBasePath": "modules",
    "remoteExtPath": "MKCalendar/modules"
  },

  "ResourceModules": {
    "ext.MKCalendar.styles": {
      "styles": [
        "mkcalendar.css"
      ]
    }
  }
  ...

MKCalendar.php

//...
  public function onBeforePageDisplay( $out, $skin ): void {
      $moduleStyles[] = 'ext.MKCalendar.styles';
      $out->addModuleStyles( $moduleStyles );
  }
//...


Browser Console:

mw.loader.getState("ext.MKCalendar.styles");
'registered'
Osnard (talkcontribs)

In general, this looks good. Two remarks:

  1. You register MKCalendar::onBeforePageDisplay as a "static" function in the extension.json, but the method itself is not declared as static
  2. You use the "append" operator $moduleStyles[] = on an uninitialized variable

While both things are usually not an issue, different PHP versions and configurations may behave differently.

Can you confirm that the onBeforePageDisplay method is being called properly by MediaWiki core code?

Mkepler (talkcontribs)

OK thank you;

my fault coding. (I fixed what you said in the code so it works now.)

Reply to "Custom extension not load css"
Mfrizzera (talkcontribs)

Tengo el siguiente error al hacer una instalacion limpia de wiki 1.41.0 con apache 3.4, php 8.1 y mariadb 10.6.

Error interno

[f7d22212565b9474d1fb5105] 2024-06-07 13:16:01: Excepción grave de tipo "Error"

Realize una instalacion nueva y siguo teniendo el mismo error.

Malyacko (talkcontribs)
Reply to "Error Interno"

refreshLinks always marked as "abandoned" in job queue

2
Zorua Fox (talkcontribs)

Recently I noticed when I used showJobs.php to check jobs, it always showed that 2 refreshLinks were marked as "abandoned", such problem didn't resolve after php manageJobs.php --type refreshLinks --action repush-abandoned.

I'm wondering if this kind of problem affects the whole site.

Zorua Fox (talkcontribs)

Some related output:

Terminal
Reply to "refreshLinks always marked as "abandoned" in job queue"
79.139.200.96 (talkcontribs)

I was trying to get the template to call itself so that it would pull out specific information and paste it as text. The template stores information about recipes, but even though it is not an infinite recursion, it throws an error. Is there a way to make the template call itself?

Steff-X (talkcontribs)

I don't think recursions are allowed in templates. You would need to have a look at Scribunto and its modules in Lua.

Reply to "Recursions"

Problem with internal links

3
132.166.177.50 (talkcontribs)

I create a "News" namespace and when I try to make a link or transclude a "News" page the wiki create a external link.

<nowiki>[[News:example]]</nowiki>

I'm precise that the problem is related to the word "News" because when I write <nowiki>[[New:example]]</nowiki> that create a internal link.

Bawolff (talkcontribs)

Try adding

$wgUrlProtocols = array_diff( $wgUrlProtocols, ["news:"] );

In LocalSettings.php

See manual:$wgUrlProtocols for details

132.166.177.50 (talkcontribs)

I tried this : $wgUrlProtocols = array_diff($wgUrlProtocols, array('news:')); and got the same result.

Reply to "Problem with internal links"

Internal Server Error after upgrading to 1.41

4
140.182.101.237 (talkcontribs)

I followed the directions to upgrade (Manual:Upgrading) from my (functioning) mediawiki-1.36.1 to mediawiki-1.41.1, but now all I get is "Internal Server Error"

I tried setting all these debug options: Manual:How to debug ...in my LocalSettings.php, but still just get the Internal Server Error.

This is running on a university server that I do not have admin access to, but again - worked fine immediately before trying to upgrade. Any suggestions about what I might try? I saw a suggestion for looking at the server logs, but I don't seem to have access to them (or at least I don't know where to look for them - I don't have access to /var/log/apache2 for example)

Bawolff (talkcontribs)

You really need the server error log.

OOS1859 (talkcontribs)

I'm not sure what was wrong, but it is now working this morning. I suspect some temporary hiccup on my University's server, but I can't be sure it wasn't something I did.

In case it helps anyone else: I did find a note about getting this Internal Server Error if some of the lines in LocalSettings.php accidentally lack a necessary trailing ";" at the end of each line (because of some editing mistake). I had in fact edited my LocalSettings.php, but didn't see any errors of this kind, so I don't think this was causing my issue this time.

Bawolff (talkcontribs)

Typically (Although not always) a typo in LocalSettings.php makes a blank page. Usually (not always) an "Internal server error" message means something wrong more on the web server layer.

Reply to "Internal Server Error after upgrading to 1.41"

I need to delete a page

2
228coffee (talkcontribs)

the page about my son needs to be deleted. It is false information and is causing a lot of problems in the family

Leaderboard (talkcontribs)
Reply to "I need to delete a page"