Page MenuHomePhabricator

MediaWiki:Abusefilter-edit-protected message is misleading
Closed, ResolvedPublicBUG REPORT

Description

The current text of message MediaWiki:Abusefilter-edit-protected, which says:

I understand that details of this filter will be hidden from users who cannot see [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:AbuseFilter/Rules_format#Protected_variables protected variables]

is misleading. It is used as a checkbox label and suggests that it does not influence the state of the filter, but rather it serves as an additional confirmation of what are the effects of the previous settings.

However, this message in fact refers to actually making the filter hidden from such users as described and not merely checking if the user knows what other fields do.

I would rephrase the label as:

Hide the details of this filter from users who cannot see [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:AbuseFilter/Rules_format#Protected_variables protected variables]

and then, if it's needed, add a proper confirmation step, to ensure that people know what they are doing by setting this to true.

Event Timeline

(my 2c) I agree this should be changed for clarity, but given that the only people who would encounter this should be users who are experienced in its functions and read up on how it works, having a confirmation for changing the publicity of a Filter probably isn't needed.

cc @KColeman-WMF

Hide the details of this filter from users who cannot see [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:AbuseFilter/Rules_format#Protected_variables protected variables]

Would this imply a level of optionality that isn't present? The filter is going to forcibly set itself to protected if it uses a protected variable.

Would this imply a level of optionality that isn't present? The filter is going to forcibly set itself to protected if it uses a protected variable.

If it's this way, maybe the confirmation checkbox should stay with the current wording but be shown only if the filter uses a protected variable?

(I've never set a filter with such variables, so I'm unsure how exactly the process looks like under the hood, but I find the confirmation that's always available confusing).

Or maybe do it this way (which I think may be very similar to what's now -- at least on a technical level):

  • The user is presented with a checkbox to "Hide the details from users ..." (or "Enable use of protected variables in this filter" with help text explaining that it will be hidden from such users and that it's irreversible)
    • If user tries to save filter with protected variables and the checkbox is not checked, an error is displayed like "This filter uses protected vars, you have to mark it as hidden in order to save it" (instead of "... you have to confirm you know what you are doing")
    • If user tries to save a filter without protected variables and the checkbox is checked:
      • If the filter used to be hidden, save normally
      • If the filter didn't use to be hidden, present an error "This filter does not use protected variables and therefore cannot be hidden this way. Uncheck the checkbox and save again"

I believe this is what already happens under the hood but with different meaning of the checkbox and text in error messages. At least from my point of view, this approach may allow to get rid of this confirmation without need to dynamically show a relevant checkbox

Thanks for raising this copy issue, we appreciate the feedback.

The current copy is based on the idea that we want an acknowledgment from users that they understand it is a protected variable and that details of it will be hidden once they hit save. T364485#9856705 So it's been designed like a T&C checkbox rather than a preference checkbox. However, if this is confusing then I agree we should update the copy as suggested:

Proposed copy changes:
Error message:Your filter was not saved because it uses [protected variables]: user_ip. Please enable use of protected variables. This action will permanently hide details of the filter from users who cannot see protected variables.
Checkbox:Enable use of [protected variables] in this filter
Checkbox helper text:Details of this filter will be hidden from users who cannot see [protected variables]. This action is permanent and cannot be undone.

cc @STran

Change #1083816 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/AbuseFilter@master] Update copy for protected variable use on filters

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

Change #1083816 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Update copy for protected variable use on filters

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

  NODES
Idea 1
idea 1
Note 3
Project 6
USERS 10