Page MenuHomePhabricator

Missing old/new_content_model variables on Flow pages
Open, Needs TriagePublic

Description

On page edits, AbuseFilter defines old_content_model and new_content_model variables, containing the content model of the page (wikitext, css, javascript, etc).

Flow pages have the flow-board content model. One would expect these pages to have in AbuseFilter the old_content_model and new_content_model variables with value flow-board. But currently these variables are not defined on Flow pages.

This caused an issue on frwiki, as I had added a new_content_model == 'flow-board' condition, which could never match…

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 964181 had a related patch set uploaded (by Gerrit Patch Uploader; author: Anne Haunime):

[mediawiki/extensions/Flow@master] Define "old_content_model" and "new_content_model" variables on Flow pages

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

By the way, Flow has a dedicated AbuseFilter group. See the wgFlowAbuseFilterGroup variable at Extension:StructuredDiscussions#Configuration.

Filters in this group are executed only on Flow pages, and conversely, filter in other groups (i.e. the default group) are not executed on Flow pages.

Though, as stated in the documentation linked above, it is possible to set this group to the special value 'default', to discard the segregation of Flow-related filters.