On https://www.mediawiki.org/wiki/Special:GadgetUsage I see "-WmfProjectStatusHelper" for example, but I removed that gadget a few months ago. It's not surprising that it still is in user_properties rows though. This should be filtered out at some level.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Remove non-existent gadgets from Special:GadgetUsage | mediawiki/extensions/Gadgets | master | +13 -8 |
Related Objects
- Mentioned Here
- T54777: user_properties table bloat
Event Timeline
@Legoktm, is the isValidGadgetID() function in Gadget_body.php a good way to filter out invalid gadgets? Shouldn't there be a periodic query or something to remove rows from the user_properties table itself when a gadget is removed?
No, that just checks if the name is technically allowed. To verify it is still an active gadget, just check it is in the array returned by GadgetRepo::getGadgetIds().
Shouldn't there be a periodic query or something to remove rows from the user_properties table itself when a gadget is removed?
The rows are automatically dropped whenever a user saves their preferences, so it'll go away over time. But it is generally a problem, hence the bloat ticket Helder linked.
Change 250602 had a related patch set uploaded (by Niharika29):
Remove non-existent gadgets from Special:GadgetUsage
Change 250602 merged by jenkins-bot:
Remove non-existent gadgets from Special:GadgetUsage