Editing user account throws error TypeError: Drupal\Component\Utility\Html::decodeEntities()

Created on 10 March 2025, 27 days ago

Problem/Motivation

Editing User Account results in TypeError: Drupal\Component\Utility\Html::decodeEntities(). The stack trace is as follows:

TypeError: Drupal\Component\Utility\Html::decodeEntities(): Argument #1 ($text) must be of type string, array given, called in C:\icspaces-drupal\web\themes\contrib\solo\includes\_solo_theme_preprocess.inc on line 854 in Drupal\Component\Utility\Html::decodeEntities() (line 393 of core\lib\Drupal\Component\Utility\Html.php).
solo_preprocess_breadcrumb(Array, 'breadcrumb', Array)
call_user_func_array('solo_preprocess_breadcrumb', Array) (Line: 261)
Drupal\Core\Theme\ThemeManager->render('breadcrumb', Array) (Line: 446)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 203)
Drupal\Core\Render\Renderer->render(Array) (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 93)
__TwigTemplate_d69f1bc89b8828984ecf952065e7a7fc->block_content(Array, Array) (Line: 432)
Twig\Template->yieldBlock('content', Array, Array) (Line: 76)
__TwigTemplate_d69f1bc89b8828984ecf952065e7a7fc->doDisplay(Array, Array) (Line: 388)
Twig\Template->yield(Array, Array) (Line: 344)
Twig\Template->display(Array) (Line: 359)
Twig\Template->render(Array) (Line: 51)
Twig\TemplateWrapper->render(Array) (Line: 33)
twig_render_template('themes/contrib/solo/templates/block/block.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('block', Array) (Line: 446)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 459)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 203)
Drupal\Core\Render\Renderer->render(Array) (Line: 586)
Drupal\Core\Template\TwigExtension->renderVar(Array) (Line: 45)
__TwigTemplate_1c90eed2532d2ca1bb32c86062a18cd4->doDisplay(Array, Array) (Line: 388)
Twig\Template->yield(Array) (Line: 220)
__TwigTemplate_b6b90d407bac33c4188fbf98456a1d9d->doDisplay(Array, Array) (Line: 388)
Twig\Template->yield(Array, Array) (Line: 344)
Twig\Template->display(Array) (Line: 359)
Twig\Template->render(Array) (Line: 51)
Twig\TemplateWrapper->render(Array) (Line: 33)
twig_render_template('themes/contrib/solo/templates/layout/page.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 446)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 203)
Drupal\Core\Render\Renderer->render(Array) (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 122)
__TwigTemplate_68e67d21b6655e46dabaae8489572392->doDisplay(Array, Array) (Line: 388)
Twig\Template->yield(Array, Array) (Line: 344)
Twig\Template->display(Array) (Line: 359)
Twig\Template->render(Array) (Line: 51)
Twig\TemplateWrapper->render(Array) (Line: 33)
twig_render_template('themes/contrib/solo/templates/layout/html.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 446)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 203)
Drupal\Core\Render\Renderer->render(Array) (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 153)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}(Object, 'kernel.view', Object) (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'kernel.view', Object) (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object, 'kernel.view') (Line: 188)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Make sure the Solo theme is selected as the default theme for the site.
Login as a user without site admin role.
Click on the "My Account" menu option, then click on the "Edit" tab to edit the account details.
Notice the error is thrown.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @ikam
  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX

    Hello,

    I followed the direction, but I could not get the error. can you please share more details on how to get this error.

    Best wishes,
    Alaa

  • I'm using Drupal Core 11.1.4 if that helps. I'll also do more troubleshooting on my part to see what's going on (if I have configured something incorrectly).

  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX

    Hey,
    Thanks for the info! I made some updates to the dev version to ensure the breadcrumb is converted to a string before processing. Feel free to download the latest dev version and test it outβ€”let me know if you still run into this issue.

    Best wishes,
    Alaa

  • Hi Alaa - I've tried out the changes in the dev branch. I don't see that error anymore when I navigate to edit account (tested on Firefox 136.0 and Chrome 134.0.6998.35). Thank you so much for your fast response - much appreciate it!

  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX

    Thank you for testing and confirming. Glad to hear the issue is resolved. Feel free to report any new concerns. Appreciate your feedback!

  • πŸ‡ΊπŸ‡ΈUnited States flashwebcenter Austin TX
Production build 0.71.5 2024