I've created two pages with exactly the same code:
- https://pt.wikibooks.org/wiki/MediaWiki:Gadget-EnhancedSearch.js/Core.js
- https://pt.wikipedia.org/wiki/MediaWiki:Gadget-EnhancedSearch.js/Core.js
and defined one gadget in each project, both with the same definition:
- EnhancedSearchCore[ResourceLoader|rights=oculto]|EnhancedSearch.js/Core.js
The one at ptwikibooks correctly generates a module "ext.gadget.EnhancedSearchCore":
but the one on ptwiki is "empty":
More precisely, it contains only this code:
mw.loader.implement("ext.gadget.EnhancedSearchCore",function(){;},{},{});
/* cache key: ptwiki:resourceloader:filter:minify-js:7:afdac18b7c74164d7ddfb2546d8b3023 */
and as such it does nothing when we try to load it with mw.loader.load as a (minified) module:
https://pt.wikipedia.org/wiki/MediaWiki:Gadget-EnhancedSearch.js?diff=32178987
Why mw.loader.load gets an empty module on ptwiki?
Here are some extra examples:
- works:
https://bits.wikimedia.org/pt.wikipedia.org/load.php?modules=ext.gadget.Topicon
- do not works:
https://bits.wikimedia.org/pt.wikipedia.org/load.php?modules=ext.gadget.NewVillagePumpCore
Version: unspecified
Severity: normal