-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete content notifications not sending #5244
Comments
I can reproduce this and a few other notification issues as well... will look at a fix. |
OK. This is a bit of a pickle. All notification subscriptions for a specific content item are deleted when the content item is deleted due to database consistency considerations. Thus the delete notification subscriptions aren't available afterwards in the event handler that is supposed to process them. This is one for HQ to consider. So far I can see four possible solutions, all of which are less than ideal. 1: Compromise with database consistencyThe cleanest fix is probably to allow potential database inconsistency by removing the foreign key between
Obviously this solution has a built-in risk of 2: Something less than thread safeThe notification service uses the content service This could be solved by letting the notification service subscribe to the 3: The very un-SOLID approachThe content service could take a dependency on the notification service and initiate the delete notifications itself instead of having the notification service do it in the However it seems to me that this would be adding a responsibility to the content service that does not belong there. 4: The breaking change approachThe last option is even worse 😆 but here goes anyway: If the This would be a behavioral breaking change and also a really strange behavior in general. /cc @Shazwazza |
Great investigation! :) As for #1, #3 and #4 - we cannot do any of those unfortunately. however a variation of #2 can work. We send notifications in the What we (probably) can do is in the |
Cool 👍 If you're comfortable with that "shared" notification workload I'll have a look at it, hopefully today 😊 |
I guess there's 2 ways to do this:
|
Awesome. Sounds like a better alternative 👍 I'll poke around in it later. |
@kjsguld @Shazwazza upon further reflection... shouldn't delete notifications really be sent when content is moved to the recycle bin instead of deleted from it? Moving an item to the recycle bin is conceptually a delete operation (it's even called "Delete" in the tree context menu). Receiving a notification after content is deleted from the recycle bin doesn't help anyone - you can't really do anything about it, at least not from the UI. On the other hand, receiving the notification when content is moved to the recycle bin seems to be meaningful. I realize that this is a different behavior than V7, but if we're going to change it, now would be a good time to do so. |
@kjac I agree with this perception of the concept. It's it should rather be a message concerning the fact that a given content node has been sent to the recycle bin - or "staged for deletion" in other words. |
There's also the fact that the deleted notification (yes I eventually managed to get it to send) contains a link to edit the deleted item. Which obviously results in an error message stating that the element does not exist. So... all the more reason to send delete notifications when an item is moved to the recycle bin. I have an existing PR that fixes move/copy notifications (#5255). I'll amend that to include a fix for this. |
PR #5255 is updated to handle deletion |
Yup yup and yup! of course that all makes logical sense and probably makes the coding a little less painful :) |
The delete notification on content does not send notifications.
Reproduction
Bug summary
Notifications are not send on deletion.
Specifics
Inspecting the logs in the backoffice under /settings/logViewer/overview doesn't provide any further insights either.
Steps to reproduce
Create an environment running 8.0.1
Set up SMTP settings in web.config
Set up notification mail in umbracosettings.config
Set up notifications on a content node
Create, move, publish notifications are sent
Upon deletion of a node, no email seems to be sent.
Expected result
That a notification would be sent as on create etc.
The message you normally receive looks like this:
Actual result
No mail is sent.
The text was updated successfully, but these errors were encountered: