Page MenuHomePhabricator

"There are no notifications" although the page has a notification counter of "1"
Closed, ResolvedPublic

Description

Today I got 4 notifications on mediawiki.org (I saw them first as 4 cross-wiki notifications on pl.wikipedia.org).

Screenshot of the Notifications page:

Notifications on Events (1 entry) and Beta Features (3 entries) are real.

but there is an additional entry Manual:How to debug/de with a count of one, when clicked says "There are no notifications matching this criteria".

Where does this dud notification comes from?

(I am pretty sure it's a dupe but I had difficulty doing through the Notifications board).

Details

Event Timeline

saper created this task.Oct 2 2016, 10:06 AM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptOct 2 2016, 10:06 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
saper updated the task description. (Show Details)Oct 2 2016, 10:09 AM
Catrope added a subscriber: Catrope.Oct 3 2016, 9:34 PM

What's also weird about this screenshot is that the numbers of notifications for the pages don't add up to the total (3+1+1 is 5, not 4).

@Etonkovidova spotted that this user has 4 notifications with event_type='article-linked'. That is no longer recognized as a type by the software, this type is now called page-linked. The events in question are very old, from January and March of 2013.

It turns out there are still 2663 article-linked events in the mediawikiwiki database, 160 in the testwiki database and 432 in the test2wiki database (no other wikis have this issue). These notifications are very old (timestamps between 2013-01-04 and 2013-04-04) and their event_extra has a strange format that wouldn't be understood by today's code, so simply changing their type to page-linked won't work. We have to delete these events, and reset the notification count of every affected user. It's a bad idea for me to go around deleting stuff from the database this late, so I'll do that tomorrow.

I just found that removeInvalidNotification.php is a maintenance script that specifically exists to delete article-linked notifications, it was just never run on mediawikiwiki, testwiki and test2wiki. I'll run it later, but I'll also update the queries used for the special page to only look for known notification types, so that things don't break every time a notification types becomes unused (or an extension is uninstalled).

Change 314049 had a related patch set uploaded (by Catrope):
Don't show pages and counts related to disabled notification types on Special:Notifications

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

Mentioned in SAL (#wikimedia-operations) [2016-10-04T18:40:27Z] <RoanKattouw> Running extension/Echo/removeInvalidNotification.php on testwiki, test2wiki and mediawikiwiki (T147138)

I just found that removeInvalidNotification.php is a maintenance script that specifically exists to delete article-linked notifications, it was just never run on mediawikiwiki, testwiki and test2wiki. I'll run it later, but I'll also update the queries used for the special page to only look for known notification types, so that things don't break every time a notification types becomes unused (or an extension is uninstalled).

I ran this for mediawikiwiki and it deleted all the article-linked notifications there. For testwiki and test2wiki I was mistaken, as I was looking at the old databases on s3, not the new ones on x1.

Change 314049 merged by jenkins-bot:
Don't show pages and counts related to disabled notification types on Special:Notifications

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

Checked locally - changed the event_type to 'article-linked' from 'page-linked' - no notificaitons of' 'page-linked' were displayed.
Changed 'article-linked' back to 'page-linked' - the notifications with 'page-linked' are displayed again.

jmatazzoni closed this task as Resolved.Oct 11 2016, 12:30 AM