Warning: Undefined variable $current_redirect

Created on 3 April 2024, 8 months ago
Updated 5 April 2024, 7 months ago

Problem/Motivation

Warning thrown on pages when using Easy Breadcrumb

Steps to reproduce

Enable Easy Breadcrumb on a page with an existing redirect/alias

Warning: Undefined variable $current_redirect in Drupal\redirect\RedirectRepository->findRedirectByHashes() (line 142 of /var/www/html/docroot/modules/contrib/redirect/src/RedirectRepository.php)
#0 /var/www/html/docroot/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 /var/www/html/docroot/modules/contrib/redirect/src/RedirectRepository.php(142): _drupal_error_handler()
#2 /var/www/html/docroot/modules/contrib/redirect/src/RedirectRepository.php(91): Drupal\redirect\RedirectRepository->findRedirectByHashes()
#3 /var/www/html/docroot/modules/contrib/redirect/src/RedirectRepository.php(183): Drupal\redirect\RedirectRepository->findMatchingRedirect()
#4 /var/www/html/docroot/modules/contrib/redirect/src/RedirectRepository.php(155): Drupal\redirect\RedirectRepository->findByRedirect()
#5 /var/www/html/docroot/modules/contrib/redirect/src/RedirectRepository.php(91): Drupal\redirect\RedirectRepository->findRedirectByHashes()
#6 /var/www/html/docroot/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbBuilder.php(911): Drupal\redirect\RedirectRepository->findMatchingRedirect()
#7 /var/www/html/docroot/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbBuilder.php(505): Drupal\easy_breadcrumb\EasyBreadcrumbBuilder->getRequestForPath()
#8 /var/www/html/docroot/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php(83): Drupal\easy_breadcrumb\EasyBreadcrumbBuilder->build()
#9 /var/www/html/docroot/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php(73): Drupal\Core\Breadcrumb\BreadcrumbManager->build()
#10 /var/www/html/docroot/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php(106): Drupal\system\Plugin\Block\SystemBreadcrumbBlock->build()
#11 [internal function]: Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray->onBuildRender()
#12 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#13 /var/www/html/docroot/core/modules/layout_builder/src/SectionComponent.php(90): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#14 /var/www/html/docroot/core/modules/layout_builder/src/Section.php(88): Drupal\layout_builder\SectionComponent->toRenderArray()
#15 /var/www/html/docroot/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php(318): Drupal\layout_builder\Section->toRenderArray()
#16 /var/www/html/docroot/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php(278): Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildSections()
#17 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(339): Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple()
#18 /var/www/html/docroot/core/modules/node/src/NodeViewBuilder.php(24): Drupal\Core\Entity\EntityViewBuilder->buildComponents()
#19 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(281): Drupal\node\NodeViewBuilder->buildComponents()
#20 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(238): Drupal\Core\Entity\EntityViewBuilder->buildMultiple()
#21 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build()
#22 /var/www/html/docroot/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array()
#23 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(859): Drupal\Core\Render\Renderer->doTrustedCallback()
#24 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(421): Drupal\Core\Render\Renderer->doCallback()
#25 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender()
#26 /var/www/html/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#27 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#28 /var/www/html/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(239): Drupal\Core\Render\Renderer->executeInRenderContext()
#29 /var/www/html/docroot/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#30 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#31 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#32 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#33 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#34 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#35 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#36 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#37 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#38 /var/www/html/docroot/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#39 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#40 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
#41 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
#42 /var/www/html/docroot/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#43 /var/www/html/docroot/modules/contrib/shield/src/ShieldMiddleware.php(270): Drupal\ban\BanMiddleware->handle()
#44 /var/www/html/docroot/modules/contrib/shield/src/ShieldMiddleware.php(137): Drupal\shield\ShieldMiddleware->bypass()
#45 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle()
#46 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#47 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#48 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#49 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#50 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
#51 {main}

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.9

Component

Code

Created by

🇨🇦Canada Captain_Canuck

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

Comments & Activities

Production build 0.71.5 2024