Last modified: 2013-12-17 10:25:11 UTC
After installing Scribunto, several users have reported problems with text/plain and have been using the fix at the end of this blog post: http://trog.qgl.org/20110815/setting-up-infobox-templates-in-mediawiki The XML file that is output in step 3 appears to erroneously (?) use text/plain as the format type. If you edit this XML file in your text editor and replace all incidents of ‘text/plain’ with ‘CONTENT_FORMAT_TEXT’ (I only found two), the import will be successful and the infobox tags looks like they work.
"text/plain" is correct. Due to a bug (see Gerrit change #61468), old versions of Scribunto were using the erroneous "CONTENT_FORMAT_TEXT". And presumably all these people are downloading the out-of-date 1.21 branch of Scribunto. If we were to ever backport some of these changes to the 1.21 branch of Scribunto as I suggested a while back, we wouldn't see this sort of thing so much. Or once 1.22 is released, the corresponding 1.22 branch of Scribunto will have these fixes included. If you want to repurpose this bug as "backport various bug fixes to the 1.21 branch", feel free. Otherwise, RESOLVED INVALID. FYI, the list of candidate code changes is: a0a1b05 Improve mw.text.nowiki, part 2 29eb0f4 Improve mw.text.nowiki 6875792 Scribunto should error out sooner if lua isn't executable 8e6e07c Handle backtrace where Lua can't guess the function name 4d479d0 Remove explicit direction: ltr 349fbb2 Fix possible fatal error 5a9b7cc More-compatible Linux standalone binaries d9ba200 Add mw.logObject e08b2a4 Update ignores for some emacs tmp files c7246a1 Improve disable_functions handling in LuaStandalone 25cbfd7 Make lang:parseFormattedNumber more like tonumber d831453 Fix mw.ustring edge cases ad3e5a7 Fix LuaSandbox mw.ustring.byteoffset with negative 'i' e12d743 Handle bogus entries in MediaWiki:Scribunto-doc-page-name 1050d29 Modules should be in English (while docs are not) 1ef4cd1 Fix uncaught exception in LuaStandalone 82820aa Add frontier pattern (%f[set]) to ustring d6f3633 (bug 47365) Fix edge cases in mw.ustring.find, mw.ustring.match 1e02fad Fix content format for ScribuntoContentHander 3622f82 (bug 47300) Fix sandboxing with require 203b3e7 Don't pass negative years to Language::sprintfDate 821ba40 (bug 47268) lang:parseFormattedNumber should return a number, not a string 581b230 Remove mw.getLogBuffer and others from public interface 71d9f60 (bug 46294) Fix for Windows text-mode file handles adb7b5f Make pairs() work with various library objects 4374903 (bug 46635) Recognize Windows path+drive letter 5989d28 (bug 39655) Add Lua version info to Special:Version 3d4a816 (bug 46405) Fix errors in mw.title.new( pageid ) 0db3d7c Add text module 0dc45ff Improve caching in fetchModuleFromParser 53c4656 Don't record self-link from mw.title If you cherry-pick them in the reverse of the order listed here (i.e. 53c4656 first, a0a1b05 last), the only one that doesn't pick cleanly is c7246a1 and that's simple to resolve. I've excluded 541e61a (and followups) and ca3b0b5 because they depend on core changes in 1.22. I haven't tested the resulting code, though.
(In reply to comment #1) > If you want to repurpose this bug as "backport various bug fixes to the 1.21 > branch", feel free. Otherwise, RESOLVED INVALID. Done.
(In reply to comment #1) > I've excluded 541e61a (and followups) and ca3b0b5 > because they depend on core changes in 1.22. I haven't tested the resulting > code, though. Isn't the core change (I339b8820) necessary for 541e61a, cfdd099, and 18f8583 already in 1.21, or is there some follow-up in core I'm overlooking? At least the current version of enwiki's Module:Italic title works for me in 1.21 using the master branch of Scribunto. (The core change necessary for ca3b0b5 to work as intended isn't in 1.21 though.)
(In reply to comment #3) > > Isn't the core change (I339b8820) necessary for 541e61a, cfdd099, and 18f8583 > already in 1.21, or is there some follow-up in core I'm overlooking? I did not know that was backported. Nifty, feel free to include those revs in the list then.
So Mark attempted to cherry-pick all those changes to REL1_21 which I found messy. If REL1_22 of Scribunto ends up working properly on a MediaWiki 1.21 install, I think we should simply bump Scribunto REL1_21 to REL1_22. That would be way simpler. Ideally, we would tag Scribunto 1.21.1 as pointing to the same commit as REL1_22, but I don't think we are using tags in extensions.