- Issue created by @sakthi_dev
- @sakthi_dev opened merge request.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 5:22am 24 May 2023
After the installation of theme and trying to access any node content in frontend, getting the following error/traces.
Error: Call to undefined method Drupal\node\Entity\Node::URL() in businessgroup_zymphonies_theme_preprocess_breadcrumb() (line 185 of /app/themes/contrib/businessgroup_zymphonies_theme/businessgroup_zymphonies_theme.theme)
#0 [internal function]: businessgroup_zymphonies_theme_preprocess_breadcrumb(Array, 'breadcrumb', Array)
#1 /app/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array('businessgroup_z...', Array)
#2 /app/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('breadcrumb', Array)
#3 /app/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#4 /app/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render(Array)
#5 /app/sites/default/files/php/twig/646d9760af98f_block.html.twig_pSHBvSGlvqT5E_Yeo4AuwD80t/ixqxGUwO8XgxBNGJsplXjZKEN6qKAQ3ED7t-6iQ4BvE.php(82): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#6 /app/vendor/twig/twig/src/Template.php(182): __TwigTemplate_05682496eab512e6f7256343fc358eeff9fc9a010795ef886e151805a29a0e1f->block_content(Array, Array)
#7 /app/sites/default/files/php/twig/646d9760af98f_block.html.twig_pSHBvSGlvqT5E_Yeo4AuwD80t/ixqxGUwO8XgxBNGJsplXjZKEN6qKAQ3ED7t-6iQ4BvE.php(68): Twig\Template->displayBlock('content', Array, Array)
#8 /app/vendor/twig/twig/src/Template.php(405): __TwigTemplate_05682496eab512e6f7256343fc358eeff9fc9a010795ef886e151805a29a0e1f->doDisplay(Array, Array)
#9 /app/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling(Array, Array)
#10 /app/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)
#11 /app/core/themes/engines/twig/twig.engine(55): Twig\Template->render(Array)
#12 /app/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/contrib/...', Array)
#13 /app/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('block', Array)
#14 /app/core/lib/Drupal/Core/Render/Renderer.php(446): Drupal\Core\Render\Renderer->doRender(Array)
#15 /app/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#16 /app/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render(Array)
#17 /app/sites/default/files/php/twig/646d9760af98f_page.html.twig_SNMXycjPqWemEzI1iemEYpaWv/IQZRYeHkZkQ48hx93cTMgGzLd3tkcGCRadUSPSTS4ZA.php(273): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#18 /app/vendor/twig/twig/src/Template.php(405): __TwigTemplate_be75fb7a348bd748973b9b2332dde7fd6014d810ce2cba00c13510969dc513b3->doDisplay(Array, Array)
#19 /app/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling(Array, Array)
#20 /app/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)
#21 /app/core/themes/engines/twig/twig.engine(55): Twig\Template->render(Array)
#22 /app/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/contrib/...', Array)
#23 /app/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('page', Array)
#24 /app/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#25 /app/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render(Array)
#26 /app/sites/default/files/php/twig/646d9760af98f_html.html.twig_7BriwqQDUF-cmnafj1U8pqbCn/5nNvRkU9kzSMEqST_YkicO-e-VrjWKcKv29OVTohSaY.php(84): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#27 /app/vendor/twig/twig/src/Template.php(405): __TwigTemplate_986584a54ae985c6d7501fda4f80320ddcb6b79c81345ae0317443eb54c4a0c2->doDisplay(Array, Array)
#28 /app/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling(Array, Array)
#29 /app/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)
#30 /app/core/themes/engines/twig/twig.engine(55): Twig\Template->render(Array)
#31 /app/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/contrib/...', Array)
#32 /app/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\Core\Theme\ThemeManager->render('html', Array)
#33 /app/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#34 /app/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(162): Drupal\Core\Render\Renderer->render(Array)
#35 /app/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#36 /app/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(163): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#37 /app/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 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#39 /app/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#40 /app/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#41 /app/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#42 /app/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#43 /app/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#44 /app/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#45 /app/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#46 /app/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#47 /app/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#49 /app/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#50 /app/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#51 {main}
Install the theme.
Try to access any of the node content.
Need to update the method in the preprocess.
Review.
Needs review
2.0
Code