https://bugzilla.wikimedia.org/show_bug.cgi?id=51504

       Web browser: ---
            Bug ID: 51504
           Summary: Import failed: Format text/plain is not supported for
                    content model Scribunto
           Product: MediaWiki
           Version: 1.22-git
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Export/Import
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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
------------------
1. go to http://commons.wikimedia.org/wiki/Special:Export
2. export the Template:Institution
   √ Include only the current revision, not the full history
   √ Include templates
   √ Save as file
3. go to local wiki http://mywiki/wiki/Special:Import
4. select the file saved in step 2.


results
-------
1. all templates import without issue
2. Import failed: Format text/plain is not supported for content model
Scribunto
3. 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
----------------
1. all templates import without issue
2. all modules import without issue


current method for avoiding the issue
-------------------------------------
1. in the exported xml file remove any Module pages
2. create the Module pages manually
3. import using the modified export file

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to