Change Details

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 will look like this:
```
/* Before */
(function() {
...
mw.util.getParamValue( 'withJS' ); /* util is used but not loaded */
...
})();
/* After */
mw.loader.using(['mediawiki.util']).done(function() {
...
mw.util.getParamValue( 'withJS' );
...
});
```
For gadgets, typically the right fix is to add necessary dependencies into options written in the MediaWiki:Gadgets-definition: https://www.mediawiki.org/wiki/Extension:Gadgets#Options

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 will look like this:
```
/* Before */
(function() {
...
mw.util.getParamValue( 'withJS' ); /* util is used but not loaded */
...
})();
```
```
/* After */
mw.loader.using(['mediawiki.util']).done(function() {
...
mw.util.getParamValue( 'withJS' );
...
});
```
For gadgets, typically the right fix is to add necessary dependencies into options written in the MediaWiki:Gadgets-definition: https://www.mediawiki.org/wiki/Extension:Gadgets#Options

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 will look like this:
```
/* Before */
(function() {
...
mw.util.getParamValue( 'withJS' ); /* util is used but not loaded */
...
})();
```
```
/* After */
mw.loader.using(['mediawiki.util']).done(function() {
...
mw.util.getParamValue( 'withJS' );
...
});
```
For gadgets, typically the right fix is to add necessary dependencies into options written in the MediaWiki:Gadgets-definition: https://www.mediawiki.org/wiki/Extension:Gadgets#Options