- Issue created by @dominictaylor
- 🇬🇧United Kingdom grdv
Same here.
* Doesn't subscribe all users.
* Deselects existing content type settings - 🇬🇧United Kingdom The Daily Clobe
Same here:
* Doesn’t subscribe all users
* Removes all items from the notify_subscriptions tableIn addition, even when submitting “Submit configurations” on the /admin/config/people/notify/users page without ticking “Bulk-subscribe all unsubscribed users”, all items are still removed from the notify_subscriptions table. I think that the cause is:
- The setUserNotify() method interprets the absence of subscription values as a request to delete all subscriptions
- The UsersForm only passes basic notification settings and does not include subscription informationI’ve created a patch that does the following:
- Adds a check in setUserNotify() to only process subscriptions if subscription values are present
- Prevents unintended deletion of subscriptions while maintaining compatibility with existing functionalityNote: This patch only addresses the removal of items from the notify_subscriptions table when using “Submit configurations” on the /admin/config/people/notify/users page. It does not resolve the issue of users not being subscribed when ticking “Bulk-subscribe all unsubscribed users.”
- 🇬🇧United Kingdom The Daily Clobe
It looks like there are a couple of reasons why users are not being subscribed when ticking "Bulk-subscribe all unsubscribed users."
1. bulkSubscribeUsers() is only updating users who already have entries in the notify table; it’s missing users who are not yet in the table.
2. bulkSubscribeUsers() does not add any entries to the notify_subscriptions table, so users are marked as "subscribed" in general but are not subscribed to any specific content types.I’ve created a patch to update bulkSubscribeUsers() to do the following:
- Find all active users without any record in the notify table and added them to the notify table
- Find users with existing records but disabled notifications and updated them as enabled in the notify table
- Created new subscriptions in the notify_subscriptions table for all added/updated users, subscribing them to the node types specified in the Default Settings pageThis patch includes the updates from my previous patch, which addressed the unintended deletion of subscriptions.