Page MenuHomePhabricator

[] given as username for notification about new topic that has been removed and revision deleted
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • In a wiki with DiscussionTools enabled, subscribe to new topics to a talk page, let's say Talk:Example
  • With another account, create a new topic on Talk:Example
  • With a third, sysop account, revert the edit that added a new topic, and then revision delete the edit
  • With the first account (the one you subscribed to notifications with), check your notifications

What happens?:

  • The Echo notification you get from DiscussionTools about the new topic reads 'New topic "(topic removed)" created on Talk:Example by [].'

Example in current production:

Screenshot_20250308_142106.png (63×504 px, 6 KB)

What should have happened instead?:

  • Either there should be no notification about it at all (I think I'd prefer this), or the user name should be substituted with a sensible placeholder, like the topic title is (if it's not obvious, the title of the removed topic wasn't actually "(topic removed)").

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

jhsoby renamed this task from [] given as username for notification about new topic that has been removed to [] given as username for notification about new topic that has been removed and revision deleted.Mar 8 2025, 2:07 PM

The "[]" comes from Echo code here: https://gerrit.wikimedia.org/g/mediawiki/extensions/Echo/+/b229853fc731dcd913273fe383593346e0d5ed90/includes/Formatters/EchoEventPresentationModel.php#324

It's intended to be an invalid username, so that when it's passed to {{GENDER:...}} markup, the neutral message is shown. It probably shouldn't be displayed directly. The same Echo code also generates a human-readable message that says basically "(username removed)" that should be displayed instead; DiscussionTools is probably using the wrong parameter in some localisation message.

If we wanted to hide the notification completely in this case, we could override canRender() to check for revision deletion. Currently it's only hidden if the page is deleted. This seems pretty standard though, there's like 30 notification types that do the same thing, and I can't find any that hide the notification upon revision deletion. https://codesearch.wmcloud.org/search/?q=function+canRender&files=PresentationModel

If we wanted to hide the notification completely in this case, we could override canRender() to check for revision deletion. Currently it's only hidden if the page is deleted. This seems pretty standard though, there's like 30 notification types that do the same thing, and I can't find any that hide the notification upon revision deletion. https://codesearch.wmcloud.org/search/?q=function+canRender&files=PresentationModel

Relevant bug report: T224193: I get an alert from having been mentioned in a revision that's been deleted

Change #1130710 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Correct and document message params used when new topic is added

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

Change #1130710 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Correct and document message params used when new topic is added

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