some templates on commons, e.g., Template:Institution, include modules that use lua scripting. exporting those templates and then importing them into another wiki causes an error - “Import failed: Format text/plain is not supported for content model Scribunto error”.
in LocalSettings.php
require_once("$IP/extensions/ParserFunctions/ParserFunctions.php");
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
require_once("$IP/extensions/Scribunto/Scribunto.php");
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoUseGeSHi = true;
$wgScribuntoUseCodeEditor = true;
require_once("$IP/extensions/TemplateSandbox/TemplateSandbox.php");
$wgExtraNamespaces[828] = 'Module';
$wgExtraNamespaces[829] = 'Module_talk';
steps to reproduce
- go to http://commons.wikimedia.org/wiki/Special:Export
- export the Template:Institution √ Include only the current revision, not the full history √ Include templates √ Save as file
- go to local wiki http://mywiki/wiki/Special:Import
- select the file saved in step 2.
results
- all templates import without issue
- Import failed: Format text/plain is not supported for content model Scribunto
- outdated history link gets created for the module page, e.g., http://mywiki/wiki/Module:Languages - The revision #0 of the page named "Languages" does not exist. This is usually caused by following an outdated history link to a page that has been deleted. Details can be found in the deletion log.
expected results
- all templates import without issue
- all modules import without issue
current method for avoiding the issue
- in the exported xml file remove any Module pages
- create the Module pages manually
- import using the modified export file
Version: 1.22.0
Severity: normal