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".
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)
2401:4900:820C:ABD1:A6D1:490:90ED:BA58 (talkcontribs)
Reply to "Error Interno"
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.

Jef-unc (talkcontribs)

May be something more explicit when testing on the 1.39.7 version (same issue when switching language). <tbody>warning: Undefined property: Parser::$deprecatedPublicProperties in C:\www\mediawiki\includes\debug\DeprecationHelper.php on line 208 Call Stack #TimeMemoryFunctionLocation 10.83368089264Wikimedia\ScopedCallback->__destruct( )...\ScopedCallback.php:0 20.83368089264<a href="http://www.php.net/function.call-user-func-array:{C:\www\mediawiki\vendor\wikimedia\scoped-callback\src\ScopedCallback.php:102}" target="_new">call_user_func_array:{C:\www\mediawiki\vendor\wikimedia\scoped-callback\src\ScopedCallback.php:102}</a>( $callback = class Closure { public $this = class Parser { private $mTagHooks = *uninitialized*; private $mFunctionHooks = *uninitialized*; private $mFunctionSynonyms = *uninitialized*; private $mStripList = *uninitialized*; private $mVarCache = *uninitialized*; private $mImageParams = *uninitialized*; private $mImageParamsMagicArray = *uninitialized*; public $mMarkerIndex = *uninitialized*; private $mVariables = *uninitialized*; private $mSubstWords = *uninitialized*; private $mExtLinkBracketedRegex = *uninitialized*; private $urlUtils = *uninitialized*; private $mPreprocessor = *uninitialized*; private $mOutput = *uninitialized*; private $mAutonumber = *uninitialized*; private $mStripState = *uninitialized*; private $mLinkHolders = *uninitialized*; private $mLinkID = *uninitialized*; private $mIncludeSizes = *uninitialized*; public $mPPNodeCount = *uninitialized*; public $mHighestExpansionDepth = *uninitialized*; private $mTplRedirCache = *uninitialized*; public $mHeadings = *uninitialized*; private $mDoubleUnderscores = *uninitialized*; public $mExpensiveFunctionCount = *uninitialized*; private $mShowToc = *uninitialized*; private $mForceTocPosition = *uninitialized*; private $mTplDomCache = *uninitialized*; private $mUser = *uninitialized*; public $mOptions = *uninitialized*; public $mTitle = *uninitialized*; private $mOutputType = *uninitialized*; public $ot = *uninitialized*; private $mRevisionId = *uninitialized*; private $mRevisionTimestamp = *uninitialized*; private $mRevisionUser = *uninitialized*; private $mRevisionSize = *uninitialized*; private $mInputSize = *uninitialized*; private $mRevisionRecordObject = *uninitialized*; private $mLangLinkLanguages = *uninitialized*; private $currentRevisionCache = *uninitialized*; private $mInParse = *uninitialized*; private $mProfiler = *uninitialized*; private $mLinkRenderer = *uninitialized*; private $magicWordFactory = *uninitialized*; private $contLang = *uninitialized*; private $languageConverterFactory = *uninitialized*; private $factory = *uninitialized*; private $specialPageFactory = *uninitialized*; private $titleFormatter = *uninitialized*; private $svcOptions = *uninitialized*; private $linkRendererFactory = *uninitialized*; private $nsInfo = *uninitialized*; private $logger = *uninitialized*; private $badFileLookup = *uninitialized*; private $hookContainer = *uninitialized*; private $hookRunner = *uninitialized*; private $tidy = *uninitialized*; private $userOptionsLookup = *uninitialized*; private $userFactory = *uninitialized*; private $httpRequestFactory = *uninitialized*; private $trackingCategories = *uninitialized*; private $signatureValidatorFactory = *uninitialized*; private $userNameUtils = *uninitialized*; protected $deprecatedPublicProperties = *uninitialized*; private $dynamicPropertiesAccessDeprecated = *uninitialized* } }, $args = [] )...\ScopedCallback.php:102 30.83368089464Parser->{closure:C:\www\mediawiki\includes\parser\Parser.php:6471-6473}( )...\ScopedCallback.php:102 40.83368089560Parser->__set( $name = 'mInParse', $value = FALSE )...\Parser.php:6472 50.83368089944Parser->__isset( $name = 'deprecatedPublicProperties' )...\DeprecationHelper.php:217 60.83368089944Parser->__get( $name = 'deprecatedPublicProperties' )...\DeprecationHelper.php:163 </tbody>

Bawolff (talkcontribs)

Hard to say for sure, but i think that is unrelated.

Reply to "Fatal error"

Extension causes wiki to crash (with specific languages)

4
Summary by 2401:4900:820C:ABD1:A6D1:490:90ED:BA58
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)

JacoboTheFurst3366 (talkcontribs)

Commenting the line you point out has no effect on the error message.

If there's anything unique I can think of, it could be that on installation there was no APCu installed, so I did it without caching. Anyway, I've just added caching, and it still crashes the same way.

JacoboTheFurst3366 (talkcontribs)

As I commented in phabricator task, I've just started all over again, but this time using the MediaWiki LTS version (1.39.7), and the problem is exactly the same.

Reply to "Extension causes wiki to crash (with specific languages)"

C'ant link to custom namespace News

1
132.166.177.50 (talkcontribs)

I created a custom namespace name 'News' and I wanted to make some links to News pages. So I add the wsUrlProtocol parameter with 'news:' but that still don't work. When I create a internal link to news page the wiki create an external link.

<nowiki>$wgUrlProtocols[] = 'News:';</nowiki>

Reply to "C'ant link to custom namespace News"

MPDF version 6.1 not working with PHP 8

4
Pooja2425 (talkcontribs)

Product Version

MediaWiki 1.35.3

PHP 8.0.25 (apache2handler)

MySQL 8.0.26

Lua 5.1.5

Elasticsearch 6.5.4

We are using above & Mpdf 6.1 Extension:Mpdf as erlier we re using php v7.4 . But Now we have upgraded the Php to 8.0 and PDF is not working, done so many changes i.e () to [] ,replaced each() with new function in mpdf file but still facing issues. pls suggest which mpdf version we need to use for pdf .

also when trying to update mpdf to another version facing issues with elastic search

  Problem 1

    - elasticsearch/elasticsearch v6.5.0 requires php ^7.0 -> your PHP version (8.0.25) does not satisfy that requirement.

    - elasticsearch/elasticsearch v6.5.0 requires php ^7.0 -> your PHP version (8.0.25) does not satisfy that requirement.

    - Installation request for elasticsearch/elasticsearch  6.5 -> satisfiable by elasticsearch/elasticsearch[v6.5.0].


As elastic server 6.5.4 is suitable for MW 1.35.3 & ElasticSearch Php Client 6.5 for Elastic Server 6.5.4.


Please suggest what to do for pdf.

Pooja2425 (talkcontribs)

Warning: Undefined variable $footer in /data/www/html/wiki/extensions/Mpdf/MpdfAction.php on line 39

[Y4BnM7MF2q2VgmHCDaL-kQAAAAE] /wiki/...../&action=mpdf MpdfException from line 297 of /data/www/html/wiki/extensions/Mpdf/vendor/mpdf/mpdf/classes/otl.php: Can't open file /data/www/html/wiki/extensions/Mpdf/vendor/mpdf/mpdf/ttfontdata/dejavusansmono.GSUBGPOStables.dat


also header is not coming in pdf when generating pdf in some pages, alignment issue also there.

As in php 7 supporting int+float+string , but not php 8. i.e ( 10px+27px +auto ) so many issue in mpdf 6.1 libary code in php 8.

Bawolff (talkcontribs)

Neither of those errors you posted sound like php8 issues.

You should probably take this up with the extension maintainer.

Seb35 (talkcontribs)

As said, there are multiple different problems here, some unrelated to Mpdf. A good practice when reporting bugs is to dissociate independent issues.

About the strict issue of PHP 8 for the extension Mpdf, see phabricator:T227479 and the linked Gerrit patch.

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"

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"

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"