Page MenuHomePhabricator

Protected pages should be excluded from trending results
Open, Needs TriagePublic


When persistent vandalism occurs typically a page will result in being protected... without detecting this it will also trend.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 9 2017, 12:24 PM
Jdlrobson moved this task from Backlog to Next up on the Trending-Service board.Feb 10 2017, 6:35 PM
Jdlrobson moved this task from Next up to Backlog on the Trending-Service board.Mar 16 2017, 4:54 PM

@Ottomata is there an event fired in eventbus when a page becomes protected? I can't see one on

Looking to the code, it seems like the page protection is not a page_property, so it's not accessible via the properties-change event and changing it doesn't emit a new event.

There's an AtrictleProtectComplete, so we can add an event for protection changes. @Ottomata @mobrovac What do you think? One more event?

I'm all for more events! :)

+1 on emitting an event from the ArticleProtectComplete hook, but I would argue that conceptually that should not be a new event. My instinct was the same as @Ottomata's in that I thought protection changes should be a properties-change event; protection in my mind is a page's property.

@mobrovac Hm... The page-properties are a well defined concept in MediaWiki and it's pretty separate from the page-restrictions, they're even stored in a separate table. The properties are a map with string key and unspecified value, while restrictions are an array.. Also, restrictions can have additional properties like expiry and cascading, so if we add a separate schema for the we'd probably be able to make a better more restrictive schema.. But I'm ok with trying to put it to the properties schema as well, just don't quite see the benefit.

Hm good point re differences in representation. Let's go with page-restrictions, makes sense.

Made a subtask to track Event-Platform changes. Will try to poke around the schema and see what data can we get from the hook.

Jdlrobson moved this task from Backlog to Next up on the Trending-Service board.Mar 30 2017, 10:28 PM

Interestingly, I noticed Steve Bannon trended yesterday but got some vandalism and ended up being protected, so excluding protected pages is probably not the best thing to do.. but maybe a protection could negatively impact the score just like reverts do.

@Jdlrobson The page-restrictions-change event is there, so now you can do whatever you want with it. To subscribe to it just add the topic to the list in the EventSource

Was in "Next up" on Trending-Service workboard as of 04/25/2017.