There is an error that occurs on PHP 8.1+.
It seems that it has been already fixed for the old version of hook in
π
Deprecated function: strtr(): Passing null to parameter #1 ($string) of type string is deprecated in block_content_template_theme_suggestions_block_content()
Active
, but not for the modern way of the implementation introduced via #[Hook
attribute in BlockContentHooks
.
Deprecated function: strtr(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\block_content\Hook\BlockContentHooks->themeSuggestionsBlockAlter() (line 122 of /var/www/web/core/modules/block_content/src/Hook/BlockContentHooks.php)
#0 /var/www/web/core/includes/bootstrap.inc(108): _drupal_error_handler_real(8192, 'strtr(): Passin...', '/var/www/web/co...', 122)
#1 [internal function]: _drupal_error_handler(8192, 'strtr(): Passin...', '/var/www/web/co...', 122)
#2 /var/www/web/core/modules/block_content/src/Hook/BlockContentHooks.php(122): strtr(NULL, '.', '_')
#3 /var/www/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(459): Drupal\block_content\Hook\BlockContentHooks->themeSuggestionsBlockAlter(Array, Array, 'block')
#4 /var/www/web/core/lib/Drupal/Core/Theme/ThemeManager.php(393): Drupal\Core\Extension\ModuleHandler->alter('theme_suggestio...', Array, Array, 'block')
#5 /var/www/web/core/lib/Drupal/Core/Theme/ThemeManager.php(220): Drupal\Core\Theme\ThemeManager->buildThemeHookSuggestions('block', '', Array)
#6 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Theme\ThemeManager->render('block', Array)
#7 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(459): Drupal\Core\Render\Renderer->doRender(Array)
#8 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(203): Drupal\Core\Render\Renderer->doRender(Array, false)
#9 /var/www/web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array)
#10 /var/www/web/sites/default/files/php/twig/67efe52dc4748_layout--1-col.html.twig_PXbxvTlN5jeupYJxqjAldt-te/oKt5f4hoCM1AGLjeivndCP1o-UnKo1vZ2g8FGdSrOp0.php(160): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#11 /var/www/vendor/twig/twig/src/Template.php(432): __TwigTemplate_dca4442cc757289a20d5c272d9b0ab2f___1403434860->block_content(Array, Array)
#12 /var/www/web/sites/default/files/php/twig/67efe52dc4748_layout_1_col.twig_rAXKU3v0Lx9v-dvAIjLXUGeFx/UxI1Pz5QyfOLl58ZvpLA7luinNn6qfvggASYzOK-CTM.php(96): Twig\Template->yieldBlock('content', Array, Array)
#13 /var/www/vendor/twig/twig/src/Template.php(432): __TwigTemplate_f6ce43b2f3209ee448dadd6642303d06->block_template(Array, Array)
#14 /var/www/web/sites/default/files/php/twig/67efe52dc4748_layout_1_col.twig_rAXKU3v0Lx9v-dvAIjLXUGeFx/UxI1Pz5QyfOLl58ZvpLA7luinNn6qfvggASYzOK-CTM.php(76): Twig\Template->yieldBlock('template', Array, Array)
#15 /var/www/vendor/twig/twig/src/Template.php(432): __TwigTemplate_f6ce43b2f3209ee448dadd6642303d06->block_component(Array, Array)
#16 /var/www/web/sites/default/files/php/twig/67efe52dc4748_layout_1_col.twig_rAXKU3v0Lx9v-dvAIjLXUGeFx/UxI1Pz5QyfOLl58ZvpLA7luinNn6qfvggASYzOK-CTM.php(54): Twig\Template->yieldBlock('component', Array, Array)
#17 /var/www/vendor/twig/twig/src/Template.php(388): __TwigTemplate_f6ce43b2f3209ee448dadd6642303d06->doDisplay(Array, Array)
#18 /var/www/web/sites/default/files/php/twig/67efe52dc4748_layout--1-col.html.twig_PXbxvTlN5jeupYJxqjAldt-te/oKt5f4hoCM1AGLjeivndCP1o-UnKo1vZ2g8FGdSrOp0.php(147): Twig\Template->yield(Array, Array)
#19 /var/www/vendor/twig/twig/src/Template.php(388): __TwigTemplate_dca4442cc757289a20d5c272d9b0ab2f___1403434860->doDisplay(Array, Array)
#20 /var/www/web/sites/default/files/php/twig/67efe52dc4748_layout--1-col.html.twig_PXbxvTlN5jeupYJxqjAldt-te/oKt5f4hoCM1AGLjeivndCP1o-UnKo1vZ2g8FGdSrOp0.php(49): Twig\Template->yield(Array)
#21 /var/www/vendor/twig/twig/src/Template.php(388): __TwigTemplate_dca4442cc757289a20d5c272d9b0ab2f->doDisplay(Array, Array)
#22 /var/www/vendor/twig/twig/src/Template.php(344): Twig\Template->yield(Array, Array)
#23 /var/www/vendor/twig/twig/src/Template.php(359): Twig\Template->display(Array)
#24 /var/www/vendor/twig/twig/src/TemplateWrapper.php(51): Twig\Template->render(Array)
#25 /var/www/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render(Array)
#26 /var/www/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template('themes/custom/t...', Array)
#27 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Theme\ThemeManager->render('layout__1_col', Array)
#28 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(459): Drupal\Core\Render\Renderer->doRender(Array)
#29 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(459): Drupal\Core\Render\Renderer->doRender(Array)
#30 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(459): Drupal\Core\Render\Renderer->doRender(Array)
#31 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(459): Drupal\Core\Render\Renderer->doRender(Array)
#32 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(203): Drupal\Core\Render\Renderer->doRender(Array, false)
#33 /var/www/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render(Array, false)
#34 /var/www/web/core/lib/Drupal/Core/Render/Renderer.php(593): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#35 /var/www/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#36 /var/www/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#37 /var/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))
#38 /var/www/vendor/symfony/event-dispatcher/EventDispatcher.php(246): Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#39 /var/www/vendor/symfony/event-dispatcher/EventDispatcher.php(206): Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#40 /var/www/vendor/symfony/event-dispatcher/EventDispatcher.php(56): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'kernel.view', Object(Symfony\Component\HttpKernel\Event\ViewEvent))
#41 /var/www/vendor/symfony/http-kernel/HttpKernel.php(188): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#42 /var/www/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#43 /var/www/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#44 /var/www/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#45 /var/www/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#46 /var/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#47 /var/www/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /var/www/web/modules/contrib/shield/src/ShieldMiddleware.php(263): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#49 /var/www/web/modules/contrib/shield/src/ShieldMiddleware.php(219): Drupal\shield\ShieldMiddleware->bypass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#50 /var/www/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#51 /var/www/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#52 /var/www/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#53 /var/www/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#54 /var/www/web/core/lib/Drupal/Core/DrupalKernel.php(709): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#55 /var/www/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#56 {main}
Active
1.0
Code