Page MenuHomePhabricator

Special:GadgetUsage does not filter out non-existent/removed gadgets
Closed, ResolvedPublic1 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.

Details

Related Gerrit Patches:
mediawiki/extensions/Gadgets : masterRemove non-existent gadgets from Special:GadgetUsage

Related Objects

Event Timeline

Legoktm created this task.Oct 29 2015, 10:53 PM
Legoktm raised the priority of this task from to Low.
Legoktm updated the task description. (Show Details)
Legoktm added subscribers: Legoktm, Niharika.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 29 2015, 10:53 PM

@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 Untriaged 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.
Niharika claimed this task.Nov 3 2015, 12:41 AM
Niharika moved this task from Ready to Needs Review/Feedback on the Community-Tech-Sprint board.

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

Legoktm closed this task as Resolved.Nov 3 2015, 10:13 PM