Page MenuHomePhabricator

nuxedtoolkit is not defined
Closed, DeclinedPublic


Hi, It seems there is JS loading issues on the French Wikisource.

In the console, I get the following messages:

 Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead.
 Use of "addOnloadHook" is deprecated. Use jQuery instead.
 Use of "hookEvent" is deprecated. Use jQuery instead.
 Use of "wgAction" is deprecated. Use mw.config instead.
 Use of "wgNamespaceNumber" is deprecated. Use mw.config instead.
 Use of "$j" is deprecated. Use $ or jQuery instead.
 Use of "write" is deprecated. Use jQuery or mw.loader.load instead.
 Use of "importScriptURI" is deprecated. Use mw.loader instead.

And when the toolbar doesn't load properly, I get:

index.php?action=raw&ctype=text/javascript&title=Wikipedysta%3ANux%2FSearchBox.js:283 Uncaught ReferenceError: nuxedtoolkit is not defined

nuxsr.init	@	index.php?action=raw&ctype=text/javascript&title=Wikipedysta%3ANux%2FSearchBox.js:283
fire	@	load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=f47W3i0j:45
self.add	@	load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=f47W3i0j:45
jQuery.fn.ready	@	load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=f47W3i0j:49
jQuery.fn.init	@	load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=f47W3i0j:41
jQuery	@	load.php?debug=false&lang=fr&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=f47W3i0j:1
(anonymous function)	@	index.php?action=raw&ctype=text/javascript&title=Wikipedysta%3ANux%2FSearchBox.js:370

Event Timeline

@Yann: What are exact steps to reproduce the problem? Go to any page? Go to edit any page?

This is also mentioned in

I guess this comes from line 283 in where it says:


I get this about once every 2 pages I edit in the Page: namespace (but it looks random).
Also mentioned in

This is caused by the fact that Resource Loader broken compatibility with old scripts (mostly because making order of custom scripts completely unpredictable). This is supposed to be fixed with Gadgets 2.0 also allowing creation of custom (user) gadgets. I'm not sure when is this coming and if it will deliver...

In the mean time - if you are an administrator - please add a gadget to your wiki and use this instead.

The gadget defintion is:
searchbox [ResourceLoader | dependencies=ext.gadget.lib-toolbar, ext.gadget.lib-sel_t ] | searchbox.css | searchbox.js

So you need 4 files.

If you would like to complain that this is overly complicated - please do... But not to me ;-)

Thanks to Nux for explaining and how this can be fixed by wiki admins.

User scripts, gadgets and templates are local features and managed independently on each wiki. Phabricator/Maniphest is used for MediaWiki, MediaWiki extensions, or server configuration. In general this is a matter to discuss and fix on the local wiki and not really handled in Phabricator/Maniphest until gets solved. Hence closing this task as declined here in Phabricator.