Undeclared dependencies to mw.util, mw.notify etc need to be explicitly loaded after the deprecation of wikibits (T122755).
>>! In T122755#3224920, @Nemo_bis wrote:
> mw.util is probably used in a now-broken way in hundreds of gadgets and common.js. Someone please mwgrep the wikis to see the affected ns8 pages at least. Then we can notify the local administrators and hopefully the global interface editors can help as well.
>
> (If we don't get some speed at fixing this breakage, a revert may be in order.)
Even if it is going to be temporarily reverted, I'd expect that we will have to eventually make these undeclared dependencies explicit.
## Suggested fixes
For Common.js, a typical fix with [[https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Client-side_.28dynamically.29|mw.loader.using]] will look like this:
```lang=js,name=Before
(function() {
...
mw.util.getParamValue( 'withJS' ); /* util is used but not loaded */
...
})();
```
```lang=js,name=After
mw.loader.using(['mediawiki.util']).then(function() {
...
mw.util.getParamValue( 'withJS' );
...
});
```
For gadgets, typically the right fix is to add necessary [[https://www.mediawiki.org/wiki/Extension:Gadgets#Options|dependencies]] into options written in the MediaWiki:Gadgets-definition.