I've done an update to Magento and now I have a problem:

In the cron logs I have

main.ERROR: Cron Job sales_send_order_emails has an error: Return value of Magento\Framework\Filter\DirectiveProcessor\DependDirective::process() must be of the type string, object returned. Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":79691776,"emalloc_start":29990192} [] []
main.CRITICAL: Error when running a cron job {"exception":"[object] (RuntimeException(code: 0): Error when running a cron job at /vendor/magento/module-cron/Observer/ProcessCronQueueObserver.php:330, TypeError(code: 0): Return value of Magento\\Framework\\Filter\\DirectiveProcessor\\DependDirective::process() must be of the type string, object returned at /vendor/magento/framework/Filter/DirectiveProcessor/DependDirective.php:53)"} []

Confirmation email is not sending and also when I got in admin to the order, and then click on Send Email is also not working.

I've tried to send a comment on an order, and that one is working.

Can someone help?


1 Answer 1


You need to check the address templates in the configuration menu or other variables set up in your email templates. This class was added in 2.3.4 to process variables, I have it foul up the checkout, when there was an if mismatch in the address templates. So check you have the if and depends are correct and have there closing tags.

  • This was the problem. Thank you very much for this. After doing this, everything is ok except one error: main.CRITICAL: No such entity with cartId = 5908 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with cartId = 5908 at /vendor/magento/framework/Exception/NoSuchEntityException.php:50)"}, error that apears after checkout process is done. The checkout process is ok and I get the order in admin and also the email. What can be this problem with cart id?
    – andy1786
    Mar 22, 2020 at 19:44
  • It's good that the other problem was solved. Just an error like that isn't enough to see. If you open another question with full details you will likely get the help you need.
    – Mark Rees
    Mar 22, 2020 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.