https://bugzilla.wikimedia.org/show_bug.cgi?id=50829

--- Comment #9 from Andrew Green <andrew.green...@gmail.com> ---
Just to elaborate a bit on what Sage said ^ , this issue came up with regard to
a notification in the Education Program extension.

See:
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FEducationProgram/520430baeb85384bab46442ef654ec043a4c0b5b/includes%2Fnotifications%2FCourseTalkNotification.php
and
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FEducationProgram/520430baeb85384bab46442ef654ec043a4c0b5b/includes%2Fnotifications%2FCourseTalkFormatter.php

In a nutshell, when the notification is triggered, the extension *does* send a
revid in the 'extras' parameter. Maybe I'm missing something, but the only
place I see in core to get to the title of a deleted article from the revid is
ApiQueryDeletedrevs.

We could call that API using DerivativeRequest, but in addition that API checks
for the "deletedhistory" user right, not something a notification should try to
hack around.

We could also just access the archive table directly, but doing that in a
notification formatter would be ugly.

As far as I can see, there are two real options:
- Implement in core a simple interface for getting the last title of a deleted
article from the pageId. (Apologies if it's already there and I didn't see it.)
 Then add code to Echo for fetching a title object or title text if the page
represented by the 'title' parameter has been deleted.
- Make Echo store the title text somewhere in the notification, so that it can
be retrieved by a formatter if the page has been deleted.

These options have different implications with regard to performance and what
the user sees if a page is moved.

It's true we could implement workarounds, but I think a proper fix is Echo's
domain, with changes possibly needed in core depending on the approach.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to