Page MenuHomePhabricator

DraftNotificationPresentationModel.php: Call to a member function getText() on null
Closed, ResolvedPublic

Description

Error from line 61 of /srv/mediawiki/php-1.36.0-wmf.10/extensions/ContentTranslation/includes/DraftNotificationPresentationModel.php: Call to a member function getText() on null

Log

#0 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/formatters/EventPresentationModel.php(539): ContentTranslation\DraftNotificationPresentationModel->getHeaderMessage()
#1 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/formatters/EchoModelFormatter.php(14): EchoEventPresentationModel->jsonSerialize()
#2 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/formatters/EchoEventFormatter.php(72): EchoModelFormatter->formatModel(ContentTranslation\DraftNotificationPresentationModel)
#3 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/DataOutputFormatter.php(189): EchoEventFormatter->format(EchoEvent)
#4 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/DataOutputFormatter.php(149): EchoDataOutputFormatter::formatNotification(EchoEvent, User, string, Language)
#5 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/api/ApiEchoNotifications.php(292): EchoDataOutputFormatter::formatOutput(EchoNotification, string, User, Language)
#6 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/api/ApiEchoNotifications.php(108): ApiEchoNotifications->getPropList(User, array, array, integer, NULL, string, NULL, boolean, boolean)
#7 /srv/mediawiki/php-1.36.0-wmf.10/extensions/Echo/includes/api/ApiEchoNotifications.php(40): ApiEchoNotifications->getLocalNotifications(array)
#8 /srv/mediawiki/php-1.36.0-wmf.10/includes/api/ApiQuery.php(263): ApiEchoNotifications->execute()
#9 /srv/mediawiki/php-1.36.0-wmf.10/includes/api/ApiMain.php(1562): ApiQuery->execute()
#10 /srv/mediawiki/php-1.36.0-wmf.10/includes/api/ApiMain.php(542): ApiMain->executeAction()
#11 /srv/mediawiki/php-1.36.0-wmf.10/includes/api/ApiMain.php(513): ApiMain->executeActionWithErrorHandling()
#12 /srv/mediawiki/php-1.36.0-wmf.10/api.php(90): ApiMain->execute()
#13 /srv/mediawiki/php-1.36.0-wmf.10/api.php(45): wfApiMain()
#14 /srv/mediawiki/w/api.php(3): require(string)
#15 {main}

Impact

A few users are not getting notifications due to likely bad data in the database.

Event Timeline

Change 632704 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/ContentTranslation@master] Add validation for invalid titles in notifications

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

Pginer-WMF triaged this task as Medium priority.Oct 9 2020, 10:04 AM
Pginer-WMF moved this task from Needs Triage to Bugs on the ContentTranslation board.
Nikerabbit updated the task description. (Show Details)

I think it makes sense to work on this since we are working on reliable notifications.

Change 632704 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Add validation for invalid titles in notifications

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

@KartikMistry: let's grep for not a valid title for future purge runs after this is deployed.

@KartikMistry: let's grep for not a valid title for future purge runs after this is deployed.

Sure. This is available in wmf.15, so next run of script with this change will be on 3rd Nov. I'll check after that.

nikerabbit@mwmaint1002:~$ cat /var/log/mediawiki/mediawiki_job_purge_old_cx_drafts/syslog.log | grep Nov | grep title shows nothing.

Logstash shows some recent errors, but those are likely pre-existing notifications that are being viewed. Not sure if we need to purge those somehow or if they expire on their own.

@KartikMistry I have not seen this error in the logs, have you? If not, I propose we close this for now.

Not seen this recently in logs. Task can be close.

Ok, I'm closing this. We should continue grepping for the logs in case it appears in the future.