Page MenuHomePhabricator

AbuseFilter: Don't show "export this filter" when importing
Closed, ResolvedPublic

Description

Steps to reproduce:

  • Go to Special:AbuseFilter/import
  • Add filter text to import
  • Click "import data" and get redirected
  • View the form at Special:AbuseFilter/New

Expected result:

  • No "Export this filter" button is shown, since the filter is being imported

Actual result:

  • "Export this filter" button is shown

2 possible solutions:

  • Remove "Export this filter" from all uses of Special:AbuseFilter/New
  • Remove it from just /New that is being imported - however the warning that "The edit wasn't saved! Please save again." is being shown when importing, but not when just creating a new filter, the same logic can be used to conditionally hide the export button

Event Timeline

DannyS712 created this task.Aug 8 2019, 8:24 PM
Restricted Application added a project: User-DannyS712. · View Herald TranscriptAug 8 2019, 8:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

A few notes for myself: we should first wait for the ViewEdit refactor (parent of the actor patch); we should also validate the input in case of import; and fix matching the edit token.

Change 529592 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Don't show export link for new filters

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

however the warning that "The edit wasn't saved! Please save again." is being shown when importing, but not when just creating a new filter, the same logic can be used to conditionally hide the export button

That's another matter, it's just a bug due to the edit token not matching, and it'll be resolved in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AbuseFilter/+/493692/.

Daimona claimed this task.Aug 11 2019, 10:27 AM
Huji closed this task as Resolved.Aug 11 2019, 4:41 PM
Huji removed a project: Patch-For-Review.

Change 529592 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Don't show export link for new filters

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