[Bugfix:Forum] Handle deleted reply/thread redirects#12970
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12970 +/- ##
============================================
- Coverage 21.41% 21.40% -0.01%
- Complexity 10002 10007 +5
============================================
Files 277 277
Lines 37418 37430 +12
Branches 512 512
============================================
Hits 8013 8013
- Misses 28904 28916 +12
Partials 501 501
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
dagemcn
left a comment
There was a problem hiding this comment.
Looked at the code and functionality of this PR fairly extensively. One tiny nitpick, if you create a thread and reply to that thread, then delete the reply first and then the original post, you will get two notifications. Clicking on the reply notification will bring you to the forum index page with a banner that says "The requested thread does not exist".
I think we should either show this banner in all occurrences where the requested reply/thread etc. does not exist or we should not show it in any circumstance. I understand this is a very small nitpick, and if you'd rather wait until the Vue migration of the discussion forum to handle this that's fine with me as well considering this banner only shows up in one tiny circumstance and is only a tiny discrepancy. Also, please fix failing php lint, seems like only one small change required. After that, I am happy to approve.
|
I have tried to make a unified Toast for all such scenarios that says : |
Why is this Change Important & Necessary?
Closes #12814
Clicking a notification for deleted forum content (thread or reply) opens a blank page instead of redirecting the user somewhere safe. This happened because when a post/thread was deleted, the notification metadata was set to json_encode([]) no URL at all, causing to render a blank page.
What is the New Behavior?
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
No new test or documentation
Other information
No breaking changes, no migrations needed.