Topic on Extension talk:Scribunto

Lua error in Module:Navbar at line 62: Invalid title {{subst:PAGENAME}}.

9
Chenpanxyz (talkcontribs)

I followed Manual:Importing Wikipedia infoboxes tutorial to import the infoboxes from Wikipedia.

My mediawiki is version 1.34.

I have Scribunto installed.

When I checked mywiki/Template:Infobox. I got the following error: Lua error in Module:Navbar at line 62: Invalid title {{subst:PAGENAME}}.

The backtrace is:

Lua error in Module:Navbar at line 62: Invalid title {{subst:PAGENAME}}.

Backtrace:

  1. (tail call): ?
  2. [C]: in function "error"
  3. Module:Navbar:62: in function "navbar"
  4. Module:Infobox:256: in function "renderNavBar"
  5. Module:Infobox:322: ?
  6. (tail call): ?
  7. mw.lua:511: ?
  8. (tail call): ?
  9. [C]: in function "xpcall"
  10. MWServer.lua:99: in function "handleCall"
  11. MWServer.lua:313: in function "dispatch"
  12. MWServer.lua:70: ?
  13. (tail call): ?
  14. mw.lua:169: ?
  15. Module:Arguments:254: ?
  16. Module:Documentation:650: in function "_content"
  17. Module:Documentation:140: ?
  18. (tail call): ?
  19. mw.lua:511: ?
  20. (tail call): ?
  21. [C]: in function "xpcall"
  22. MWServer.lua:99: in function "handleCall"
  23. MWServer.lua:313: in function "dispatch"
  24. MWServer.lua:52: in function "execute"
  25. mw_main.lua:7: in main chunk
  26. [C]: ?

Any help would be greatly appreciated. I have spent the whole day trying to figure it out but didn't make it.

Thanks.

Tacsipacsi (talkcontribs)

You should not place {{subst:PAGENAME}} in an <includeonly> block (in wiki code). Either remove the <includeonly> and </includeonly> tags, or manually replace {{subst:PAGENAME}} with the actual template name.

Chenpanxyz (talkcontribs)

But I didn't write the code, I just imported from Wikipedia. Thanks.

Tacsipacsi (talkcontribs)

Yes, you did write the template code. It’s not about the Lua module, it’s about the navbox you created using the module. Or what Wikipedia navbox did you import?

65.93.136.82 (talkcontribs)

Hi, thanks for replying so fast!

I didn't create any navbox, neither did I import any from Wikipedia. I just imported infobox and infobox/doc. And then I got this error at /Template:Info at the beginning of examples section (Template:Infobox#Examples).

Tacsipacsi (talkcontribs)

The code snippets containing {{subst:PAGENAME}} should not be executed to begin with. Do you have Extension:SyntaxHighlight installed?

Chenpanxyz (talkcontribs)

No. I don't have this extension. Is this the reason?

Tacsipacsi (talkcontribs)

Yes.

Chenpanxyz (talkcontribs)

Thank you so much. It fixed the issue!

Happy New Year!

Reply to "Lua error in Module:Navbar at line 62: Invalid title {{subst:PAGENAME}}."