I have imported to my Miraheze site the Módulo:Ficha from the Spanish Wikipedia but I get this error:
Lua error on line 567: attempt to index field 'wikibase' (a nil value).
Reverse trace:
Module:File:567: in the "makeWikidataBar" function
Module:File:638: ?
(tail call): ?
mw.lua:527: ?
[C]: ?
In line 567 I have this code:
(Spanish)=local function hacerBarraWikidata(nule)-- Crea en la parte inferior un enlace al ítem de Wikidata
(English)=local function makeWikidataBar(nule)-- Creates a link to the Wikidata item at the bottom
In line 638 I have this code:
(Spanish)=hacerBarraWikidata()
(English)=makeWikidataBar()
I would wait for a result that would help me finish my file module since I urgently need to finish it. I have been trying for more than 3 days, but I have not succeeded.
Line 567 of https://es.wikipedia.org/wiki/M%C3%B3dulo:Ficha?oldid=155034254 is local entidad = args.entidad or mw.wikibase.getEntityIdForCurrentPage()
. The problem is that mw.wikibase
is undefined on your wiki, probably because your Miraheze wiki doesn't have https://www.mediawiki.org/wiki/Extension:Wikibase_Client enabled. https://meta.miraheze.org/wiki/Extensions says that extension is available, so one way of fixing this would be to enable it at Special:ManageWiki/extensions on your wiki. Your other option is to remove the call to hacerBarraWikidata()
on line 638, since it's the only function that references mw.wikibase
, and without that it doesn't have anything useful to do.