You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've started seeing a bunch of failed queue entries. The (erroneous) error reported is:
Email “Service Order to Ticket”, for order "cf5279c" was cancelled by plugin.
was cancelled by plugin is the important thing here...this is not an error, but a deliberate cancellation of the email. It's not the same as e.g. a template error in an email, and it should not be reported as an error at all.
To Reproduce
Have module code that cancels an email given some condition
Expected behaviour
Email should be silently cancelled (entry in a log file is ok, but an alarming looking failure message in the CP is over-doing it...)
Additional info
composer update-d all the things just now...
The text was updated successfully, but these errors were encountered:
@bossanova808
The cause of this issue is that the event Emails::EVENT_BEFORE_SEND_MAIL got triggered and set to cancel an email. I would recommend scan all installed plugins and modules and check how it is being used. It should looks something like this
@pdaleramirez Thanks - & yep I know what the cause is, as I wrote the module that does precisely that.
My point is - it's not an error, it's a deliberate use of a system to suppress emails, and until the very latest Commerce update, did not result in failure reports in the queue manager...and it should still not result in them....
@bossanova808 Fixed this for the next release. Plugins that use the event to stop the email being sent will no longer be shown as failed on the queue, just silently not sent. An error will still be logged that the email was prevented from being sent by a plugin.
Description
We've started seeing a bunch of failed queue entries. The (erroneous) error reported is:
Email “Service Order to Ticket”, for order "cf5279c" was cancelled by plugin.
was cancelled by plugin is the important thing here...this is not an error, but a deliberate cancellation of the email. It's not the same as e.g. a template error in an email, and it should not be reported as an error at all.
To Reproduce
Have module code that cancels an email given some condition
Expected behaviour
Email should be silently cancelled (entry in a log file is ok, but an alarming looking failure message in the CP is over-doing it...)
Additional info
composer update
-d all the things just now...The text was updated successfully, but these errors were encountered: