Problem/Motivation
I created a new item (story) and selected 'Save and broadcast to everyone...'
No emails went out. The error message is:
Error: Call to undefined function _cforge_broadcast_mail_broadcast() in cforge_broadcast_mail() (line 83 of /var/www/html/okhighlandtrades/web/profiles/cforge/modules/cforge_broadcast/cforge_broadcast.module)
#0 [internal function]: cforge_broadcast_mail()
#1 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(417): call_user_func_array()
#2 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/Mail/MailManager.php(272): Drupal\Core\Extension\ModuleHandler->invoke()
#3 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/Mail/MailManager.php(180): Drupal\Core\Mail\MailManager->doMail()
#4 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#5 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/Mail/MailManager.php(181): Drupal\Core\Render\Renderer->executeInRenderContext()
#6 /var/www/html/okhighlandtrades/web/modules/mailsystem/src/MailsystemManager.php(70): Drupal\Core\Mail\MailManager->mail()
#7 /var/www/html/okhighlandtrades/web/profiles/cforge/cforge.profile(635): Drupal\mailsystem\MailsystemManager->mail()
#8 /var/www/html/okhighlandtrades/web/core/includes/batch.inc(295): cforge_batch_mail_send()
#9 /var/www/html/okhighlandtrades/web/core/includes/batch.inc(137): _batch_process()
#10 /var/www/html/okhighlandtrades/web/core/includes/batch.inc(93): _batch_do()
#11 /var/www/html/okhighlandtrades/web/core/modules/system/src/Controller/BatchController.php(55): _batch_page()
#12 [internal function]: Drupal\system\Controller\BatchController->batchPage()
#13 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#14 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#16 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#17 /var/www/html/okhighlandtrades/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /var/www/html/okhighlandtrades/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#19 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#20 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#21 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#22 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#23 /var/www/html/okhighlandtrades/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#24 /var/www/html/okhighlandtrades/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#25 /var/www/html/okhighlandtrades/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#26 {main}
.
Steps to reproduce
I'm using smtp to send email. I installed it by adding the line
"drupal/smtp": "*",
under "require": {
in the composer file that you gave me.
It has worked so far to send emails to new members notifying them of their accounts.
Comments
Comment #3
matslats commentedOK I pushed the fix.
web/profiles/cforge/modules/cforge_broadcast.module line 82
should read
\Drupal::moduleHandler()->loadInclude('cforge_broadcast', 'inc');
Comment #4
amysragbag commentedThat worked!