TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, Mailjet\Response given

Created on 18 April 2025, 23 days ago

Problem/Motivation

Did a regular composer installation on a Drupal 10.4.3 and configured all keys. I could also choose a list in the settings, I configured the mail system but on every webform submit, I receive the error below - it seems that the response expected is wrong in WebformMailListCheckbox.php in line 422.

Any help appreciated.

--------
The website encountered an unexpected error. Try again later.

TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, Mailjet\Response given in htmlspecialchars() (line 440 of core/lib/Drupal/Component/Utility/Html.php).
Drupal\Component\Utility\Html::escape() (Line: 268)
Drupal\Component\Render\FormattableMarkup::placeholderEscape() (Line: 217)
Drupal\Component\Render\FormattableMarkup::placeholderFormat() (Line: 195)
Drupal\Core\StringTranslation\TranslatableMarkup->render() (Line: 15)
Drupal\Core\StringTranslation\TranslatableMarkup->__toString()
strpos() (Line: 16)
Drupal\Core\Logger\LogMessageParser->parseMessagePlaceholders() (Line: 61)
Drupal\dblog\Logger\DbLog->log() (Line: 127)
Drupal\Core\Logger\LoggerChannel->log() (Line: 50)
Drupal\Core\Logger\LoggerChannel->error() (Line: 88)
Drupal\mailjet_webform_subscription\MailjetApiWrapper->appendToList() (Line: 423)
Drupal\mailjet_webform_subscription\Plugin\WebformElement\WebformMailListCheckbox->preSave() (Line: 234)
Drupal\webform\Plugin\WebformElementManager->invokeMethod() (Line: 2822)
Drupal\webform\Entity\Webform->invokeElements() (Line: 1224)
Drupal\webform\WebformSubmissionStorage->invokeWebformElements() (Line: 969)
Drupal\webform\WebformSubmissionStorage->doPreSave() (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save() (Line: 806)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (Line: 985)
Drupal\webform\WebformSubmissionStorage->save() (Line: 354)
Drupal\Core\Entity\EntityBase->save() (Line: 913)
Drupal\webform\Entity\WebformSubmission->save() (Line: 2017)
Drupal\webform\WebformSubmissionForm->save()
call_user_func_array() (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 597)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm() (Line: 1250)
Drupal\webform\Entity\Webform->getSubmissionForm() (Line: 89)
Drupal\webform\Controller\WebformEntityController->addForm()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 53)
Asm89\Stack\Cors->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇦🇹Austria roromedia Linz

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

Comments & Activities

Production build 0.71.5 2024