Menu Breadcrumb causes a Fatal error

Created on 16 July 2021, over 3 years ago
Updated 28 March 2024, 8 months ago

Problem/Motivation

Getting a white screen of death after some use of the module. It originally worked for a good time I tried re-installing thinking it was more to do with the menu_breadcrumb module. It seems like an object is not being returned, which does make sense because objects may or may not be created when nodes are left in draft form. After creating generating the preview link and going to the page I'm met with a White screen.

Here is my stack trace:

Error: Call to a member function getOption() on null in Drupal\preview_link\Controller\PreviewLinkController->resolveEntity() (line 94 of /app/web/modules/contrib/preview_link/src/Controller/PreviewLinkController.php)
#0 /app/web/modules/contrib/preview_link/src/Controller/PreviewLinkController.php(84): Drupal\preview_link\Controller\PreviewLinkController->resolveEntity(Object(Drupal\Core\Routing\NullRouteMatch))
#1 [internal function]: Drupal\preview_link\Controller\PreviewLinkController->title(Object(Drupal\Core\Routing\NullRouteMatch))
#2 /app/web/core/lib/Drupal/Core/Controller/TitleResolver.php(58): call_user_func_array(Array, Array)
#3 /app/web/modules/contrib/menu_breadcrumb/src/MenuBasedBreadcrumbBuilder.php(423): Drupal\Core\Controller\TitleResolver->getTitle(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\Routing\Route))
#4 /app/web/modules/contrib/menu_breadcrumb/src/MenuBasedBreadcrumbBuilder.php(338): Drupal\menu_breadcrumb\MenuBasedBreadcrumbBuilder->addMissingCurrentPage(Array, Object(Drupal\Core\Routing\CurrentRouteMatch))
#5 /app/web/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php(83): Drupal\menu_breadcrumb\MenuBasedBreadcrumbBuilder->build(Object(Drupal\Core\Routing\CurrentRouteMatch))
#6 /app/web/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php(72): Drupal\Core\Breadcrumb\BreadcrumbManager->build(Object(Drupal\Core\Routing\CurrentRouteMatch))
#7 /app/web/core/modules/block/src/BlockViewBuilder.php(171): Drupal\system\Plugin\Block\SystemBreadcrumbBlock->build()
#8 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array)
#9 /app/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)
#10 /app/web/core/lib/Drupal/Core/Render/Renderer.php(781): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'silenced_deprec...', 'Drupal\\Core\\Ren...')
#11 /app/web/core/lib/Drupal/Core/Render/Renderer.php(372): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#12 /app/web/core/lib/Drupal/Core/Render/Renderer.php(444): Drupal\Core\Render\Renderer->doRender(Array)
#13 /app/web/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false)
#14 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array)
#15 /app/web/sites/default/files/php/twig/60f0419bdaeb4_page.html.twig_aHPcacKNJJMKovYT7IEaAw5cC/5XbKJ-7jmAZwj_p-9We6y1JGT3S0SF-EAsqyo7hSV3g.php(61): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#16 /app/vendor/twig/twig/src/Template.php(455): __TwigTemplate_f2045117631526763e246b380940f6a708e1fd59160c4000bb221b3ec52a504b->doDisplay(Array, Array)
#17 /app/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array)
#18 /app/vendor/twig/twig/src/Template.php(434): Twig\Template->display(Array)
#19 /app/web/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array)
#20 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(398): twig_render_template('themes/custom/n...', Array)
#21 /app/web/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render('page', Array)
#22 /app/web/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false)
#23 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(501): Drupal\Core\Render\Renderer->render(Array)
#24 /app/web/sites/default/files/php/twig/60f0419bdaeb4_html.html.twig_HjTHld8SyHAZqVrLivFsI36Jl/1yIYd9AaFEeSstUPQPXcK2K8rIN62ymYREGOncP-o5E.php(132): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#25 /app/vendor/twig/twig/src/Template.php(455): __TwigTemplate_d4795b88400e0e99ff02ea40eca7e271ff0673300f752325fdd47620f0651c1f->doDisplay(Array, Array)
#26 /app/vendor/twig/twig/src/Template.php(422): Twig\Template->displayWithErrorHandling(Array, Array)
#27 /app/vendor/twig/twig/src/Template.php(434): Twig\Template->display(Array)
#28 /app/web/core/themes/engines/twig/twig.engine(64): Twig\Template->render(Array)
#29 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(398): twig_render_template('themes/custom/n...', Array)
#30 /app/web/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render('html', Array)
#31 /app/web/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, false)
#32 /app/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(147): Drupal\Core\Render\Renderer->render(Array)
#33 /app/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#34 /app/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(148): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#35 /app/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))
#36 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#37 /app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#38 /app/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
#39 /app/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#40 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#41 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#42 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#43 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#44 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#45 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#46 /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#47 /app/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#49 {main}
.

Here is my stack trace:

Steps to reproduce

Install menu breadcrumb
Install preview link module
Create a node In draft
Create preview link
View node.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada cjboranp

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024