Page MenuHomePhabricator

The global word -frame- is very probably not global and stops the development of the Module:Centralizer
Closed, InvalidPublic

Description

The background is that the Module:Centralizer, which I develop, supports any tree of versatile sub-modules and that it must in all cases simply access the main module and its name.

  • On the basis of a dedicated test of 10 lines, it seems certain that the global name -frame- ... is not global.

The problem is that then the Module:Centralizer can not access the main module and its name.

  • You can watch the test and its result here.

Of course, to continue my development normally, I need an effective "framework".

  • To debug, I suggest looking in the mediawiki changes.

According to the dates of my debugs, the most likely ones seem to be:
versid = "1.34.0-wmf.19 (rMWefab97f4a070)", seen_time = "2019-08-23T07

  • I hope that the return to normal operation will allow me to continue my development soon.
  • When the Module:Centralizer will be effective, I will share it with many advanced Lua coders and I will help them convert and improve more and more modules.

This benefits technically to them and me (Rical). But mainly to all Wikipedia readers in all languages. This only requires the translation of a hundred short sentences in each language.

Related Objects

Event Timeline

Aklapper changed the task status from Open to Stalled.Sep 1 2019, 12:43 PM

Hi Rical. As requested before, please always provide a more complete description to this report: A clear list of specific steps to reproduce the situation, step by step, actual results, and expected results, plus provide a link to a public website with a minimal testcase where the issue can be seen.

I have no idea where you use frame. So nobody can take a look at the code which creates this problem.

You can edit the task description by clicking Edit Task.

Ideally, exact and clear steps to reproduce should allow any other person to follow these steps (without having to interpret those steps) and see the same results. Problems that others can reliably reproduce can get fixed faster. Thanks!

Furthermore, I have no idea what the last comment means or why you posted it here.

@Aklapper: The original poster linked to Modèle:MdTests/documentation on French Wikisource, where Module:MdTests is invoked, generating a module error: "Erreur Lua dans Module:MdTests à la ligne 15 : attempt to index global 'frame' (a nil value)." A minimal version of Module:MdTests that would generate the error:

local p = {}

function p.invokedFunction()
	frame:getTitle()
end

return p

This should be:

local p = {}

function p.invokedFunction(frame)
	frame:getTitle()
end

return p

@Rical: As you say in the title of the task, frame is not a global variable. It is a type of object that is supplied as the only argument to invoked module functions and that can be created by calling mw.getCurrentFrame(). Is there some way in which your modules must have frame as global?

Thanks @Erutuon for the explanation.

@Rical: I don't see any bug or incorrect software behavior here so I'm closing this task as invalid.
In the future, please always structure any bug reports into clear separate section by following https://www.mediawiki.org/wiki/How_to_report_a_bug