umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.49k stars 2.69k forks source link

Notifications not sending to user who has same notification for multiple content items #4713

Closed peterkeating closed 5 years ago

peterkeating commented 5 years ago

Notifications not sending when user has notifications configured for multiple content items.

Bug summary

When a user has multiple notifications of the same type on different content items that are at the same level, they don't receive a notification. If user removes one of the notifications from one of the content items, so they've only got one notification set up on a content item, the notification will successfully send.

Tried having two different notification actions ("Create" & "Send To Publish" in our case) on the different content items and the notifications send as expected.

Specifics

Using Umbraco 7.13.2. Client reported issue after upgrading from 7.10.5.

Steps to reproduce

Add the same notification on multiple content items at the same level. Perform action that would trigger notification.

Expected result

User should receive notification.

Actual result

User doesn't receive notification.

peterkeating commented 5 years ago

Wasn't able to reproduce the issue with a vanilla install of Umbraco using the example template.

peterkeating commented 5 years ago

Scratch my last comment, this is an issue within a vanilla install of Umbraco. The reason I thought it was working fine on a vanilla install was because if a notification is triggered and matches the first notification associated to the user then it'll action the notification. When the notification for the user isn't the first one associated to them then that notification won't be checked against the content item as the code moves on to the next user.

The code needs to be tweaked so it checks all the notifications associated to the user, instead of checking the first one, not finding a match, then moving on to the next user in the list.

Looking at the code in the v8-dev branch this looks to be an issue in v8 also.

Planning to submit a PR to fix the issue 👍

NicolaSA commented 5 years ago

Hiya,

Our client on multisite, cloud 17.5.1 is experiencing this bug too. One user is set to receive send to publish notifications on 4-5 sites and zero emails fire to this user whilst my colleague and I successfully receive notifications as we only subscribe to one site.

Is there a rough timeline for a 17.5.2 patch that you can advise us so we can advise our client please? Weeks? months (less than 3, more than 3)?

Many thanks in advance, Nix

johnsonp57 commented 5 years ago

We are also being affected by this issue for a client - it seems to have been broken for quite a few versions and this patch looks like it will fix the issue - can it be applied in the next release? 7.15.2 would be ideal. Thanks Peter

nul800sebastiaan commented 5 years ago

Fixed in https://github.com/umbraco/Umbraco-CMS/pull/4806 and cherry picked for 7.15.2 in https://github.com/umbraco/Umbraco-CMS/commit/ff595df7caa656664246d92fc13fab55491b3142

I don't have a solid date yet, but I expect 7.15.2 to be out in the next few weeks. 👍

NicolaSA commented 5 years ago

Magic!. Thanks a mill, super appreciated

tenshi04 commented 2 months ago

Is this fixed in 8.18.4 ? I still have issues with notifications.

https://github.com/umbraco/Umbraco-CMS/issues/16944