Page MenuHomePhabricator

Evaluate creation of a generic "PageChanged" hook
Closed, DeclinedPublic

Description

Currently there are lots of hooks needed to catch page deletions, uploads, edits, revdeletes, moves...See FlaggedRevs and RESTbase extensions for example. It would be nice to have one hook fired for all of these, with some sort of event type string.

Event Timeline

aaron raised the priority of this task from to Needs Triage.
aaron updated the task description. (Show Details)
aaron added a project: MediaWiki-Page-editing.
aaron subscribed.
Eevans set Security to None.

@Eevans FYI, you added as "see also" this same task

Krinkle renamed this task from Generic PageChanged hook to Evaluate creation of a generic "PageChanged" hook.Apr 11 2020, 7:41 PM
Krinkle subscribed.

Without a specific problem or use case in mind, I think this would be a mistake to add now and also be very difficult to decide when to and when not to fire. (E.g. include in recursive link update jobs? null edits? visibility changes?)

I think it is important that we improve our hooks so that it is easy for an extension it hook into everything it is interested in without needing to keep up with internal refactoring and distinctions it doesn't care about. However that is also to big a scope for one task. It would be better to focus on a specific use case where something went wrong or where something is confusing/difficult and focus on that more iteratatively.

I guess one use case would be to implement some way to send emails on any edit/action to a sysadmin, or an alternative to Manual:RCFeed.

I'm not sure if RCFeeds can actually be used for this, but all extensions I've seen that send notifications to Discord or Slack when any action is done are hooked to each and every hook about edit/deletion/move/upload... which probably means RCFeeds is lacking something to be completely usable at this (or maybe those extension creators didn't know about RCFeeds)

[…] which probably means RCFeeds is lacking something to be completely usable at this (or maybe those extension creators didn't know about RCFeeds)

I suspect the latter.