Page MenuHomePhabricator

VisualEditor: Show the warning of a triggered AbuseFilter filter in the save dialog
Closed, ResolvedPublic

Description

[Forked from the more general 50350.]

Currently when AbuseFilter blocks an edit made with VE, the only response we can display is:

The modification you tried to make was aborted by an extension hook

When bug 32216 is done - AbuseFilter is changed to use the APIEditBeforeSave hook - we can display this significantly more nicely.


Version: unspecified
Severity: major

Details

Reference
bz50472

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:54 AM
bzimport set Reference to bz50472.
  • Bug 50719 has been marked as a duplicate of this bug. ***

kwwilliams wrote:

I strongly, strongly object to the categorization of this as an "enhancement". This is a basic feature that needs to be addressed. There aren't many edit filters that block edits, but when an editor trips one of the ones that does, its important that he have an idea as to what to fix. There's no place for an editor to even begin looking to find out what is happening and what it is about his edit that is causing it to fail. It's not really even obvious from the message that it's a content issue.

(In reply to comment #2)

I strongly, strongly object to the categorization of this as an
"enhancement".

"Enhancement" does not mean "not going to be done soon"; it merely means that this is not a feature that's meant to be currently working, but instead, a feature we'd like to add.

This feature in particular is on our immediate work list, and hopefully will be done in the next week or so.

  • Bug 50828 has been marked as a duplicate of this bug. ***

kwwilliams wrote:

Has this actually been deployed? I just tested, and the error message has changed (it now reads "invalid error code", while it used to read "Error: the notification you have made was aborted by an extension hook"). If that was the fix, I think it's pretty obvious that it's incomplete, as it still isn't displaying the warning from the edit filter.

(In reply to comment #5)

Has this actually been deployed?

No.

I just tested, and the error message has changed (it now reads "invalid
error code", while it used to read "Error: the notification you have made
was aborted by an extension hook").

That's almost certainly caused by the "fixing" of bug 32216, which changes what we need to integrate with.

  • Bug 51139 has been marked as a duplicate of this bug. ***

Change 73877 had a related patch set uploaded by Krinkle:
mw.ViewPageTarget: Surface error messages from core edit api

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

(In reply to comment #8)

Change 73877 had a related patch set uploaded by Krinkle:
mw.ViewPageTarget: Surface error messages from core edit api

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

This is not yet sufficient since we should be surfacing the
warning associated with the filter (or the abusefilter-warning
message by default). The most significant part we're missing
right now is:

  • Localization
  • The fact that (at least for some filters) they can submit the edit by just trying again.

This is currently blocked by the AbuseFilter not sending the parsed version of the triggered warning through the API (see http://cl.ly/image/1E2r1J2U3K0v, I'm getting raw wikitext instead of HTML).

And perhaps (though less important) we could also use a boolean property to distinguish between filters that are warnings that can be bypassed by trying again and filters which prevent the user from saving.

kwwilliams wrote:

Just in case it's important to the fix, the message returned by the abuse filter is free format and generally contains templates and other markup.

Change 73877 merged by jenkins-bot:
mw.ViewPageTarget: Surface error messages from core edit api

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

Marked as blocked by 51403 in AbuseFilter.

Change 74102 had a related patch set uploaded by Krinkle:
mw.ViewPageTarget: Show AbuseFilter warning in save dialog

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

Change 74102 merged by jenkins-bot:
mw.ViewPageTarget: Show AbuseFilter warning in save dialog

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

Warnings will now show (once we deploy).

  • Bug 50727 has been marked as a duplicate of this bug. ***

enhancement->major, as this is an integration bug.

kwwilliams wrote:

Tested this, now that it is deployed, and have to say that while it the change came close to being a solution, it isn't quite there. The edit-filter notice produced when using the standard editor is large, easy to read, and quite clear. The edit-filter noticed produced when using VE is tiny, uses an infinitesimal font, and is extremely difficult to read.

Are you, by any chance, on monobook?

kwwilliams wrote:

Of course I use Monobook, Oliver.

Then I suspect the problem is an extension of bug 50058, which will be fixed in time. If so, it's probably not worth prioritising as a new bug (or reopening this one) since abusefilter triggerers are likely to be new users, ergo on vector.