Error after updating to Drupal 10.3.1

Created on 9 July 2024, 5 months ago

Problem/Motivation

After updating to Drupal 10.3.1 my site WSODed and I got an error in the Watchdog:

"1" is an invalid render array key. Value should be an array but got a string.";s:9:"%function";s:38:"Drupal\Core\Render\Element::children()";s:5:"%file";s:73:"/home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Element.php";s:5:"%line";i:97;s:17:"@backtrace_string";s:6054:"#0 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Renderer.php(462): Drupal\Core\Render\Element::children(Array, true)
#1 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender(Array)
#2 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender(Array)
#3 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#4 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render(Array)
#5 /home/c/cl40635/kazan/public_html/sites/default/files/php/twig/668d433d3df9f_html.html.twig_T-zKIkCY7XcZPD9EQo82PDKI2/YBNQ2Ce_sndfk43lC0tmhePGMlusTftvhMdModdEx3E.php(112): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#6 /home/c/cl40635/kazan/public_html/vendor/twig/twig/src/Template.php(360): __TwigTemplate_bce1e62a13035cc774f6c6d95e5e9441->doDisplay(Array, Array)
#7 /home/c/cl40635/kazan/public_html/vendor/twig/twig/src/Template.php(335): Twig\Template->yield(Array)
#8 /home/c/cl40635/kazan/public_html/vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render(Array)
#9 /home/c/cl40635/kazan/public_html/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
#10 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/contrib/...', Array)
#11 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render('html', Array)
#12 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#13 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(158): Drupal\Core\Render\Renderer->render(Array)
#14 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#15 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(159): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#16 /home/c/cl40635/kazan/public_html/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))
#17 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#18 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#19 /home/c/cl40635/kazan/public_html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#20 /home/c/cl40635/kazan/public_html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#21 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /home/c/cl40635/kazan/public_html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /home/c/cl40635/kazan/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /home/c/cl40635/kazan/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /home/c/cl40635/kazan/public_html/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /home/c/cl40635/kazan/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))

I think the crucial part are srings #5 and #10, which tell us that in particular twig file some call produces string instead of array.
Looking up a mentioned file I see the error sting::

        yield $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["page_bottom"] ?? null), 61, $this->source), "html", null, true);

This file renders main html template:
return "themes/contrib/adaptivetheme/at_core/templates/layout/html.html.twig";

I have similar site with the same versions of Adaptivetheme and At_tool, which I've updated successfully.
I tried to update At_tool and Adaptivetheme to versions 3.1.2 and 7.1.0 respectively.
No luck.

What am I doing wrong?

🐛 Bug report
Status

Active

Version

5.4

Component

Miscellaneous

Created by

🇷🇺Russia urix

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

Comments & Activities

Production build 0.71.5 2024