Subtitle from entity not working (D10)

Created on 21 June 2023, over 1 year ago
Updated 4 December 2023, 12 months ago

Problem/Motivation

When selecting a subtitle from an existing entity (e.g. 'field_page_subtitle'), the subtitle is not shown (in D10). The title and image from existing entity (e.g. 'field_page_image') is shown correctly.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

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 @robbe03
  • When a subtitle field is selected from an existing entity in Advanced Title Block configuration, AND when that subtitle field has an actual value (it is not an empty string) in the actual node then following error is generated after clearing all cache in Drupal:

    User error: "value" is an invalid render array key in Drupal\Core\Render\Element::children() (line 98 of core/lib/Drupal/Core/Render/Element.php).

    Drupal\Core\Render\Element::children(Array, 1) (Line: 404)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 62)
    __TwigTemplate_9f1da337b4e7ef4cba980dcb763b03ec->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('modules/contrib/advanced_title_block/templates/advanced-title-block.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('advanced_title_block', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 84)
    __TwigTemplate_87eb65d0ac439f79bd8bb631d58e8442->block_content(Array, Array) (Line: 182)
    Twig\Template->displayBlock('content', Array, Array) (Line: 71)
    __TwigTemplate_87eb65d0ac439f79bd8bb631d58e8442->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('themes/contrib/uikit/templates/block/block.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('block', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 81)
    __TwigTemplate_6ff32928ca6565ef1229d8ae3820f234->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('themes/contrib/uikit_jme/templates/layout/page.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 80)
    __TwigTemplate_8481ca345f734086132303b2801d3200->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('core/themes/stable/templates/layout/html.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 162)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 163)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    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: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • When a subtitle field is selected from an existing entity in Advanced Title Block configuration, AND when that subtitle field has an actual value (it is not an empty string) in the actual node then following error is generated after clearing all cache in Drupal:

    User error: "value" is an invalid render array key in Drupal\Core\Render\Element::children() (line 98 of core/lib/Drupal/Core/Render/Element.php).

    Drupal\Core\Render\Element::children(Array, 1) (Line: 404)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 62)
    __TwigTemplate_9f1da337b4e7ef4cba980dcb763b03ec->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('modules/contrib/advanced_title_block/templates/advanced-title-block.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('advanced_title_block', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 84)
    __TwigTemplate_87eb65d0ac439f79bd8bb631d58e8442->block_content(Array, Array) (Line: 182)
    Twig\Template->displayBlock('content', Array, Array) (Line: 71)
    __TwigTemplate_87eb65d0ac439f79bd8bb631d58e8442->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('themes/contrib/uikit/templates/block/block.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('block', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 446)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 81)
    __TwigTemplate_6ff32928ca6565ef1229d8ae3820f234->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('themes/contrib/uikit_jme/templates/layout/page.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 80)
    __TwigTemplate_8481ca345f734086132303b2801d3200->doDisplay(Array, Array) (Line: 405)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
    Twig\Template->display(Array) (Line: 390)
    Twig\Template->render(Array) (Line: 55)
    twig_render_template('core/themes/stable/templates/layout/html.html.twig', Array) (Line: 384)
    Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 433)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 162)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 163)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    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: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    • hatuhay committed 1b67dba5 on 1.0.x
      Issue #3368299 by robbe03, Abhay: Subtitle from entity not working (D10)
      
  • Status changed to Fixed 12 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024