"Lua error in package.lua at line 80: module `Module:No globals' not found. Backtrace: [C]: in function "error" package.lua:80: in function "load" package.lua:99: in function "require" Module:Sidebar:4: in main chunk (tail call): ?"
ALL POSTSHow do I get navbox to work on my Wiki?
<p>I have copy-pasted the navbox module and template from mediawiki.org, but they give me the following script error:
</p>
(Edited by administrators)
<p>Well clearly I'm not an expert on this as I was the one to ask this question to begin with but may I ask which Wiki did ya get the code (both the module & template) from? I suspect at least part of the problem is that you don't have the module navbar on your Wiki and it is listed in the lua coding (line 7) as a required script.
</p><p>For future reference, so you can spot these requirements in the module script for yourself, line 7 reads:
</p>
<div dir="ltr" class="mw-geshi mw-content-ltr"><div class="lua source-lua">
<span class="kw1">local</span> navbar <span class="sy0">=</span> <span class="kw3">require</span><span class="br0">(</span><span class="st0">'Module:Navbar'</span><span class="br0">)</span><span class="sy0">.</span>_navbar</div></div>
(Edited by Fuse809)
<p>The script error is caused by <i>Module:Documentation</i>, not <i>Module:Navbox</i>. Please create a new thread for this problem.
</p>
(Edited by Arkondi)
<div class="quote"><i>
<p>Dessamator wrote:
Perhaps it would be better to copy those modules to this wikia and debug them. I'm guessing this is an oft used template, and it seems to use javascript too (according to their talk page). Especially considerering that w:c:templates is doesn't seem interested in adopting or creating lua based templates.
</p>
</i></div>
<p>I am definitely interested in getting Lua templates set up on Templates; the problem is that I don't know Lua myself: we need someone there who does and who would be willing to import and debug, or write and maintain, modules for it. Lack of interest is only a problem insofar as there's a much more general lack of interest in experienced template editors helping out on Templates. </p>
<p>I am definitely interested in getting Lua templates set up on Templates; the problem is that I don't know Lua myself: we need someone there who does and who would be willing to import and debug, or write and maintain, modules for it. Lack of interest is only a problem insofar as there's a much more general lack of interest in experienced template editors helping out on Templates. </p>
(Edited by Dinoguy1000-fduser)
<div class="quote"><i>Dinoguy1000 wrote:
<div class="quote"> <p>Dessamator wrote: Perhaps it would be better to copy those modules to this wikia and debug them. I'm guessing this is an oft used template, and it seems to use javascript too (according to their talk page). Especially considerering that w:c:templates is doesn't seem interested in adopting or creating lua based templates. </p> </i></div>
<p>I am definitely interested in getting Lua templates set up on Templates; the problem is that I don't know Lua myself: we need someone there who does and who would be willing to import and debug, or write and maintain, modules for it. Lack of interest is only a problem insofar as there's a much more general lack of interest in experienced template editors helping out on Templates. </p> </div> <p>Well, lua-based templates rely on modules, and these can only be created by those with lua know-how. Despite it being a programming language, lua is quite easy to learn even by those with no programming background. </p><p>The best thing would be to setup small lua-based tutorials and lessons to introduce regular users to creating/debugging modules and templates. However, I agree that experienced lua programmers or scripters are necessary to help with that endeavour. </p><p>Perhaps a better solution would be to create a lua sub-forum here for these purposes which can then be linked to w:c:templates. That way the programmers here can help debug the most popular modules and someone can add them to the w:c:templates. </p>
<div class="quote"> <p>Dessamator wrote: Perhaps it would be better to copy those modules to this wikia and debug them. I'm guessing this is an oft used template, and it seems to use javascript too (according to their talk page). Especially considerering that w:c:templates is doesn't seem interested in adopting or creating lua based templates. </p> </i></div>
<p>I am definitely interested in getting Lua templates set up on Templates; the problem is that I don't know Lua myself: we need someone there who does and who would be willing to import and debug, or write and maintain, modules for it. Lack of interest is only a problem insofar as there's a much more general lack of interest in experienced template editors helping out on Templates. </p> </div> <p>Well, lua-based templates rely on modules, and these can only be created by those with lua know-how. Despite it being a programming language, lua is quite easy to learn even by those with no programming background. </p><p>The best thing would be to setup small lua-based tutorials and lessons to introduce regular users to creating/debugging modules and templates. However, I agree that experienced lua programmers or scripters are necessary to help with that endeavour. </p><p>Perhaps a better solution would be to create a lua sub-forum here for these purposes which can then be linked to w:c:templates. That way the programmers here can help debug the most popular modules and someone can add them to the w:c:templates. </p>
(Edited by Dessamator)
<p>I'm aware Lua uses modules rather than templates; I just don't see any real need to make the distinction in casual discussion between people who already understand this. =)
</p><p>I don't know if Templates is really the ideal place for such materials; if it is, then it's already lacking in them for non-Lua templates, so that shouldn't be considered a sticking point here.
</p><p>If you think that's what's needed, go for it, I suppose; I don't really have an opinion myself.
</p><p>Speaking a bit more generally for a minute, I would like to see both Wikia-specific modules and Wikipedia modules that have been adapted to work on Wikia. This would be an extension of the tendency already present to feature two versions of templates, one from Wikipedia and one written specifically for Wikia.
</p>
(Edited by Dinoguy1000-fduser)
<div class="quote"><i>Dinoguy1000 wrote:
I'm aware Lua uses modules rather than templates; I just don't see any real need to make the distinction in casual discussion between people who already understand this. =) <p>I don't know if Templates is really the ideal place for such materials; if it is, then it's already lacking in them for non-Lua templates, so that shouldn't be considered a sticking point here. </p><p>If you think that's what's needed, go for it, I suppose; I don't really have an opinion myself. </p><p>Speaking a bit more generally for a minute, I would like to see both Wikia-specific modules and Wikipedia modules that have been adapted to work on Wikia. This would be an extension of the tendency already present to feature two versions of templates, one from Wikipedia and one written specifically for Wikia. </p> </i></div>
<p>Well, I made the distinction because the Templates wikia stores templates, and modules are not necessarily templates, just functions that can be used by pages (which include templates). </p><p>I'm also not sure if Templates is the ideal place for it, as that is something the admins of templates.wikia.com should get behind and promote if they deem it necessary. </p><p>As far as wikia staff is concerned this wikia seems to be designated place for lua-modules. </p><p>Anyway, I think we've basically hijacked this thread, and are largely off-topic. If you wish to pursue the idea of creating tutorials or adding support for it in Templates, perhaps another thread should be created for those purposes. </p>
I'm aware Lua uses modules rather than templates; I just don't see any real need to make the distinction in casual discussion between people who already understand this. =) <p>I don't know if Templates is really the ideal place for such materials; if it is, then it's already lacking in them for non-Lua templates, so that shouldn't be considered a sticking point here. </p><p>If you think that's what's needed, go for it, I suppose; I don't really have an opinion myself. </p><p>Speaking a bit more generally for a minute, I would like to see both Wikia-specific modules and Wikipedia modules that have been adapted to work on Wikia. This would be an extension of the tendency already present to feature two versions of templates, one from Wikipedia and one written specifically for Wikia. </p> </i></div>
<p>Well, I made the distinction because the Templates wikia stores templates, and modules are not necessarily templates, just functions that can be used by pages (which include templates). </p><p>I'm also not sure if Templates is the ideal place for it, as that is something the admins of templates.wikia.com should get behind and promote if they deem it necessary. </p><p>As far as wikia staff is concerned this wikia seems to be designated place for lua-modules. </p><p>Anyway, I think we've basically hijacked this thread, and are largely off-topic. If you wish to pursue the idea of creating tutorials or adding support for it in Templates, perhaps another thread should be created for those purposes. </p>
(Edited by Dessamator)
<div class="quote"><i>
<p>Dessamator wrote:
Anyway, I think we've basically hijacked this thread, and are largely off-topic. If you wish to pursue the idea of creating tutorials or adding support for it in Templates, perhaps another thread should be created for those purposes.
</p>
</i></div>
<p>Yeah, I was considering suggesting we split this conversation into a different thread. I've quoted the relevant posts from here and left a reply over that way. =) </p>
<p>Yeah, I was considering suggesting we split this conversation into a different thread. I've quoted the relevant posts from here and left a reply over that way. =) </p>
(Edited by Dinoguy1000-fduser)
<p>I tried to set this up on tibia.wikia.com with some advice from this thread, but I don't know what to do with this error:
</p>
Lua error: bad argument #1 to 'gsub' (string expected, got number). Backtrace: [C]: in function "v" mw.ustring.lua:61: in function "v" (tail call): ? mw.html.lua:121: in function "_build" mw.html.lua:136: in function "_build" mw.html.lua:52: in function "_build" [C]: in function "tostring" Module:Navbox:386: in function "tostring" (tail call): ? mw.lua:425: ?<p>Any ideas? Why would a number appear in that spot is behind me. </p>
(Edited by Bennie)
<div class="quote"><i>Bennie wrote:
I tried to set this up on tibia.wikia.com with some advice from this thread, but I don't know what to do with this error:
<p>Try following the instructions in these docs: </p>
I tried to set this up on tibia.wikia.com with some advice from this thread, but I don't know what to do with this error:
Lua error: bad argument #1 to 'gsub' (string expected, got number). Backtrace: [C]: in function "v" mw.ustring.lua:61: in function "v" (tail call): ? mw.html.lua:121: in function "_build" mw.html.lua:136: in function "_build" mw.html.lua:52: in function "_build" [C]: in function "tostring" Module:Navbox:386: in function "tostring" (tail call): ? mw.lua:425: ?<p>Any ideas? Why would a number appear in that spot is behind me. </p> </i></div>
<p>Try following the instructions in these docs: </p>
(Edited by Dessamator)
<p>Thanks Dessamator, that helped!
</p>
(Edited by Bennie)