Answers.Body: <p>Apply this patch, or downgrade drupal to 9.5.8.</p>
  <p><a href="https://github.com/civicrm/civicrm-drupal-8/pull/82" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-drupal-8/pull/82</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-05T13:08:01.247Z
Answers.LastActivityDate: 2023-05-05T13:08:01.247Z
Answers.UserDisplayName: Demerit
Body: <p>I've just updated to Drupal 9.5.9 and CiviCRM 5.60.0 and I'm getting the following error when trying to load the System Status page:</p>
  <pre><code>TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars() (line 432 of /home/xxxxx/www/www/web/core/lib/Drupal/Component/Utility/Html.php)
  
  #0 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Utility/Html.php(432): htmlspecialchars(Array, 11, 'UTF-8')
  #1 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Render/FormattableMarkup.php(270): Drupal\Component\Utility\Html::escape(Array)
  #2 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Render/FormattableMarkup.php(216): Drupal\Component\Render\FormattableMarkup::placeholderEscape(Array)
  #3 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(195): Drupal\Component\Render\FormattableMarkup::placeholderFormat('CiviCRM', Array)
  #4 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup-&gt;render()
  #5 [internal function]: Drupal\Core\StringTranslation\TranslatableMarkup-&gt;__toString()
  #6 /home/xxxxx/www/www/web/core/includes/theme.inc(1372): strip_tags(Object(Drupal\Core\StringTranslation\TranslatableMarkup))
  #7 [internal function]: template_preprocess_html(Array, 'html', Array)
  #8 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array('template_prepro...', Array)
  #9 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager-&gt;render('html', Array)
  #10 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer-&gt;doRender(Array, false)
  #11 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(162): Drupal\Core\Render\Renderer-&gt;render(Array)
  #12 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer-&gt;Drupal\Core\Render\MainContent\{closure}()
  #13 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(163): Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
  #14 /home/xxxxx/www/www/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer-&gt;renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
  #15 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber-&gt;onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
  #16 /home/xxxxx/www/www/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
  #17 /home/xxxxx/www/www/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher-&gt;dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
  #18 /home/xxxxx/www/www/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
  #19 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #20 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #21 /home/xxxxx/www/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #22 /home/xxxxx/www/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #23 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #24 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #25 /home/xxxxx/www/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #26 /home/xxxxx/www/www/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #27 /home/xxxxx/www/www/web/index.php(19): Drupal\Core\DrupalKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request))
  #28 {main}
  </code></pre>
  <p>Everything else appears to be running fine and if I generate status messages by logging out/in or clearing the cache, I just had a couple of extensions to update, so nothing obvious. Also, there's nothing in the CiviCRM logs.</p>
  <p>I've tried to search on here but there doesn't seem to be anything recent/similar?</p>
  
Tags: <error><system-status>
Title: Error TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars()
ThreadText: # Error TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars()
  
  (Asked by: username_0 on 2023-05-05)
  
  I've just updated to Drupal 9.5.9 and CiviCRM 5.60.0 and I'm getting the following error when trying to load the System Status page:
  TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars() (line 432 of /home/xxxxx/www/www/web/core/lib/Drupal/Component/Utility/Html.php)
  
  #0 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Utility/Html.php(432): htmlspecialchars(Array, 11, 'UTF-8')
  #1 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Render/FormattableMarkup.php(270): Drupal\Component\Utility\Html::escape(Array)
  #2 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Render/FormattableMarkup.php(216): Drupal\Component\Render\FormattableMarkup::placeholderEscape(Array)
  #3 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(195): Drupal\Component\Render\FormattableMarkup::placeholderFormat('CiviCRM', Array)
  #4 /home/xxxxx/www/www/web/core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup->render()
  #5 [internal function]: Drupal\Core\StringTranslation\TranslatableMarkup->__toString()
  #6 /home/xxxxx/www/www/web/core/includes/theme.inc(1372): strip_tags(Object(Drupal\Core\StringTranslation\TranslatableMarkup))
  #7 [internal function]: template_preprocess_html(Array, 'html', Array)
  #8 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array('template_prepro...', Array)
  #9 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('html', Array)
  #10 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
  #11 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(162): Drupal\Core\Render\Renderer->render(Array)
  #12 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
  #13 /home/xxxxx/www/www/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(163): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
  #14 /home/xxxxx/www/www/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
  #15 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
  #16 /home/xxxxx/www/www/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
  #17 /home/xxxxx/www/www/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
  #18 /home/xxxxx/www/www/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
  #19 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #20 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #21 /home/xxxxx/www/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #22 /home/xxxxx/www/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #23 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #24 /home/xxxxx/www/www/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #25 /home/xxxxx/www/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #26 /home/xxxxx/www/www/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
  #27 /home/xxxxx/www/www/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
  #28 {main}
  
  Everything else appears to be running fine and if I generate status messages by logging out/in or clearing the cache, I just had a couple of extensions to update, so nothing obvious. Also, there's nothing in the CiviCRM logs.
  I've tried to search on here but there doesn't seem to be anything recent/similar?
  
  **Tags:** error, system-status
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-05-05. Score: 1 | Accepted answer
  
  Apply this patch, or downgrade drupal to 9.5.8.
  
  <https://github.com/civicrm/civicrm-drupal-8/pull/82>
  
  
  ---
  
  