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".
Agatnor (talkcontribs)

Hello guys,

I don't really know how to insert licenses or author information into a Mediawiki project so that they are recognized and displayed by the Mediaviewer. To give an example for my problem: If you look at an image in Wikipdia (or Mediawiki) in the media viewer, you can scroll down and see the author information and license information. Unfortunately, this is not the case in my Mediawiki project, I would be very happy to receive an answer!

TheDJ (talkcontribs)

All this is done with custom templates, placed on the wikitext filedescription, which are then being scraped by and extension.

The way the Information and license templates on Commons provide this data is documented on https://commons.wikimedia.org/wiki/Commons:Machine-readable_data and it happens with classes and ids applied to the templates.

The extension reading out this information is Extension:CommonsMetadata

The results of that extension then provided additional information in the image info API, which is read by MultimediaViewer. This is all VERY cumbersome because it was not an intentional design.

Reply to "Licenses"

Unable to add another language

3
Mitakcor (talkcontribs)

Hi guys,

Just installed MultiLanguageManager. I wanted to add Dutch as second language to my own wiki next to English, but I'm unable to find MultiLanguageManager_setup.php to do the following as mentioned in the guide:

Configuration

Available languages

The configuration is done using the $mgAvailableLanguage variable which contains the code of language and the code of its name in the file MultiLanguageManager_setup.php.

$mgAvailableLanguage = array(
   'en' => 'multilanguagemanager_en',
   'fr' => 'multilanguagemanager_fr'
);

I can't find the concerning file on my PC. Am I overlooking something?

Thanks in advance!

Cheers,

Mitakcor

Malyacko (talkcontribs)
Mitakcor (talkcontribs)

Ah... Thanks. I'll take a look later because at this moment I cannot get access to my database and after debugging I got this:


MediaWiki internal error.

Original exception: [292963e8f02ca350ef89f2d8] /wiki/ Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'Mitakcor'@'localhost' to database 'thenll' (localhost)

Backtrace:

from C:\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1138)

#0 C:\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(714): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(2695): Wikimedia\Rdbms\DBConnRef->getSessionLagStatus()

#6 C:\xampp\htdocs\wiki\includes\user\User.php(506): Wikimedia\Rdbms\Database::getCacheSetOptions(Wikimedia\Rdbms\DBConnRef)

#7 C:\xampp\htdocs\wiki\includes\libs\objectcache\wancache\WANObjectCache.php(1725): MediaWiki\User\User->MediaWiki\User\{closure}(boolean, integer, array, NULL, array)

#8 C:\xampp\htdocs\wiki\includes\libs\objectcache\wancache\WANObjectCache.php(1556): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)

#9 C:\xampp\htdocs\wiki\includes\user\User.php(502): WANObjectCache->getWithSetCallback(string, integer, Closure, array)

#10 C:\xampp\htdocs\wiki\includes\user\User.php(460): MediaWiki\User\User->loadFromCache()

#11 C:\xampp\htdocs\wiki\includes\user\User.php(389): MediaWiki\User\User->loadFromId(integer)

#12 C:\xampp\htdocs\wiki\includes\session\UserInfo.php(92): MediaWiki\User\User->load()

#13 C:\xampp\htdocs\wiki\includes\session\CookieSessionProvider.php(123): MediaWiki\Session\UserInfo::newFromId(string)

#14 C:\xampp\htdocs\wiki\includes\session\SessionManager.php(539): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(MediaWiki\Request\WebRequest)

#15 C:\xampp\htdocs\wiki\includes\session\SessionManager.php(245): MediaWiki\Session\SessionManager->getSessionInfoForRequest(MediaWiki\Request\WebRequest)

#16 C:\xampp\htdocs\wiki\includes\Request\WebRequest.php(870): MediaWiki\Session\SessionManager->getSessionForRequest(MediaWiki\Request\WebRequest)

#17 C:\xampp\htdocs\wiki\includes\session\SessionManager.php(166): MediaWiki\Request\WebRequest->getSession()

#18 C:\xampp\htdocs\wiki\includes\Setup.php(487): MediaWiki\Session\SessionManager::getGlobalSession()

#19 C:\xampp\htdocs\wiki\includes\WebStart.php(85): require_once(string)

#20 C:\xampp\htdocs\wiki\index.php(50): require(string)

#21 {main}

Exception caught inside exception handler: [292963e8f02ca350ef89f2d8] /wiki/ Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'Mitakcor'@'localhost' to database 'thenll' (localhost)

Backtrace:

from C:\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1138)

#0 C:\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(794): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(782): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(338): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 C:\xampp\htdocs\wiki\includes\libs\rdbms\querybuilder\SelectQueryBuilder.php(747): Wikimedia\Rdbms\DBConnRef->selectField(array, string, array, string, array, array)

#6 C:\xampp\htdocs\wiki\includes\language\LCStoreDB.php(65): Wikimedia\Rdbms\SelectQueryBuilder->fetchField()

#7 C:\xampp\htdocs\wiki\includes\language\LocalisationCache.php(563): LCStoreDB->get(string, string)

#8 C:\xampp\htdocs\wiki\includes\language\LocalisationCache.php(609): LocalisationCache->isExpired(string)

#9 C:\xampp\htdocs\wiki\includes\language\LocalisationCache.php(520): LocalisationCache->initLanguage(string)

#10 C:\xampp\htdocs\wiki\includes\language\LocalisationCache.php(400): LocalisationCache->loadSubitem(string, string, string)

#11 C:\xampp\htdocs\wiki\includes\language\LocalisationCache.php(416): LocalisationCache->getSubitem(string, string, string)

#12 C:\xampp\htdocs\wiki\includes\language\MessageCache.php(1251): LocalisationCache->getSubitemWithSource(string, string, string)

#13 C:\xampp\htdocs\wiki\includes\language\MessageCache.php(1193): MessageCache->getMessageForLang(LanguageEn, string, boolean, array)

#14 C:\xampp\htdocs\wiki\includes\language\MessageCache.php(1088): MessageCache->getMessageFromFallbackChain(LanguageEn, string, boolean)

#15 C:\xampp\htdocs\wiki\includes\Message\Message.php(1530): MessageCache->get(string, boolean, LanguageEn)

#16 C:\xampp\htdocs\wiki\includes\Message\Message.php(1018): MediaWiki\Message\Message->fetchMessage()

#17 C:\xampp\htdocs\wiki\includes\Message\Message.php(1105): MediaWiki\Message\Message->format(string)

#18 C:\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(255): MediaWiki\Message\Message->text()

#19 C:\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(408): MWExceptionRenderer::msg(string, string)

#20 C:\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(104): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)

#21 C:\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(133): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)

#22 C:\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(237): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)

#23 C:\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(205): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)

#24 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\Rdbms\DBConnectionError)

#25 {main}


Do you know why it doesn't work? Thanks in advance!

Reply to "Unable to add another language"

extra text on a French page

2
Mahabarata73 (talkcontribs)
Samwilson (talkcontribs)
Reply to "extra text on a French page"

Fixing argument to template

1
Tule-hog (talkcontribs)

Say a template {{A}} accepts n named parameters, i, j, k, ..., and {{B}} is another template which invokes {{A}}, but fixes i=foo and passes all other parameters on.

Is there a way to create {{B}} without manually specifying all the named parameters of {{A}} in B's source code?

I think one technique I've seen to accomplish this is creating a dedicated module to parse the arguments, which I would be interested in learning, but I am also interested if there is a simpler approach.

Reply to "Fixing argument to template"

Extensions: HeaderFooter

2
Irdiism (talkcontribs)

When updating MW from 1.37 to 1.38 or 1.39 it gives this error "This version of the HeaderFooter extension requires MediaWiki 1.25+". Anyone had the same issue before? How can this be solved?

Malyacko (talkcontribs)
Reply to "Extensions: HeaderFooter"

Automatic search for red links

9
Anatole-berthe (talkcontribs)

Hello ! Anybody can say me if there are a way for an automatic search for red links ? It's possible to create a function for this if it doesn't exist ?


When I see an article with red links. If there are articles about the topic available in another language than English.

I create an interlanguage link.


I'm unable to translate into English because I'm not a native speaker of this language and my translations could be too literal.

I can translate from English into French but not the reverse.


Therefore , if such function exist. It can help me and others for my tasks.

TheDJ (talkcontribs)
Osnard (talkcontribs)
Anatole-berthe (talkcontribs)

Thanks ! The special page is a good idea but it contain only the top 500.

There are not any other possibility ?

Osnard (talkcontribs)

It shows all. If there are more than 500 you need to turn the page.

Anatole-berthe (talkcontribs)

I found the function to turn the page. We can only advance per 500 if I'm right.

Ex : I can go to 500-1000 and 1000-1500 but not 500-1500 or 1000-2000.

Anatole-berthe (talkcontribs)

I turned the pages. I can go max to the 5000th result and not beyond.

TheDJ (talkcontribs)

If you want it in a different form, you need to write a tool against the replica databases on toolforge and optimize performance to suit your specific usecase.

Anatole-berthe (talkcontribs)

I'm far to be a good developper. I know nearly nothing about programming.

Which programming language can I use for that ?

Reply to "Automatic search for red links"
Mahabarata73 (talkcontribs)

In this page, in the section Help:Tables#Note_about_large_tables_(noresize_class), the title is between <translate> tags but not the text after this title which means we cannot translate it.

Some items of the table (after this text) could also be translated if someone adds the same tags.

Could someone with the appropriate rights (the page is protected) fixes that ?

Bawolff (talkcontribs)

Done

Mahabarata73 (talkcontribs)

Thanks for the first part, but could someone add "translate" tags for the table in this section ? (the title "Shopping List" and all the values: "Areallyreallyreallyreallylongstringwillcauseyourtableto", "Pie", "Buns", etc.)?

Reply to "Help:Tables"
Mahabarata73 (talkcontribs)

There is a problem with this page and I don't have enough experience to solve it.

The text begins with "The Popups (known in Special:Version as Previews)".

But if you follow the link to the Special:Version page, you will see that there is no "Previews" on this page (nor "Popups" by the way).

I thought of 2 solutions:

  • remove the wrong text on the Extension:Popups page
  • add, in the right table (I don't know which one) of the Special:Version page, the information about this (important) extension.

I think that the best solution is the second one but I don't know who can do it.

If you think solution 1 is better, I can make the change if needed.

Clump (talkcontribs)

Correct, the link is to this wiki's own Special:Version page, and neither is installed here, but it should really be referring to a description of the Special:Version page on the wiki in which that extension is installed. Given the context, perhaps a better link would be to Manual:Developing extensions#Registering features with MediaWiki.

Mahabarata73 (talkcontribs)

Yes, that would be better. But maybe too technical, I think the link should go to a more general help page, for example this one Help:Special_pages#General_information or, on the same page with another anchor, this one Help:Special_pages#V

But is it a true information ? On Wikipédia, l'encyclopédie libre, Popups/Previews extension is installed (as on all wikipedia websites). But there is no Previews/Popups extension listed on Version — Wikipédia

Do you know of a wiki where this extension is installed and the Special:Version page of that wiki displays it ?

Clump (talkcontribs)

It is installed on the french wikipedia---search for "Previews".

Mahabarata73 (talkcontribs)

I found it : on the french wikipedia, Popups extension name is "Aperçus".

On english wikipedia, name is "Previews"

On German wikipedia, name is "Popups".

I just improved the french translation, it closes the topic, thanks for your answers.

Reply to "Extension:Popups"
Mahabarata73 (talkcontribs)

This page begins (second line) with a text in English not between <translate> tags so we cannnot translate it in other languages.

Could someone with the appropriate rights (the English page is protected) fixes it ?

Bawolff (talkcontribs)

Done

Reply to "Help:Redirects"

bug with obsolete translations in the title of pages

1
Mahabarata73 (talkcontribs)

When a "translate" section is obsolete, it appears in black with a pink background.

On this page and I suspect on many similar pages in French and other languages, there is, according to the line above the list of languages, an obsolete section. But no section with pink background is visible.

In fact there is truly an obsolete translation: the title "Mise en cache des liens" (click on "version traduite" at the top of the page to see it).

It should be great to have the title with a pink background when it is obsolete.

Reply to "bug with obsolete translations in the title of pages"