Page MenuHomePhabricator

Error on Special:Notifications page when a page on my watchlist got deleted by another user: EchoEventPresentationModel::getTruncatedTitleText() must be an instance of Title, null given
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce:

  • add $wgEchoWatchlistNotifications = true; to the LocalSettings.php to get watchlist notifications
  • enable web notifications for "Edit to watched page" in your notification preferences
  • add a page to your watchlist
  • have another user (or you on another account) delete the page
  • visit Special:Notifications

What happens?:
an Internal error is displayed

What should have happened instead?:
the Special:Notifications page should be displayed

Software version, other information, etc:

MediaWiki Version: 1.35.1 (889d124)
Echo Version: – (fd6a33e)

error on page Special:Notifications

EventPresentationModel.php: Argument 1 passed to EchoEventPresentationModel::getTruncatedTitleText() must be an instance of Title, null given

/Special:Notifications TypeError from line 564 of <server>/extensions/Echo/includes/formatters/EventPresentationModel.php: Argument 1 passed to EchoEventPresentationModel::getTruncatedTitleText() must be an instance of Title, null given, called in <server>/extensions/Echo/includes/formatters/WatchlistChangePresentationModel.php on line 31

Backtrace:

#0 <server>/extensions/Echo/includes/formatters/WatchlistChangePresentationModel.php(31): EchoEventPresentationModel->getTruncatedTitleText()
#1 <server>/extensions/Echo/includes/formatters/SpecialNotificationsFormatter.php(45): EchoWatchlistChangePresentationModel->getHeaderMessage()
#2 <server>/extensions/Echo/includes/formatters/EchoEventFormatter.php(72): SpecialNotificationsFormatter->formatModel()
#3 <server>/extensions/Echo/includes/DataOutputFormatter.php(189): EchoEventFormatter->format()
#4 <server>/extensions/Echo/includes/DataOutputFormatter.php(149): EchoDataOutputFormatter::formatNotification()
#5 <server>/extensions/Echo/includes/special/SpecialNotifications.php(61): EchoDataOutputFormatter::formatOutput()
#6 <server>/includes/specialpage/SpecialPage.php(600): SpecialNotifications->execute()
#7 <server>/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run()
#8 <server>/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath()
#9 <server>/includes/MediaWiki.php(940): MediaWiki->performRequest()
#10 <server>/includes/MediaWiki.php(543): MediaWiki->main()
#11 <server>/index.php(53): MediaWiki->run()
#12 <server>/index.php(46): wfIndexMain()
#13 {main}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Internal error on Special:Notifications page when a page on my watchlist got deleted by another user to Error on Special:Notifications page when a page on my watchlist got deleted by another user: EchoEventPresentationModel::getTruncatedTitleText() must be an instance of Title, null given.Jul 6 2021, 7:17 PM

@Robis_Koopmans can you try a more recent version of Echo please?

what version do you suggest to try?

@kostajh

git pull
remote: Enumerating objects: 103, done.
remote: Counting objects: 100% (103/103), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 103 (delta 66), reused 91 (delta 54), pack-reused 0
Receiving objects: 100% (103/103), 57.82 KiB | 11.56 MiB/s, done.
Resolving deltas: 100% (66/66), completed with 30 local objects.
From https://github.com/wikimedia/mediawiki-extensions-Echo
   7887043b..6c3c93da  REL1_36           -> origin/REL1_36
   7d39fca9..742da14e  master            -> origin/master
 * [new branch]        wmf/1.37.0-wmf.11 -> origin/wmf/1.37.0-wmf.11
 * [new branch]        wmf/1.37.0-wmf.12 -> origin/wmf/1.37.0-wmf.12
 * [new branch]        wmf/1.37.0-wmf.13 -> origin/wmf/1.37.0-wmf.13
Already up to date.

what version do you suggest to try?

@kostajh

git pull
remote: Enumerating objects: 103, done.
remote: Counting objects: 100% (103/103), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 103 (delta 66), reused 91 (delta 54), pack-reused 0
Receiving objects: 100% (103/103), 57.82 KiB | 11.56 MiB/s, done.
Resolving deltas: 100% (66/66), completed with 30 local objects.
From https://github.com/wikimedia/mediawiki-extensions-Echo
   7887043b..6c3c93da  REL1_36           -> origin/REL1_36
   7d39fca9..742da14e  master            -> origin/master
 * [new branch]        wmf/1.37.0-wmf.11 -> origin/wmf/1.37.0-wmf.11
 * [new branch]        wmf/1.37.0-wmf.12 -> origin/wmf/1.37.0-wmf.12
 * [new branch]        wmf/1.37.0-wmf.13 -> origin/wmf/1.37.0-wmf.13
Already up to date.

Try rECHO742da14e752a: Localisation updates from https://translatewiki.net. although that might require a newer version of MediaWiki core than you have, not sure.

Yes unfortunately it does Uncaught ExtensionDependencyError: Echo is not compatible with the current MediaWiki core (version 1.35.1), it requires: >= 1.37.0. in

I was able to reproduce this using the most recent version from git of both echo and MediaWiki core.

Change 736484 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/Echo@master] Construct title from RC title params

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

Tgr edited projects, added Growth-Team (Current Sprint); removed Growth-Team.
Tgr moved this task from Incoming to QA on the Growth-Team (Current Sprint) board.

Change 736484 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Construct title from RC title params

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

Etonkovidova claimed this task.
Etonkovidova added a subscriber: Etonkovidova.

Checked on enwiki betalabs only. The issue is fixed; the previous notifications from deleted pages on watchlist get deleted without affecting Special:Notifications page display.