Background
When attempting to access the IPInfo popup, some devs are seeing an error that the function mw.user.getRights is undefined.
mw.user.getRights is defined in mediawiki.user.js, which is loaded in the module mediawiki.user, defined here in Resources.php: https://gerrit.wikimedia.org/g/mediawiki/core/+/5250bab937083979880e01ca2414ef71267dffb7/resources/Resources.php#1213
IPInfo's module ext.ipInfo uses getRights here: https://gerrit.wikimedia.org/g/mediawiki/extensions/IPInfo/+/13ffefdb4341b614c5765f1438d2a13982529f1a/modules/ext.ipInfo/log.js#32
ext.ipInfo should therefore have a dependency on mediawiki.user.
Acceptance criteria
- IPInfo/extension.json adds a dependency on mediawiki.user to the list of dependencies for the ext.ipInfo module: https://gerrit.wikimedia.org/g/mediawiki/extensions/IPInfo/+/13ffefdb4341b614c5765f1438d2a13982529f1a/extension.json#138
- It is possible to use the popup on Special:Log and history pages without encountering the error that mw.user.getRights is undefined
Background reading
- Documentation on how extension.json defines modules and their dependencies: https://www.mediawiki.org/wiki/Manual:$wgResourceModules
- General documentation on ResourceLoader: https://www.mediawiki.org/wiki/ResourceLoader (This is very detailed and more than is needed for this task. It is worth getting to know over time though.)
Testing notes
- To test on Special:Log, just visit Special:Log and click on an (i) button next to an IP address. IP information should appear in the popup, with no errors.
- To test on a history page, go to an article page and click on the history link (top right). Click on an (i) button next to an IP address who has edited the page. IP information should appear in the popup, with no errors.