Last modified: 2014-11-03 17:23:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74880, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72880 - Lua error in mw.html.lua for {{infobox}} template from Wikipedia
Lua error in mw.html.lua for {{infobox}} template from Wikipedia
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
REL1_23-branch
All All
: Unprioritized major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-02 14:31 UTC by Rob Kam
Modified: 2014-11-03 17:23 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rob Kam 2014-11-02 14:31:51 UTC
[edit]
On a version 1.23.6, I've just imported Wikipedia templates: reflist, infobox and navbox, along with other templates they transclude. On many of these pages is the red "Script error" with "Lua error in mw.html.lua at line 345: Tag name must be a string." {{reflist}} and {{navbox}} seem to work ok but on a page where infobox is supposed to appear is the red Script Error instead.
Comment 1 Rob Kam 2014-11-02 14:38:58 UTC
(The above was sent too soon.) I've just imported a bunch of templates from Wikipedia along with whatever other templates Special:Export included. Now on the other wiki on many of these pages, there is in red "Script error" with "Lua error in mw.html.lua at line 345: Tag name must be a string." Some templates like reflist and navbox seem to still function but instead of infobox the page has the red Script Error instead.
Comment 2 Marius Hoch 2014-11-02 20:56:11 UTC
So... what are you reporting here? Of course tag names must be strings.
Comment 3 Rob Kam 2014-11-02 22:08:13 UTC
That (Wikipedia) Scribunto templates that should work fine instead have errors or don't work at all on non-WMF wikis.
Comment 4 Rob Kam 2014-11-02 22:11:19 UTC
I'm not writing the scripts or templates, that's how they come exported from Wikipedia.
Comment 5 Jackmcbarn 2014-11-03 01:33:57 UTC
A lot of templates from enwiki require you to use the latest version of MediaWiki (and extensions) to work properly. Note that the latest stable version is always several months behind this version.

Also, please provide the full error (including the backtrace) rather than just the first line.
Comment 6 Rob Kam 2014-11-03 08:51:23 UTC
BTW the templates were all exported from Wikipedia yesterday. The wiki is using the latest stable version 1.23.6. Just in case it might help, extensions Scribunto and Parser were replaced yesterday. All the rest of the extensions are for release 1.23. I've also copy pasted Common.css and Common.js straight from Wikipedia.

On the page with the infobox template:
Lua error in mw.html.lua at line 314: Invalid CSS given: Must be either a string or a number.
Backtrace:
(tail call): ?
[C]: in function "error"
mw.html.lua:314: in function "cssText"
Module:Infobox:252: ?
(tail call): ?
mw.lua:567: ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:87: in function "handleCall"
MWServer.lua:301: in function "dispatch"
MWServer.lua:40: in function "execute"
mw_main.lua:7: in main chunk
[C]: ?

On the infobox template page, the same error and:
Lua error in mw.html.lua at line 345: Tag name must be a string.
Backtrace:
(tail call): ?
[C]: in function "error"
mw.html.lua:345: in function "create"
Module:Documentation:129: ?
(tail call): ?
mw.lua:567: ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:87: in function "handleCall"
MWServer.lua:301: in function "dispatch"
MWServer.lua:40: in function "execute"
mw_main.lua:7: in main chunk
[C]: ?
Comment 7 Jackmcbarn 2014-11-03 12:53:17 UTC
1.23 isn't the latest version. It's just the latest stable version. Wikimedia servers run a development release of 1.25.
Comment 8 Rob Kam 2014-11-03 13:47:30 UTC
Then Wikipedia templates are incompatible with 1.23
Comment 9 Andre Klapper 2014-11-03 14:17:42 UTC
{{infobox}} from which Wikipedia? Link welcome. There are some languages... :)
Comment 11 Jackmcbarn 2014-11-03 15:07:27 UTC
(In reply to Rob Kam from comment #8)
> Then Wikipedia templates are incompatible with 1.23

Yes, some of them are.

I've looked into the specific cause in the above cases, and they're both caused by changes to mw.html in version 1.24. Although in general, core and extensions should be kept at the same version, the 1.24 branch of Scribunto is compatible with MediaWiki core 1.23. To fix the problem, you can either use 1.24 Scribunto, or if you'd rather not do that for some other reason, you can cherry-pick just the one change you need by running "git cherry-pick d1030989bc41d9fcf9b85a1496b99757077024f0" from the Scribunto directory (assuming you got it from Git).

There's no bug here, though.
Comment 12 Rob Kam 2014-11-03 17:23:16 UTC
Thanks! Changing to 1.24 Scribunto has fixed it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links