Notifications are sent 2 times

Created on 22 November 2023, 12 months ago
Updated 19 August 2024, 3 months ago

Problem/Motivation

Emails are sent twice through content_moderation_notifications. I have a notification sent when a "New Invoice" is created.
It is sent TO: the site email and gets BCC: to the role of "Reviewer"

Both the site mail and the Reviewers get the email exactly 2 times. I tested to see if the mail was the same or sent a 2nd time. I added a random number to my Subject line. The emails are deferent, iterated.

Steps to reproduce

Drupal 10.1.6
PHP 8.1.21
8.x-3.x-dev

Create a new "Content Moderation Notification" and configure it to send to some role, allow to send to site email. Because sending to recipients via BCC will require at least 1 address in the TO field, you must allow sending to site email, or no mail will be sent.

Create a subject line using random number token like: New invoice: [node:title]-[random:number]

Proposed resolution

I think there is a place where a function gets called twice. I think it could be:

getNotifications()
sendNotification()
content_moderation_notifications_mail()

Remaining tasks

I am still testing to see where this 2nd call may happen.
I don't think this is a browser, reloading the page but I will check more, other browsers.

Thank you for this module! Without it, content moderation core, doesn't really do much.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇺🇸United States goose2000

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024