한국   대만   중국   일본 
Project:Support desk - MediaWiki 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 ".
Rich Farmbrough ( talk contribs )

This page links incorrectly to the archive. I tired to fix it but you have to be an admin to edit it.

Rich Farmbrough 14:31, 18 June 2024 (UTC).

79.139.200.96 ( talk contribs )

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 ( talk contribs )

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

Rich Farmbrough ( talk contribs )

You can't recurse [loop]S templates in general, even indirectly. There is even a limit on the depth you can call one template from another. You could, however, have a template "Master recipe" and call several sub recipes, for example: {{Master recipe|name=Victoria sandwich|step1=Make jam: {{Recipe|Strawberry jam|strawberries|sugar|unicorn horn}}|step2=make sponge: {{Recipe|Victoria sponge|two eggs|flour|fairy dust}}}}

Rich Farmbrough 14:46, 18 June 2024 (UTC).

Reply to "Recursions"

Unable to import .xml file with page contents

5
Jeremywfox ( talk contribs )

Hello,

I'm trying to set up a MediaWiki-run website but I'm currently unable to import page contents via .xml files. I've set up two test subdomains (test.kaloxys.com and test2.kaloxys.com). I have exported a .xml file using Special:Export and I'm able to import the file using the Special:Import page on my second test website (test2.kaloxys.com). Whenever I try to import the .xml file using Special:Import on my first subdomain (test.kaloxys.com) it doesn't work. I receive this message: "Internal error ... Fatal exception of type "Error"". I'm unable to upload screenshots. I've uninstalled and reinstalled MediaWiki on test.kaloxys.com three times. Each time I'm unable to import .xml files.

Please advise me on why this might be happening. I'm happy to send screenshots to illustrate the problem.

Thanks,

Jeremy

Osnard ( talk contribs )

Hi!

Please enable debug output , by placing $wgShowExceptionDetails = true; in your LocalSettings.php file. Thus you should be provided with more information about the error, which will help to fix it.

Jeremywfox ( talk contribs )

[94ff1ce56b8489512ac584d5] /index.php?title=Special:Import&action=submit Error: Failed opening required '/home/kaloxysc/test.kaloxys.com/extensions/SecureLinkFixer/includes/../domains.php' (include_path='/home/kaloxysc/test.kaloxys.com/vendor/pear/console_getopt:/home/kaloxysc/test.kaloxys.com/vendor/pear/mail:/home/kaloxysc/test.kaloxys.com/vendor/pear/mail_mime:/home/kaloxysc/test.kaloxys.com/vendor/pear/net_smtp:/home/kaloxysc/test.kaloxys.com/vendor/pear/net_socket:/home/kaloxysc/test.kaloxys.com/vendor/pear/net_url2:/home/kaloxysc/test.kaloxys.com/vendor/pear/pear-core-minimal/src:/home/kaloxysc/test.kaloxys.com/vendor/pear/pear_exception:.:/opt/cpanel/ea-php81/root/usr/share/pear')

Backtrace:

from /home/kaloxysc/test.kaloxys.com/extensions/SecureLinkFixer/includes/HSTSPreloadLookup.php(38)

  1. 0 /home/kaloxysc/test.kaloxys.com/extensions/SecureLinkFixer/includes/Hooks.php(61): MediaWiki\SecureLinkFixer\HSTSPreloadLookup->isPreloaded(string)
  2. 1 /home/kaloxysc/test.kaloxys.com/includes/HookContainer/HookContainer.php(161): MediaWiki\SecureLinkFixer\Hooks->onLinkerMakeExternalLink(string, string, string, array, string)
  3. 2 /home/kaloxysc/test.kaloxys.com/includes/HookContainer/HookRunner.php(2321): MediaWiki\HookContainer\HookContainer->run(string, array)
  4. 3 /home/kaloxysc/test.kaloxys.com/includes/linker/Linker.php(1168): MediaWiki\HookContainer\HookRunner->onLinkerMakeExternalLink(string, string, string, array, string)
  5. 4 /home/kaloxysc/test.kaloxys.com/includes/parser/Parser.php(2175): MediaWiki\Linker\Linker::makeExternalLink(string, string, boolean, string, array, MediaWiki\Title\Title)
  6. 5 /home/kaloxysc/test.kaloxys.com/includes/parser/Parser.php(1574): Parser->handleExternalLinks(string)
  7. 6 /home/kaloxysc/test.kaloxys.com/includes/parser/Parser.php(651): Parser->internalParse(string)
  8. 7 /home/kaloxysc/test.kaloxys.com/includes/content/WikitextContentHandler.php(420): Parser->parse(string, MediaWiki\Title\Title, ParserOptions, boolean, boolean, integer)
  9. 8 /home/kaloxysc/test.kaloxys.com/includes/content/ContentHandler.php(1760): WikitextContentHandler->fillParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, ParserOutput)
  10. 9 /home/kaloxysc/test.kaloxys.com/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)
  11. 10 /home/kaloxysc/test.kaloxys.com/includes/Revision/RenderedRevision.php(260): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(WikitextContent, MediaWiki\Title\Title, integer, ParserOptions, boolean)
  12. 11 /home/kaloxysc/test.kaloxys.com/includes/Revision/RenderedRevision.php(232): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
  13. 12 /home/kaloxysc/test.kaloxys.com/includes/Revision/RevisionRenderer.php(223): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
  14. 13 /home/kaloxysc/test.kaloxys.com/includes/Revision/RevisionRenderer.php(164): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
  15. 14 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
  16. 15 /home/kaloxysc/test.kaloxys.com/includes/Revision/RenderedRevision.php(199): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
  17. 16 /home/kaloxysc/test.kaloxys.com/includes/Storage/DerivedPageDataUpdater.php(1463): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
  18. 17 /home/kaloxysc/test.kaloxys.com/includes/Storage/DerivedPageDataUpdater.php(1859): MediaWiki\Storage\DerivedPageDataUpdater->getCanonicalParserOutput()
  19. 18 /home/kaloxysc/test.kaloxys.com/includes/Storage/DerivedPageDataUpdater.php(1751): MediaWiki\Storage\DerivedPageDataUpdater->doParserCacheUpdate()
  20. 19 /home/kaloxysc/test.kaloxys.com/includes/Storage/DerivedPageDataUpdater.php(1596): MediaWiki\Storage\DerivedPageDataUpdater->triggerParserCacheUpdate()
  21. 20 /home/kaloxysc/test.kaloxys.com/includes/import/ImportableOldRevisionImporter.php(242): MediaWiki\Storage\DerivedPageDataUpdater->doUpdates()
  22. 21 /home/kaloxysc/test.kaloxys.com/includes/import/WikiRevision.php(643): ImportableOldRevisionImporter->import(WikiRevision)
  23. 22 /home/kaloxysc/test.kaloxys.com/includes/import/WikiImporter.php(508): WikiRevision->importOldRevision()
  24. 23 /home/kaloxysc/test.kaloxys.com/includes/import/WikiImporter.php(636): WikiImporter->importRevision(WikiRevision, WikiImporter)
  25. 24 /home/kaloxysc/test.kaloxys.com/includes/import/WikiImporter.php(1139): WikiImporter->revisionCallback(WikiRevision)
  26. 25 /home/kaloxysc/test.kaloxys.com/includes/import/WikiImporter.php(1005): WikiImporter->processRevision(array, array)
  27. 26 /home/kaloxysc/test.kaloxys.com/includes/import/WikiImporter.php(937): WikiImporter->handleRevision(array)
  28. 27 /home/kaloxysc/test.kaloxys.com/includes/import/WikiImporter.php(755): WikiImporter->handlePage()
  29. 28 /home/kaloxysc/test.kaloxys.com/includes/specials/SpecialImport.php(248): WikiImporter->doImport()
  30. 29 /home/kaloxysc/test.kaloxys.com/includes/specials/SpecialImport.php(121): MediaWiki\Specials\SpecialImport->doImport()
  31. 30 /home/kaloxysc/test.kaloxys.com/includes/specialpage/SpecialPage.php(727): MediaWiki\Specials\SpecialImport->execute(NULL)
  32. 31 /home/kaloxysc/test.kaloxys.com/includes/specialpage/SpecialPageFactory.php(1621): MediaWiki\SpecialPage\SpecialPage->run(NULL)
  33. 32 /home/kaloxysc/test.kaloxys.com/includes/MediaWiki.php(357): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
  34. 33 /home/kaloxysc/test.kaloxys.com/includes/MediaWiki.php(960): MediaWiki->performRequest()
  35. 34 /home/kaloxysc/test.kaloxys.com/includes/MediaWiki.php(613): MediaWiki->main()
  36. 35 /home/kaloxysc/test.kaloxys.com/index.php(50): MediaWiki->run()
  37. 36 /home/kaloxysc/test.kaloxys.com/index.php(46): wfIndexMain()
  38. 37 {main}
Osnard ( talk contribs )
Jeremywfox ( talk contribs )

Thank you very much for your help, Osnard. I don't need Extension:SecureLinkFixer at the moment, so I deleted the extension from my wiki. Importing now works fine. I might try adding the extension again later. P.S. You live in a cool part of Europe!

Reply to "Unable to import .xml file with page contents"
2A01:E0A:970:8170:B1A6:911:33FB:A55B ( talk contribs )

Hello,

I have an old MediaWiki install, version 1.25.1, installed using a tar.gz long ago. I'm wondering what would be the easiest way to upgrade.

I am running Debian 12, I wouldn't mind using packages for easier upgrades, if that's possible. Is it possible to do a new install and then point the settings to the old DB?

Cheers for any tips.

TheDJ ( talk contribs )

As described in Manual:Upgrading you always have to update to 1.35.x first. General advise is to first disable all your extensions, update your core, update the database with maintenance/update.php, update and enable your extensions and run maintenance/update.php again. Verify everything is working (some extensions might have to be disabled, because they are no longer updated, check their pages on mediawiki.org) and then go to the next LTS release.

2A01:E0A:970:8170:B1A6:911:33FB:A55B ( talk contribs )

Thanks a bunch.

This post was hidden by Malyacko ( history )
Reply to "old mediawiki upgrade"

Unable to install pgpool 4.5.1

3
Manukapoor1978 ( talk contribs )

Hi  ! I have been trying to install pgpool-II 4.5 for postgres 16 however I have been getting: Problem: cannot install the best candidate for the job - nothing provides libmemcached.so.11()(64bit) needed by pgpool-II-pg16-4.5.1-1pgdg.rhel9.x86_64 from pgpool45

More details:

OS: Red Hat Enterprise Linux 9.3

Commands used: dnf install -y pgpool-II-pg16

Output:

Updating Subscription Management repositories.

Last metadata expiration check: 0:01:47 ago on Fri 12 Apr 2024 07:01:40 PM IST.

Error:

Problem: cannot install the best candidate for the job

? - nothing provides libmemcached.so.11()(64bit) needed by pgpool-II-pg16-4.5.1-1pgdg.rhel9.x86_64 from pgpool45

(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Any help towards this will be greatly appreciated

Malyacko ( talk contribs )

@ Manukapoor1978 Welcome to the MediaWiki support desk. How is your question related to MediaWiki? For RHEL package dependency issues you need to ask in a RHEL support forum.

This post was hidden by Malyacko ( history )
Reply to "Unable to install pgpool 4.5.1"
Mfrizzera ( talk contribs )

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: Excepcion grave de tipo "Error"

Realize una instalacion nueva y siguo teniendo el mismo error.

Malyacko ( talk contribs )
Reply to "Error Interno"

How to check if user views page (MW 1.39) ?

3
Stefahn ( talk contribs )

In my?skin?a?certain component should only be rendered if people view the page. It should not be shown if people edit the page.

In MW 1.37 the following PHP code worked fine, but since 1.39 it no longer works.

Can someone point me in the right direction please?

global $mediaWiki;
( isset($mediaWiki) ) {
? ?if ( $mediaWiki->getAction() == "view" ) {
? ? ? ?ShowStuff();
? ?}
}
Malyacko ( talk contribs )
TheDJ ( talk contribs )

In many situations, you likely can use $this->getContext()-> getActionName ()

Reply to "How to check if user views page (MW 1.39) ?"
2A02:A03F:66D9:F301:512D:41C:6D44:DFFF ( talk contribs )

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 ( talk contribs )

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

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

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

Bawolff ( talk contribs )

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 ( talk contribs )

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 ( talk contribs )
Bawolff ( talk contribs )

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 ( talk contribs )

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 ( talk contribs )

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

Bawolff ( talk contribs )

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"

Moving local installation to new PC (Windows)

2
165.225.80.134 ( talk contribs )

Almost 20 years ago, I decided to use Mediawiki (32 bit) for note taking/diary entries. I used a local installation on Windows, with localhost as the server. I recently built a new PC, with Windows 10, and installed Mediawiki (64 bit). In terms suitable for a non-coder, how do I go about moving the relevant files from the old version of my wiki to the new installation? I have the old drive it was previously installed on, but it's not setup to boot and be able to run Wampserver.

TheDJ ( talk contribs )

You will have to get some system administration experience. Especially because I assume the version on your old PC was also a very old version of mediawiki, mysql and the webserver you used.

It is not going to be very easy, but the essential process is Manual:Upgrading . Please keep your old drive in the EXACT state as it was, as you are likely to have to do the whole process a few times before you work out the kinks.

Your biggest challenge is probably going to import the mysql database, if you haven't done something like that before. You have to get a current MySQL running, then copy the data directories of MySQL from your old drive to your new drive, and then trigger MySQL to upgrade those tables. This is all MySQL tutorials. Hopefully this works in one go, it kind of depends on how old your mysql server was. Use an SQL client to inspect if you correctly imported your installation.

Then you have to install MediaWiki 1.35 and PHP 7.4 and get that running. Then swap the configuration to connect to your imported database, then run MediaWiki's upgrader. Then upgrade to MediaWiki 1.39, then upgrade to PHP 8, then upgrade to MediaWiki 1.41

Reply to "Moving local installation to new PC (Windows)"

translation validation lasted : loop to validate an unmodified translated message

1
Wladek92 ( talk contribs )

Problem detected on foundation.wikimedia.org may be it is not his right place here: when there is no modification in the translated text (contents of $n modified only), the same message is presented again and again for validation to the translator.

example on -> https://foundation.wikimedia.org/w/index.php?title=Special:Translate&group=page-Template%3ADuplicate+content%2FContent&action=page&filter=%21translated&language=fr

Dernieres modificationsToutes les modifications
Marked translation unit as no longer outdated with no changes·il y a quelques secondes
Marked translation unit as no longer outdated with no changes·il y a une minute
Marked translation unit as no longer outdated with no changes·il y a une minut

with no differences in the history  :

actudiff 17 juin 2024 a 10:30? Wladek92 discussion contributions?  68 octets 0?  Marked translation unit as no longer outdated with no changes modifie depuis votre derniere visite annuler
actudiff 17 juin 2024 a 10:23? Wladek92 discussion contributions?  68 octets 0?  Marked translation unit as no longer outdated with no changes modifie depuis votre derniere visite annuler
actudiff 17 juin 2024 a 10:23? Wladek92 discussion contributions?  68 octets 0?  Marked translation unit as no longer outdated with no changes modifie depuis votre derniere visite annuler
actudiff 17 juin 2024 a 10:23? Wladek92 discussion contributions?  68 octets 0?  Marked translation unit as no longer outdated with no changes modifie depuis votre derniere visite annuler
actudiff 17 juin 2024 a 09:21? Wladek92 discussion contributions?  68 octets 0?  Marked translation unit as no longer outdated with no changes modifie depuis votre derniere visite annuler

shows the same 'no longer updated’ at each attempt to accept as it is and seems validation is delayed delayed delayed.... Any idea  ? -- Christian ???? FR ( talk ) 08:37, 17 June 2024 (UTC)

Reply to "translation validation lasted : loop to validate an unmodified translated message"