(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"
added Triage::New Type::Bug (Triage) scoped labels
made the issue visible to everyone
- Developer
Unclear on step 4, messaged @medworthy who brought this to my attention.
Step 4 is achievable in three ways You either
- Revoke the boost in the boost console
- Wait for the boost to be accepted
- Wait for the boost to be denied
Revoking is the easiest way, because you can complete that step immediately. Revoking it should send you a notification containing the text [You revoked your boost Your offer has been refunded.] You must delete the post before you revoke the boost.
Edited by aobachanged the description 2 times within 10 minutes
added Priority::1 - High Product::Boost Type::Bug scoped labels and automatically removed Triage::Questions Type::Bug (Triage) labels
- Developer
Thank you very much for bringing this to our attention @aobars, I've now reproduced it, and escalated it to bug status.
changed title from (site-breaking bug) Unassigned 'Boost' Notifications breaks the notification window and the whole website to (bug): Notifications for deleted boosts break the notification window
assigned to @benhayward.ben
changed milestone to %sprint: Jolly Jellyfish
changed weight to 5
added Squad::Green scoped label
added Status::InProgress scoped label
automatically removed Status::InProgress label
added Status::InProgress scoped label
added Status::Review scoped label and automatically removed Status::InProgress label
changed milestone to %sprint: Jolly Jellyfish
changed weight to 5
moved from minds#669 (closed)
mentioned in merge request !465