New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M3 changed to flush queue before cc and bcc are cleared #8768
M3 changed to flush queue before cc and bcc are cleared #8768
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hluchas
I'm seeing PHP notices after applying your PR. However, the functionality itself works as expected (all email addresses receive the email just once, this is the case before and after applying the PR). I used an SMTP server for testing.
dennis@mautic3dennis-web:/var/www/html$ bin/console mautic:campaigns:trigger
Triggering events for campaign 2
Triggering events for newly added contacts
1 total events(s) to be processed in batches of 100 contacts
1/1 [============================] 100%PHP Notice: Array to string conversion in /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php on line 60
PHP Stack trace:
PHP 1. {main}() /var/www/html/bin/console:0
PHP 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() /var/www/html/bin/console:43
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/console/Application.php:148
PHP 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:74
PHP 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/console/Application.php:255
PHP 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:86
PHP 7. Mautic\CampaignBundle\Command\TriggerCampaignCommand->run() /var/www/html/vendor/symfony/console/Application.php:1005
PHP 8. Mautic\CampaignBundle\Command\TriggerCampaignCommand->execute() /var/www/html/vendor/symfony/console/Command/Command.php:255
PHP 9. Mautic\CampaignBundle\Command\TriggerCampaignCommand->triggerCampaign() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:277
PHP 10. Mautic\CampaignBundle\Command\TriggerCampaignCommand->executeKickoff() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:328
PHP 11. Mautic\CampaignBundle\Executioner\KickoffExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:372
PHP 12. Mautic\CampaignBundle\Executioner\KickoffExecutioner->executeOrScheduleEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:122
PHP 13. Mautic\CampaignBundle\Executioner\EventExecutioner->executeEventsForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:222
PHP 14. Mautic\CampaignBundle\Executioner\EventExecutioner->executeForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:245
PHP 15. Mautic\CampaignBundle\Executioner\EventExecutioner->executeLogs() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:172
PHP 16. Mautic\CampaignBundle\Executioner\Event\ActionExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:201
PHP 17. Mautic\CampaignBundle\Executioner\Dispatcher\ActionDispatcher->dispatchEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/Event/ActionExecutioner.php:67
PHP 18. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() /var/www/html/app/bundles/CampaignBundle/Executioner/Dispatcher/ActionDispatcher.php:89
PHP 19. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->doDispatch() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:44
PHP 20. Mautic\EmailBundle\EventListener\CampaignSubscriber->onCampaignTriggerActionSendEmailToUser() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:214
PHP 21. Mautic\EmailBundle\Model\SendEmailToUser->sendEmailToUsers() /var/www/html/app/bundles/EmailBundle/EventListener/CampaignSubscriber.php:377
PHP 22. implode() /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php:60
Notice: Array to string conversion in /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php on line 60
Call Stack:
0.0011 401352 1. {main}() /var/www/html/bin/console:0
0.0613 1240848 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() /var/www/html/bin/console:43
0.0697 1400264 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/console/Application.php:148
0.5348 9746328 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:74
0.5350 9746944 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/console/Application.php:255
0.5350 9746944 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:86
0.5366 9755744 7. Mautic\CampaignBundle\Command\TriggerCampaignCommand->run() /var/www/html/vendor/symfony/console/Application.php:1005
0.5370 9757464 8. Mautic\CampaignBundle\Command\TriggerCampaignCommand->execute() /var/www/html/vendor/symfony/console/Command/Command.php:255
0.5751 10515776 9. Mautic\CampaignBundle\Command\TriggerCampaignCommand->triggerCampaign() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:277
0.5756 10517152 10. Mautic\CampaignBundle\Command\TriggerCampaignCommand->executeKickoff() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:328
0.5758 10517152 11. Mautic\CampaignBundle\Executioner\KickoffExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:372
0.5936 10790328 12. Mautic\CampaignBundle\Executioner\KickoffExecutioner->executeOrScheduleEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:122
0.6306 11249224 13. Mautic\CampaignBundle\Executioner\EventExecutioner->executeEventsForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:222
0.6314 11251472 14. Mautic\CampaignBundle\Executioner\EventExecutioner->executeForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:245
0.8167 13045208 15. Mautic\CampaignBundle\Executioner\EventExecutioner->executeLogs() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:172
0.8168 13045208 16. Mautic\CampaignBundle\Executioner\Event\ActionExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:201
0.8168 13045232 17. Mautic\CampaignBundle\Executioner\Dispatcher\ActionDispatcher->dispatchEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/Event/ActionExecutioner.php:67
0.8180 13050496 18. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() /var/www/html/app/bundles/CampaignBundle/Executioner/Dispatcher/ActionDispatcher.php:89
0.8180 13050256 19. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->doDispatch() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:44
0.8180 13050256 20. Mautic\EmailBundle\EventListener\CampaignSubscriber->onCampaignTriggerActionSendEmailToUser() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:214
0.8181 13050872 21. Mautic\EmailBundle\Model\SendEmailToUser->sendEmailToUsers() /var/www/html/app/bundles/EmailBundle/EventListener/CampaignSubscriber.php:377
1.4253 14446608 22. implode() /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php:60
PHP Notice: Array to string conversion in /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php on line 60
PHP Stack trace:
PHP 1. {main}() /var/www/html/bin/console:0
PHP 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() /var/www/html/bin/console:43
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/console/Application.php:148
PHP 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:74
PHP 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/console/Application.php:255
PHP 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:86
PHP 7. Mautic\CampaignBundle\Command\TriggerCampaignCommand->run() /var/www/html/vendor/symfony/console/Application.php:1005
PHP 8. Mautic\CampaignBundle\Command\TriggerCampaignCommand->execute() /var/www/html/vendor/symfony/console/Command/Command.php:255
PHP 9. Mautic\CampaignBundle\Command\TriggerCampaignCommand->triggerCampaign() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:277
PHP 10. Mautic\CampaignBundle\Command\TriggerCampaignCommand->executeKickoff() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:328
PHP 11. Mautic\CampaignBundle\Executioner\KickoffExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:372
PHP 12. Mautic\CampaignBundle\Executioner\KickoffExecutioner->executeOrScheduleEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:122
PHP 13. Mautic\CampaignBundle\Executioner\EventExecutioner->executeEventsForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:222
PHP 14. Mautic\CampaignBundle\Executioner\EventExecutioner->executeForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:245
PHP 15. Mautic\CampaignBundle\Executioner\EventExecutioner->executeLogs() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:172
PHP 16. Mautic\CampaignBundle\Executioner\Event\ActionExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:201
PHP 17. Mautic\CampaignBundle\Executioner\Dispatcher\ActionDispatcher->dispatchEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/Event/ActionExecutioner.php:67
PHP 18. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() /var/www/html/app/bundles/CampaignBundle/Executioner/Dispatcher/ActionDispatcher.php:89
PHP 19. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->doDispatch() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:44
PHP 20. Mautic\EmailBundle\EventListener\CampaignSubscriber->onCampaignTriggerActionSendEmailToUser() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:214
PHP 21. Mautic\EmailBundle\Model\SendEmailToUser->sendEmailToUsers() /var/www/html/app/bundles/EmailBundle/EventListener/CampaignSubscriber.php:377
PHP 22. implode() /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php:60
Notice: Array to string conversion in /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php on line 60
Call Stack:
0.0011 401352 1. {main}() /var/www/html/bin/console:0
0.0613 1240848 2. Symfony\Bundle\FrameworkBundle\Console\Application->run() /var/www/html/bin/console:43
0.0697 1400264 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/console/Application.php:148
0.5348 9746328 4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:74
0.5350 9746944 5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/console/Application.php:255
0.5350 9746944 6. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:86
0.5366 9755744 7. Mautic\CampaignBundle\Command\TriggerCampaignCommand->run() /var/www/html/vendor/symfony/console/Application.php:1005
0.5370 9757464 8. Mautic\CampaignBundle\Command\TriggerCampaignCommand->execute() /var/www/html/vendor/symfony/console/Command/Command.php:255
0.5751 10515776 9. Mautic\CampaignBundle\Command\TriggerCampaignCommand->triggerCampaign() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:277
0.5756 10517152 10. Mautic\CampaignBundle\Command\TriggerCampaignCommand->executeKickoff() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:328
0.5758 10517152 11. Mautic\CampaignBundle\Executioner\KickoffExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Command/TriggerCampaignCommand.php:372
0.5936 10790328 12. Mautic\CampaignBundle\Executioner\KickoffExecutioner->executeOrScheduleEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:122
0.6306 11249224 13. Mautic\CampaignBundle\Executioner\EventExecutioner->executeEventsForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/KickoffExecutioner.php:222
0.6314 11251472 14. Mautic\CampaignBundle\Executioner\EventExecutioner->executeForContacts() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:245
0.8167 13045208 15. Mautic\CampaignBundle\Executioner\EventExecutioner->executeLogs() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:172
0.8168 13045208 16. Mautic\CampaignBundle\Executioner\Event\ActionExecutioner->execute() /var/www/html/app/bundles/CampaignBundle/Executioner/EventExecutioner.php:201
0.8168 13045232 17. Mautic\CampaignBundle\Executioner\Dispatcher\ActionDispatcher->dispatchEvent() /var/www/html/app/bundles/CampaignBundle/Executioner/Event/ActionExecutioner.php:67
0.8180 13050496 18. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() /var/www/html/app/bundles/CampaignBundle/Executioner/Dispatcher/ActionDispatcher.php:89
0.8180 13050256 19. Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->doDispatch() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:44
0.8180 13050256 20. Mautic\EmailBundle\EventListener\CampaignSubscriber->onCampaignTriggerActionSendEmailToUser() /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:214
0.8181 13050872 21. Mautic\EmailBundle\Model\SendEmailToUser->sendEmailToUsers() /var/www/html/app/bundles/EmailBundle/EventListener/CampaignSubscriber.php:377
1.4253 14446608 22. implode() /var/www/html/app/bundles/EmailBundle/Model/SendEmailToUser.php:60
1/1 [============================] 100%
1 total event was executed
0 total events were scheduled
Triggering scheduled events
0 total events(s) to be processed in batches of 100 contacts
0 total events were executed
0 total events were scheduled
Triggering events for inactive contacts
0 total events were executed
0 total events were scheduled
@dennisameling fixed in 3bca017 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI command works without issues now. Thanks @hluchas 🎉
Description:
Fixing bug where cc and bcc emails are not sent from the Send to User campaign action. This is required for fixing the Selenium tests. We also want to avoid regressing the bug where the cc and bcc emails could get sent multiple times if there is more than one email in the 'To' field.
Steps to reproduce the bug:
Steps to test this PR: