Topic on Extension talk:Scribunto

red Script error unclickable [SOLVED]

5
Wmat (talkcontribs)

The toubleshooting section indicates that the red Script error message is clickable and will provide more detailed information. However, clicking the Script error does nothing on my system.

And the error file is simply full of many lines of:

TX ==> call
RX <== return
TX ==> call
RX <== return
TX ==> call
RX <== return
TX ==> call
RX <== return
TX ==> call
RX <== return
TX ==> call
RX <== return
TX ==> return
RX <== getStatus
TX ==> return
RX <== getStatus
TX ==> return

I've double checked the system requirements and everything seems to be fine.

Interestingly, I had it working at one point, then a User re-uploaded some Templates and Modules from Wikipedia and now I'm seeing the script errors again.

What can I do to debug this?

Anomie (talkcontribs)

If the red "Script Error" isn't clickable, you're likely running into javascript errors of some sort. Check your JavaScript console. You might also try adding "?debug=true" or "&debug=true" (depending if there's already a '?') to the URL to get more useful diagnostics.

Wmat (talkcontribs)

You're right, I see:

ReferenceError: mw is not defined

In the debugger, I find: Lua error in Module:Navbox at line 388: attempt to call method 'getTitle' (a nil value)

Line 388 is the local parentTitle = line in this function:

function p.navbox(frame)
    -- ParserFunctions considers the empty string to be false, so to preserve the previous
    -- behavior of {{navbox}}, change any empty arguments to nil, so Lua will consider
    -- them false too.
    local args = {}
    local parentTitle = frame:getParent():getTitle()
    local frame_args = (parentTitle == 'Template:Navbox' or parentTitle == 'Template:Navbox/sandbox') and frame:getParent().args or frame.args;
Anomie (talkcontribs)

The getTitle() method for frame objects is added in the version of Scribunto for MediaWiki 1.23. Earlier versions of Scribunto do not have this, which would give the error you report.

Note also that Scribunto for MediaWiki 1.23 won't work with earlier versions of MediaWiki, so you'd have to upgrade both if you want to use this method. Or you could try backporting gerrit:99797 locally.

Wmat (talkcontribs)

Thanks for the information. The Navbox module I'm using was exported from Wikipedia, so it looks like it's using newer functions. I'm usein Scribunto REL1_22 with MW 1.22.6.

As for the javascript, it turned out that SyntaxHighlightGeSHi was set to the master branch instead of the REL1_22 branch and was throwing fatal PHP errors which was killing javascript site wide.

Reply to "red Script error unclickable [SOLVED]"