Error: Cannot use object of type Drupal\Core\Render\Markup as array in Drupal\graph_mail\Plugin\Mail\GraphMail::mail()

Created on 2 February 2023, almost 2 years ago
Updated 3 April 2023, over 1 year ago

Whenever I try to send formatted HTML mails with swiftmailer ( https://www.drupal.org/project/swiftmailer ), the graph_mail module aborts with an error:

Error: Cannot use object of type Drupal\Core\Render\Markup as array in Drupal\graph_mail\Plugin\Mail\GraphMail->mail() (Zeile 165 in /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/graph_mail/src/Plugin/Mail/GraphMail.php)

#0 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/mailsystem/src/Adapter.php(50): Drupal\graph_mail\Plugin\Mail\GraphMail->mail()
#1 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Mail/MailManager.php(307): Drupal\mailsystem\Adapter->mail()
#2 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Mail/MailManager.php(180): Drupal\Core\Mail\MailManager->doMail()
#3 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#4 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Mail/MailManager.php(181): Drupal\Core\Render\Renderer->executeInRenderContext()
#5 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/mailsystem/src/MailsystemManager.php(70): Drupal\Core\Mail\MailManager->mail()
#6 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/Plugin/WebformHandler/EmailWebformHandler.php(1163): Drupal\mailsystem\MailsystemManager->mail()
#7 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/Plugin/WebformHandler/EmailWebformHandler.php(856): Drupal\webform\Plugin\WebformHandler\EmailWebformHandler->sendMessage()
#8 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/Entity/Webform.php(2751): Drupal\webform\Plugin\WebformHandler\EmailWebformHandler->postSave()
#9 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/WebformSubmissionStorage.php(1212): Drupal\webform\Entity\Webform->invokeHandlers()
#10 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/WebformSubmissionStorage.php(1120): Drupal\webform\WebformSubmissionStorage->invokeWebformHandlers()
#11 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php(523): Drupal\webform\WebformSubmissionStorage->doPostSave()
#12 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(804): Drupal\Core\Entity\EntityStorageBase->save()
#13 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/WebformSubmissionStorage.php(983): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
#14 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\webform\WebformSubmissionStorage->save()
#15 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/Entity/WebformSubmission.php(887): Drupal\Core\Entity\EntityBase->save()
#16 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/WebformSubmissionForm.php(1972): Drupal\webform\Entity\WebformSubmission->save()
#17 [internal function]: Drupal\webform\WebformSubmissionForm->save()
#18 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array()
#19 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
#20 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(592): Drupal\Core\Form\FormSubmitter->doSubmitForm()
#21 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/autosave_form/src/Form/AutosaveFormBuilder.php(144): Drupal\Core\Form\FormBuilder->processForm()
#22 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(320): Drupal\autosave_form\Form\AutosaveFormBuilder->processForm()
#23 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/autosave_form/src/Form/AutosaveFormBuilder.php(97): Drupal\Core\Form\FormBuilder->buildForm()
#24 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm()
#25 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/Entity/Webform.php(1243): Drupal\Core\Entity\EntityFormBuilder->getForm()
#26 /var/www/clients/client5/web455/web/cms/docroot/modules/contrib/webform/src/Controller/WebformTestController.php(128): Drupal\webform\Entity\Webform->getSubmissionForm()
#27 [internal function]: Drupal\webform\Controller\WebformTestController->testForm()
#28 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#29 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#30 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#31 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#32 /var/www/clients/client5/web455/web/cms/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#33 /var/www/clients/client5/web455/web/cms/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#34 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#35 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#36 /var/www/clients/client5/web455/web/cms/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#37 /var/www/clients/client5/web455/web/cms/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#38 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#39 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#40 /var/www/clients/client5/web455/web/cms/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#41 /var/www/clients/client5/web455/web/cms/docroot/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#42 /var/www/clients/client5/web455/web/cms/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
#43 {main}
🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇩🇪Germany vistree

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024