Page MenuHomePhabricator

Show disallowed message for AbuseFilter with disallow action but without warn action in CX card
Open, MediumPublic

Description

If disallowed message is set but no warning message in AbuseFilter. Show the disallowed message in CX card.

Admin can set system message of disallow action on AbuseFilter now. The message doesn't show in CX card. It should be shown as AbuseFilter with warn action.
Actual result: https://commons.wikimedia.org/wiki/File:CX_AbuseFilter_disallowed_card_zhwiki.png
Excepted result: https://commons.wikimedia.org/wiki/File:CX_card_for_AbuseFilter_with_warning_message_and_disallow_action_on_zhwiki.png (I set the AbuseFilter with warn action to show the message in CX card.)

Event Timeline

Proposed code changes:
AbuseFilterCheck.php#129: Set $val['disallow']['messageHtml'] from $val['disallow']['parameters'].
mw.cx.TranslationController.js#405: Use validation.disallow.messageHtml if validation.warn.messageHtml is not available.

Pginer-WMF triaged this task as Medium priority.Apr 21 2020, 8:40 AM