Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When sending a message via `message_subscribe_send_message()` with `use queue` set to TRUE in the subscribe_options, the same message will send on every cron run.
This happens with both rc2 and dev versions.
I have to manually remove the records from the queue table for them to stop sending.
Is there an issue here or is it the way I'm sending the message?
// First I setup the subscripte options to use the queue
$notify_options = array();
$subscribe_options = array('uids' => array(), 'use queue' => TRUE);
$subscribe_options['uids'][1] = array('notifiers' => array('email'));
// Then create the $message here
...
// Finally, send the message
message_subscribe_send_message('node', $node, $message, $notify_options, $subscribe_options);
Comments
Comment #2
mmilano CreditAttribution: mmilano commentedIf I comment out the very last `if` condition of `message_subscribe_send_message()`, it works as expected by sending the email only once on the next cron run.
This last condition seems to be re-queueing the message after it is sent. (line 161, if ($use_queue) {)
Comment #3
StevenJay CreditAttribution: StevenJay commentedI am seeing the same functionality. Any update on a solution?
Comment #4
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented