(bug): Notifications for deleted boosts break the notification window
Summary:
'Boost' notifcations usually carry a link to the post. When this post doesn't exist, the notification still comes through. This results in all the notifications prior being erased, making the new notifications unresponsive and rendering the rest of the website unresponsive.
The notifications below the unassigned boost notification become empty, and the website becomes seemingly unresponsive, whatever you click on won't open.
The bug seems to be because of the unassigned 'Boost' notification. Because this specific notification is only visible in the 'all notifcation' tab, the other tabs (votes, subscribers, comments etc.) are not affected. When the unassigned 'Boost' notification gets burried by other notifications, the site will not break unless you load it by scrolling down to it.
To explain the bug in simple terms: When you boost a post, you can delete that post. The boost notification will point at a deleted post, find nothing and break the website through the notification system. Because of the way minds caches posts, a deleted post can and will still be processed. After deleting the post you made a timebomb that will break your notification system.
Steps to reproduce:
-
Create a media post on your profile (image)
-
Boost the post on your profile (must be of type Newsfeed)
-
Delete the post permanently on your profile
-
Revoke the boosted post in the Boost Console (this will also happen if boost approved or rejected).
-
Check the notification window, it should behave incorrectly and show critical damage to the website
Browser and OS
Mozilla Firefox 68.0 reported by: @aobachan
What is the current bug behavior?
Screenshot should be self explanatory.
What is the expected correct behavior?
If a notification is somehow corrupted and causing an issue, the front end should simply be able to disregard it, though the underlying cause here needs to be investigated and amended.
Relevant logs and/or screenshots
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~"T - Bug" ~"S - Triage:new"