- Issue created by @Sharik_2023
- Issue was unassigned.
- Status changed to Active
over 1 year ago 11:45am 10 July 2023 - π©πͺGermany jurgenhaas Gottmadingen
Thanks @Sharik_2023 for reporting this. Instead of creating screenshots, you could next time just export the model and upload that.
As for the model, the action
Enqueue a task with a delay
puts a task onto the queue which will then be executed by a completely separate process. That action should not have any successor in your model, because that is executing right away.So, instead you should add a second event ECA processing queued task which will be triggered when queue tasks will be processed, and there you can then send your email, or whatever else you need to do.
Note that queued tasks get either processed during Drupal's cron run or when you use drush to process the queue explicitly.
- πΊπ¦Ukraine Sharik_2023
Hello, I apologize for not responding immediately to your message. Thank you very much for your reply. I tried to do as you suggested, but it didn't work. The event is planned, but nothing happens afterwards.
Loaded the ECA model. - π©πͺGermany jurgenhaas Gottmadingen
The action to send the email is using a token
[commerce_order:mail]
but in the context where this is running, there is no token available namedcommerce_order
. What should be available though is a token namedentity
and that may be the containing the order. You can find out by using the debugging techniques that are described at https://ecaguide.org/eca/debugging/ - that will also show you what's being executed and what not and why.Also, you need to make sure that cron is running regularly, or you use
drush queue:run eca_task:delayed_email
to execute that queue explicitly. - π©πͺGermany jurgenhaas Gottmadingen
Another thing I just noticed, your model is disabled, that may be another reason why it's not being processed.
- πΊπ¦Ukraine Sharik_2023
Thank you @jurgenhaas for your reply, it helped me solve my problem.
- Status changed to Fixed
over 1 year ago 11:30am 11 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.