Page MenuHomePhabricator

Special:GadgetUsage does not filter out non-existent/removed gadgets
Closed, ResolvedPublic1 Estimated Story Points

Description

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.

Related Objects

Event Timeline

Legoktm raised the priority of this task from to Low.
Legoktm updated the task description. (Show Details)
Legoktm added subscribers: Legoktm, Niharika.

@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?

In T117120#1775976, @NiharikaKohli wrote:

@Legoktm, is the isValidGadgetID() function in Gadget_body.php a good way to filter out invalid gadgets?

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.

Niharika set Security to None.
Niharika moved this task from New & TBD Tickets to Product backlog on the Community-Tech board.
Niharika edited projects, added Community-Tech-Sprint; removed Community-Tech.
Niharika edited a custom field.
Niharika added a subscriber: kaldari.

Change 250602 had a related patch set uploaded (by Niharika29):
Remove non-existent gadgets from Special:GadgetUsage

https://gerrit.wikimedia.org/r/250602

Change 250602 merged by jenkins-bot:
Remove non-existent gadgets from Special:GadgetUsage

https://gerrit.wikimedia.org/r/250602