Viewing an issue with a deleted comment throws an exception

Created on 12 September 2024, 4 months ago

Problem/Motivation

When viewing a resolved issue, we get the following exception:

TypeError: Cannot access offset of type string on string in helpdesk_integration_comment_view_alter() (Zeile 114 in /var/www/html/web/modules/contrib/helpdesk_integration/helpdesk_integration.module).

#0 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(552): helpdesk_integration_comment_view_alter()
#1 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(305): Drupal\Core\Extension\ModuleHandler->alter()
#2 [internal function]: Drupal\Core\Entity\EntityViewBuilder->buildMultiple()
#3 /var/www/html/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array()
#4 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(870): Drupal\Core\Render\Renderer->doTrustedCallback()
#5 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(432): Drupal\Core\Render\Renderer->doCallback()
#6 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#7 /var/www/html/web/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render()
#8 /data/default/public/php/twig/66e23ee147eda_field--comment.html.twig_MKNuJeP4nSiEqzwW67m2wfUgh/XUITq7l5ekiL-ndNpZVbhE2QQT7FEgEWOJmuFMLx2_s.php(78): Drupal\Core\Template\TwigExtension->escapeFilter()
#9 /var/www/html/vendor/twig/twig/src/Template.php(393): __TwigTemplate_35dc739027df8538c4f1fe4cdb90e637->doDisplay()
#10 /var/www/html/vendor/twig/twig/src/Template.php(349): Twig\Template->yield()
#11 /var/www/html/vendor/twig/twig/src/Template.php(364): Twig\Template->display()
#12 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render()
#13 /var/www/html/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render()
#14 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template()
#15 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render()
#16 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender()
#17 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#18 /var/www/html/web/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render()
#19 /data/default/public/php/twig/66e23ee147eda_helpdesk-issue.html.twig_2n6ATNT94ockXAbfQ72lGmY2W/TD4AzmEggqdixc-g_V9BeNSYOh0xhUsgkCX3KZ8QHts.php(51): Drupal\Core\Template\TwigExtension->escapeFilter()
#20 /var/www/html/vendor/twig/twig/src/Template.php(393): __TwigTemplate_728a25c0a1a40ef15ca0021cf476b0ff->doDisplay()
#21 /var/www/html/vendor/twig/twig/src/Template.php(349): Twig\Template->yield()
#22 /var/www/html/vendor/twig/twig/src/Template.php(364): Twig\Template->display()
#23 /var/www/html/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render()
#24 /var/www/html/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render()
#25 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template()
#26 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render()
#27 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#28 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#29 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#30 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext()
#31 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#32 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#33 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#34 /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#35 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#36 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#37 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#38 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#39 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#40 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#41 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#42 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#43 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#44 /var/www/html/web/modules/contrib/crowdsec/src/Middleware.php(96): Drupal\ban\BanMiddleware->handle()
#45 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\crowdsec\Middleware->handle()
#46 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#47 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#48 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#49 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#50 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#51 {main}

Proposed resolution

This is because we used element children in a wrong way.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇩🇪Germany jurgenhaas Gottmadingen

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

Comments & Activities

Production build 0.71.5 2024