Project:Support desk

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(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 versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. 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.
  3. To start a new thread, click "Start a new topic".

How to upload videos from local to Mediawiki?

1
Resherry2020 (talkcontribs)

Hi, I want to upload videos to Mediawiki from local.

I tried to use the extension TimedMediaHandler. But after installion, there is still issues with no thumbnail. I have follow the all steps about $wgFFmpegLocation and  $wgMaxShellMemory.

After that, I tried to install by git, but it shows An error occurred:

TimedMediaHandler is not compatible with the current MediaWiki core (version 1.41.0), it requires: >= 1.42. But as I know there is only 1.41 now...so, what should I do next...

Reply to "How to upload videos from local to Mediawiki?"

Look! I findses a glitch!

1
JayCubby (talkcontribs)
Reply to "Look! I findses a glitch!"

Error after migrating old MW (1.24)

2
Chadsung (talkcontribs)

I am trying to update an old MW that was running version 1.24 before it got shutdown since the hosting provider couldn't afford running an old php version due to the security problems that come with it. I downloaded the files and the db and tried to run it locally using XAMPP with a compatible PHP version. I imported everything but when I access the wiki's front page, I am facing several error messages (see at the end of my post).

I think this is due to the migration (= paths that are not valid anymore). How can I tackle this problem before updating the wiki step by step?

Many thanks in advance!

[cc8a6e0e] /wiki/Hauptseite Exception from line 222 of /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/Hooks.php: Detected bug in an extension! Hook Cite::checkRefsNoReferences has invalid call signature; Parameter 2 to Cite::checkRefsNoReferences() expected to be a reference, value given

Backtrace:

#0 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/GlobalFunctions.php(3995): Hooks::run()

#1 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/parser/Parser.php(406): wfRunHooks()

#2 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/cache/MessageCache.php(1072): Parser->parse()

#3 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/Message.php(1002): MessageCache->parse()

#4 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/Message.php(698): Message->parseText()

#5 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/Message.php(754): Message->toString()

#6 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/OutputPage.php(1026): Message->parse()

#7 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/page/Article.php(1002): OutputPage->addSubtitle()

#8 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/page/Article.php(593): Article->showRedirectedFromHeader()

#9 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/actions/ViewAction.php(44): Article->view()

#10 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/MediaWiki.php(414): ViewAction->show()

#11 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/MediaWiki.php(282): MediaWiki->performAction()

#12 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/MediaWiki.php(584): MediaWiki->performRequest()

#13 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/includes/MediaWiki.php(435): MediaWiki->main()

#14 /var/www/vhosts/OLDWIKI.COM/httpdocs/w/index.php(46): MediaWiki->run()

#15 {main}

Malyacko (talkcontribs)

Update to which MediaWiki version? Which exact Cite version is installed? How did you upgrade extensions?

Reply to "Error after migrating old MW (1.24)"

old MW 1.28.2 - Visual Editor 500 error after IP change. Please help.

2
Wojtkiewiczd (talkcontribs)

Hi, we are trying to resolve an issue with Visual Editor -- it displays an error that says "500" after a recent IP change to our wiki server. Should I be adjusting the $wgVirtualRestConfig variable to account for the new IP address (xx.xx.49.46).

Visual Editor: HTTP 500 on Project:Support desk (mediawiki.org)

A similar thread mentions editing the config.yaml file, but I believe after 1.27 that .yaml are deprecated, so I'm not really sure where I find that config file. I managed to find the LocalSettings.php and made a backup of it just in case, but I'm not sure what to do to fix the visual editor error. Any help would be greatly appreciated. I'm a MW novice.

Wojtkiewiczd (talkcontribs)

LocalSettings.php

# Add more configuration options below.

require_once( "$IP/skins/bootstrap/bootstrapskin.php" );

$wgDefaultSkin = "bootstrapskin";

# File Protocoll

require_once "$IP/extensions/FileProtocolLinks/FileProtocolLinks.php";

#require_once("$IP/extensions/FileProtocolLinksLinux.php" );

wfLoadExtension( 'ParserFunctions' );

#$wgPFEnableStringFunctions = true;

#VisualEditor Erweiterung

require_once("$IP/extensions/VisualEditor/VisualEditor.php" );

// Enable by default for everybody

$wgDefaultUserOptions['visualeditor-enable'] = 1;

//Don't allow users to disable it

$wgHiddenPrefs[] = 'visualeditor-enable';

$wgVirtualRestConfig['modules']['parsoid'] = array(

        //URL to Parsoid instance

        'url' => 'http://localhost:8142',

        //Parsoid "domain"

        'domain' => 'localhost',

        // Parsoid "prefix"

        'prefix' => 'localhost'

);

$wgVisualEditorParsoidURL = 'http://localhost:8142';

$wgVisualEditorSupportedSkins = array(

        'vector',

        'apex',

        'monobook',

        'minerva',

        'blueprint',

        'bootstrapskin',

        'bootstrap',

        'bootstrap/bootstrapskin'

);

// Multi-Upload-Extension

wfLoadExtension('SimpleBatchUpload');

require_once("extensions/add_multiupload.php");

//remove edit-button for not logged in users

$wgDefaultUserOptions ['editsection'] = false;

# Disable anonymous editing

$wgGroupPermissions['*']['edit'] = false;

# Open external links in new windows

$wgExternalLinkTarget = '_blank';

# iframe extension

require_once "$IP/extensions/IframePage/IframePage.php";

$wgIframePageSrc= array( /* REQUIRED! */ );

$wgRawHtml = True;

$wgDebugLogFile = '/var/lib/mediawiki/mediawiki-1.28.2/logfile';

wfLoadExtension("EmbedVideo");

Reply to "old MW 1.28.2 - Visual Editor 500 error after IP change. Please help."

Error: Class "ResourceLoaderImageModule" not found

3
Summary by Tunglinwu

update skin and extension

Tunglinwu (talkcontribs)

TRY SHOW ERROR ONLY

[ec39bead81e092f99b7a609b] /load.php?lang=zh-tw&modules=startup&only=scripts&raw=1&safemode=1&skin=vector Error: Class "ResourceLoaderImageModule" not found

Backtrace:

from /usr/share/nginx/html/hasu/includes/ResourceLoader/ResourceLoader.php(417)

#0 /usr/share/nginx/html/hasu/includes/ResourceLoader/ResourceLoader.php(453): MediaWiki\ResourceLoader\ResourceLoader->getModule()

#1 /usr/share/nginx/html/hasu/includes/ResourceLoader/StartUpModule.php(170): MediaWiki\ResourceLoader\ResourceLoader->preloadModuleInfo()

#2 /usr/share/nginx/html/hasu/includes/ResourceLoader/StartUpModule.php(419): MediaWiki\ResourceLoader\StartUpModule->getModuleRegistrations()

#3 /usr/share/nginx/html/hasu/includes/ResourceLoader/Module.php(839): MediaWiki\ResourceLoader\StartUpModule->getScript()

#4 /usr/share/nginx/html/hasu/includes/ResourceLoader/Module.php(808): MediaWiki\ResourceLoader\Module->buildContent()

#5 /usr/share/nginx/html/hasu/includes/ResourceLoader/Module.php(951): MediaWiki\ResourceLoader\Module->getModuleContent()

#6 /usr/share/nginx/html/hasu/includes/ResourceLoader/ResourceLoader.php(686): MediaWiki\ResourceLoader\Module->getVersionHash()

#7 /usr/share/nginx/html/hasu/includes/ResourceLoader/ResourceLoader.php(786): MediaWiki\ResourceLoader\ResourceLoader->getCombinedVersion()

#8 /usr/share/nginx/html/hasu/includes/ResourceLoader/ResourceLoaderEntryPoint.php(53): MediaWiki\ResourceLoader\ResourceLoader->respond()

#9 /usr/share/nginx/html/hasu/includes/MediaWikiEntryPoint.php(199): MediaWiki\ResourceLoader\ResourceLoaderEntryPoint->execute()

#10 /usr/share/nginx/html/hasu/load.php(42): MediaWiki\MediaWikiEntryPoint->run()

#11 {main}

TheDJ (talkcontribs)

Generally this will mean that the version of your extension/skin and the version of your core are not of the same release.

Tunglinwu (talkcontribs)

I stop all extension and update skin, but this error still showed.


18, Mar 15:40

fixed, it's cloudflare cached, I update skin and test which extension to thie error.

Cannot import my wiki to another service provider

2
2A00:1370:8186:1427:8942:91AD:202B:47C7 (talkcontribs)

Cannot import large wiki  to another service provider using Special:Import

This page isn’t working

... is currently unable to handle this request.

HTTP ERROR 500


I don't have the computer skills to import it another way, what should I say to my new service provider? I am on a shared hosting plan.

TheDJ (talkcontribs)

This can be for various reasons, which is impossible to say exactly without having error logging enabled, but my guess is that the request takes too long to complete and it fails after a partial import, because the hosting provider cut off your connection.

Reply to "Cannot import my wiki to another service provider"

Recommended character set and collation?

10
2003:C2:3F04:7000:1972:2771:5008:44D (talkcontribs)

Howdy,


we are running a wiki for more than 15 years now. Currently we are using MW 1.35 LTS, MySQL 8.0, PHP 7.2. Unfortunately the database tables and columns use an odd mixture of character sets (some latin1, some utf8) as well as various collations (latin1_bin, utf8_bin, utf8_general_ci, even some latin1_swedish_ci ... for whatever reasons) - this chaos happened long before I joined the wiki. Simply no one took care.


To cleanup the mess, I consider exporting all data and re-import it with a certain character set and collation. I believe I know how to do it, but I am wondering which character set and collation to use. What are the recommended defaults?


For test purposes, I created a new empty wiki using install.php, but I don't understand the result. The tables are created with character set 'binary' (except searchindex = 'utf8'), and the column's collation NULL. Could this be the default?

Jonathan3 (talkcontribs)
Bawolff (talkcontribs)

Generally yes - using binary collation with null charset is the default. Some people alternatively use utf8mb4 as the charset, and a unicode collation like utf8mb4_0900_as_cs (or a regional variant).


You might be able to use ALTER statements to change this without reimporting but you have to be careful none of the current data gets converted and im not sure how alter handles that. Whatever you do keep backups and have test pages that have accents and emoijis in the title to ensure they dont break.

2003:C2:3F04:7000:653A:4544:CCD8:41F4 (talkcontribs)

Luckily we do have a complete test wiki. I will have to perform some more tests. Meanwhile thanks for your answers!

2003:C2:3F04:7000:BD3F:81F4:1009:92AD (talkcontribs)

Difficult task. Here are some intermediate results.


First I tried ALTER TABLE to binary. Maybe this will work with the Mediawiki application, but there is one reason why I did not continue to explore. Binary means we will not be able to read the contents of text columns in the MySQL shell. Example:

mysql> alter table category convert to character set binary;

mysql> select * from category limit 1;

+--------+----------------------+-----------+-------------+-----------+

| 151434 | 0x4C697374656E       |       599 |           3 |         0 |

+--------+----------------------+-----------+-------------+-----------+

1 row in set (0,00 sec)


The result is not practical for me, so I stopped here.

Next idea was ALTER TABLE to utfmb4. This might work with Mediawiki, - I don't know -, but once more it did not solve my original problem within MySQL shell. Any special characters e.g. german umlauts appear to be cryptic glyphs in the shell, before ALTER TABLE as well as after.

mysql> alter table category convert to character set utf8mb4;

mysql> select * from category where cat_id=151642;

+--------+-----------+-----------+-------------+-----------+

| 151642 | Städte   |      2505 |           0 |         0 |

+--------+-----------+-----------+-------------+-----------+

1 row in set (0,00 sec)

mysql> select * from category where cat_title='Städte';

Empty set (0,00 sec)

mysql> select * from category where cat_title like 'St%dte';

+--------+-----------+-----------+-------------+-----------+

| 151642 | Städte   |      2505 |           0 |         0 |

+--------+-----------+-----------+-------------+-----------+

1 row in set (0,00 sec)


To solve the special characters issue, it seems to be necessary to first convert to binary and then in a second step to utf8mb4.

mysql> alter table category convert to character set binary;

mysql> alter table category convert to character set utf8mb4;

This is only half of the jackpot. The conversion to binary changes the columns' data types to varbinary, so the second ALTER just sets the table's defaults. It is necessary to restore the columns:

mysql> alter table category modify cat_title varchar(255) character set utf8mb4 unique not null default 'NULL';

Now everything is fine within the MySQL shell:

mysql> select * from category where cat_title='Städte';

+--------+-----------+-----------+-------------+-----------+

| 151642 | Städte    |      2505 |           0 |         0 |

+--------+-----------+-----------+-------------+-----------+

1 row in set (0,00 sec)


The double conversion is not my invention, I found it on the web:

//nicj.net/mysql-converting-an-incorrect-latin1-column-to-utf8/

Other users seem to have the same problem. It is a "devil of a job" to manually convert each single table and column, especially because we'll have to restore any single column attribute which is very error-prone. Therefore the script this guy developed might be useful (//github.com/nicjansma/mysql-convert-latin1-to-utf8).

Currently I am running some tests with this script. Still having issues. There are a few duplicate keys, which I need to eliminate before doing the conversion, not a big issue. Some of the columns seem to be left unchanged for whatever reason. The drama is going on ...

Jonathan3 (talkcontribs)

Thanks for reporting back! I'm reading with interest.

2003:C2:3F04:7000:E9C9:486C:B6FB:98EA (talkcontribs)

Conversion of the test wiki succeeded! We have had some duplicate keys in the page and pagelinks table which I had to cleanup before I could finish the task. (Think of page names like "Cäsar" and "CÄSAR"). Another issue was the searchindex. My solution: Drop the table before running the conversion script, then after conversion I imported an empty searchindex table, modified charset/collation and recreated the index by rebuildtextindex.php


Now we are testing, testing, testing.


All tables, all columns with old character sets and collations have been changed. Great script. Now there is only one small thing left. Newer tables like e.g. actor use only binary types. (Though $wgDBTableOptions = ENGINE=InnoDB, DEFAULT CHARSET=utf8 ...!) I'm turning towards other things now and may get back to the binary columns another time.

2003:C2:3F04:7000:20F1:2D93:3B5D:D6BD (talkcontribs)

One last hint for whoever may be interested in the results. The above-mentioned script changed the text table, old_text column from mediumtext latin1 to mediumtext utf8mb4 just as intended. This has one little disadvantage. The search/replace feature cannot handle REGEXP, then. The result will always be "Error 3995: Character set [...] cannot be used in conjunction with 'binary' in call to regexp_like"


Solution: ALTER TABLE `ppdb`.`text` MODIFY `old_text` mediumblob NOT NULL;

2003:C2:3F30:A000:55E0:6D6D:CE8:3CD5 (talkcontribs)

And one more hint, if s.o. decides to follow the above-mentioned procedure, then you should take a look at Topic:Wxuxqpbsg2o7c1l3

Valerio Bozzolan (talkcontribs)

Should this information (preferred charset = binary / utf8mb4_0900_as_cs) be more visible on the MediaWiki installation page?

Reply to "Recommended character set and collation?"

Class "ResourceLoaderSkinModule" not found

3
Summary by Tunglinwu

UPDATE VECTOR SKIN

Tunglinwu (talkcontribs)

when I try install v1.42, this error showed

Class "ResourceLoaderSkinModule" not found

Malyacko (talkcontribs)

Which exact (URL) installation guide do you follow, and at which exact step are you?

Tunglinwu (talkcontribs)

I want open Main Page.

I have been update vactor skin and fixed.

How to set italic font

2
101.109.31.151 (talkcontribs)

I managed to set a google font (Lato) as the default font in my wiki. However, for the italics, it does not appear as the actual italic font, rather just a slanted version of Lato (faux italic). I wanted it to get actual true italic of the font, how do I do that?

This is my code in MediaWiki:Common.css:

@import url('https://(google api)/css2?family=Lato&display=swap')

body * { font-family: "Lato", sans-serif!important;

}

101.109.31.151 (talkcontribs)

Also I typed (google api) instead of the actual link here to avoid abuse filter.

Reply to "How to set italic font"

I have a mediawiki db export that is a few years old. What's the best way to preview it?

3
AslanFrench (talkcontribs)

I ran my own mediawiki wiki sometime in 2018/19 and I have an export of the DB. What's the best way for me to view this export?


I worry that if I try to stand up a new mediawiki instance and run it on there it will corrupt or not be able to read the db. I was hoping there might be an easy way I could preview what is in the DB or perhaps convert it to another format like markdown. Any suggestions?

Bawolff (talkcontribs)

Easiest way is to just install mediawiki.

I guess you could try and look for specific text in the dump with grep.

AslanFrench (talkcontribs)

I was hoping to avoid that, espc since I don't actually remember which version of mediawiki it ran on.

Reply to "I have a mediawiki db export that is a few years old. What's the best way to preview it?"