Error: [] operator not supported for strings in olivero_preprocess

Created on 9 March 2023, over 1 year ago

Problem/Motivation

White screen after enabling and configuring the module. Throws the following error:

Error: [] operator not supported for strings in olivero_preprocess_form_element_label() (line 267 of /var/www/drupal/web/core/themes/olivero/olivero.theme)

#0 [internal function]: olivero_preprocess_form_element_label()
#1 /var/www/drupal/web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array()
#2 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render()
#3 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Render\Renderer->doRender()
#4 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Render\Renderer->doRender()
#5 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Render\Renderer->doRender()
#6 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#7 /var/www/drupal/web/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render()
#8 /var/www/drupal/web/sites/default/files/php/twig/640a4cd25c798_node.html.twig_hsLD414NBEK-TG4PUcmBF4UEo/ABE00CA1-PoiI5M0an1_fElUOsY1R1WSEpQcPV4hoTc.php(136): Drupal\Core\Template\TwigExtension->escapeFilter()
#9 /var/www/drupal/vendor/twig/twig/src/Template.php(405): __TwigTemplate_3f628cb51b87852a31e85f8571c351e82a4a7b1ab3dae88043590679602fb0ec->doDisplay()
#10 /var/www/drupal/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling()
#11 /var/www/drupal/vendor/twig/twig/src/Template.php(390): Twig\Template->display()
#12 /var/www/drupal/web/core/themes/engines/twig/twig.engine(55): Twig\Template->render()
#13 /var/www/drupal/web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template()
#14 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render()
#15 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#16 /var/www/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render()
#17 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#18 /var/www/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(243): Drupal\Core\Render\Renderer->executeInRenderContext()
#19 /var/www/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#20 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#21 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#22 /var/www/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#23 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#24 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#25 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#26 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#27 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#28 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#29 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#30 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#31 /var/www/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#32 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#33 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#34 {main}

Steps to reproduce

Drupal version: 9.5.4
Theme: Olivero

Installed the module, configured table view with few fields. Seems like the issue maybe related to Drupal's new theme.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada Natkeeran

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

Comments & Activities

Production build 0.71.5 2024