Jump to content

MediaWiki talk:Gadget-ShowMessageNames.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

jQuery3 deprecation warning

[edit]

There's a new warning in webconsole for this gadget (that inconsistently appears - I can only reproduce it occasionally with full-reloads) :

jQuery.Deferred exception: mw.util is undefined @https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ShowMessageNames.js&action=raw&ctype=text/javascript:14:3
mightThrow@https://www.mediawiki.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=1b6aucj:49:590
resolve/</process<@https://www.mediawiki.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%7Cmediawiki.legacy.wikibits&only=scripts&skin=vector&version=1b6aucj:50:269
undefined  load.php:52:398

and

JQMIGRATE: jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos

I'm not sure what needs to be changed. Perhaps mw:ResourceLoader/Core_modules#addPortletLink explains it? (or possibly that section is now outdated?). Quiddity (WMF) (talk) 19:26, 26 September 2017 (UTC)[reply]

  1. You should not load this gadget manually, it is to be enabled as a gadget (see Special:Preferences#mw-prefsection-gadgets). If you load it somewhere else than Wikipedia, you should enclose the loading command with mw.loader.using( 'mediawiki.util', function () { ... } );.
  2. This seems not to be related to this gadget: it doesn’t use any jQuery directly at all, not to speak about pseudo-classes. —Tacsipacsi (talk) 15:48, 27 September 2017 (UTC)[reply]
Perfect, fixed. Thank you! (I do a lot of testing and bug-investigation at various wikis, so this tool helps me a lot globally). Quiddity (WMF) (talk) 17:32, 27 September 2017 (UTC)[reply]