Hi,

I'm getting this error:

Notice: Undefined index: taxonomy_breadcrumb_path in Drupal\taxonomy_breadcrumb\TaxonomyBreadcrumb->build() (line 130 of modules/contrib/taxonomy_breadcrumb/src/TaxonomyBreadcrumb.php).

Comments

guix created an issue. See original summary.

DolfAndringa’s picture

I am getting this same error in combination with a few others. The problem arose when I tried to remove a vocabulary.

I have also attempted to uninstall the taxonomy breadcrumb module through drush and the webinterface then I get this error:

exception 'Drupal\Core\Field\FieldException' with message 'Attempt to create a field taxonomy_breadcrumb_path that does not exist on    [error]
entity type taxonomy_term.' in /srv/www/vhosts/test_nightowl_foundationu_com/web/core/modules/field/src/Entity/FieldConfig.php:293
Stack trace:
#0 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Field/FieldConfigBase.php(276):
Drupal\field\Entity\FieldConfig->getFieldStorageDefinition()
#1 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/modules/field/src/Entity/FieldConfig.php(123):
Drupal\Core\Field\FieldConfigBase->postCreate(Object(Drupal\field\FieldConfigStorage))
#2 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(187):
Drupal\field\Entity\FieldConfig->postCreate(Object(Drupal\field\FieldConfigStorage))
#3 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Entity/Entity.php(528):
Drupal\Core\Entity\EntityStorageBase->create(Array)
#4 /srv/www/vhosts/test_nightowl_foundationu_com/web/modules/contrib/taxonomy_breadcrumb/taxonomy_breadcrumb.module(87):
Drupal\Core\Entity\Entity::create(Array)
#5 [internal function]: taxonomy_breadcrumb_taxonomy_vocabulary_update(Object(Drupal\taxonomy\Entity\Vocabulary))
#6 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(402):
call_user_func_array('taxonomy_breadc...', Array)
#7 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(376):
Drupal\Core\Extension\ModuleHandler->invokeAll('taxonomy_vocabu...', Array)
#8 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(470):
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('update', Object(Drupal\taxonomy\Entity\Vocabulary))
#9 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(395):
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object(Drupal\taxonomy\Entity\Vocabulary), true)
#10 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(259):
Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\taxonomy\Entity\Vocabulary))
#11 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Entity/Entity.php(377):
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\taxonomy\Entity\Vocabulary))
#12 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(637):
Drupal\Core\Entity\Entity->save()
#13 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Config/ConfigManager.php(198):
Drupal\Core\Config\Entity\ConfigEntityBase->save()
#14 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php(395):
Drupal\Core\Config\ConfigManager->uninstall('module', 'taxonomy_breadc...')
#15 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91):
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#16 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/commands/core/drupal/environment.inc(227):
Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array)
#17 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/commands/core/drupal/pm_8.inc(79): drush_module_uninstall(Array)
#18 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/commands/pm/pm.drush.inc(1250): _drush_pm_uninstall(Array)
#19 [internal function]: drush_pm_uninstall('taxonomy_breadc...')
#20 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/includes/command.inc(422):
call_user_func_array('drush_pm_uninst...', Array)
#21 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#22 [internal function]: drush_command('taxonomy_breadc...')
#23 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/includes/command.inc(199): call_user_func_array('drush_command',
Array)
#24 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#25 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/includes/preflight.inc(66):
Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#26 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/drush/drush/drush.php(12): drush_main()
#27 {main}

This is my stacktrace for the OP's error:

Notice: Undefined index: taxonomy_breadcrumb_path in Drupal\taxonomy_breadcrumb\TaxonomyBreadcrumb->build() (line 130 of /srv/www/vhosts/test_nightowl_foundationu_com/web/modules/contrib/taxonomy_breadcrumb/src/TaxonomyBreadcrumb.php)

#0 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/includes/bootstrap.inc(566): _drupal_error_handler_real(8, 'Undefined index...', '/srv/www/vhosts...', 130, Array) 
#1 /srv/www/vhosts/test_nightowl_foundationu_com/web/modules/contrib/taxonomy_breadcrumb/src/TaxonomyBreadcrumb.php(130): _drupal_error_handler(8, 'Undefined index...', '/srv/www/vhosts...', 130, Array) 
#2 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php(83): Drupal\taxonomy_breadcrumb\TaxonomyBreadcrumb->build(Object(Drupal\Core\Routing\CurrentRouteMatch)) 
#3 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php(72): Drupal\Core\Breadcrumb\BreadcrumbManager->build(Object(Drupal\Core\Routing\CurrentRouteMatch)) 
#4 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/modules/block/src/BlockViewBuilder.php(203): Drupal\system\Plugin\Block\SystemBreadcrumbBlock->build() 
#5 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array) 
#6 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func('Drupal\\block\\Bl...', Array) 
#7 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) 
#8 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) 
#9 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) 
#10 /srv/www/vhosts/test_nightowl_foundationu_com/web/sites/default/files/php/twig/5a0be1b90dacc_page.html.twig_zgocC1ma2sQCs3ibm8VxiX_sS/roo0BHy0KvLljKaP5vQFk4-CRozTNqJcZAoo2-Igeak.php(304): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) 
#11 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(215): __TwigTemplate_1db6037c41b04c826234d42c9d1507d46d672376759f8d7b26fca392fdddbb7e->block_highlighted(Array, Array) 
#12 /srv/www/vhosts/test_nightowl_foundationu_com/web/sites/default/files/php/twig/5a0be1b90dacc_page.html.twig_zgocC1ma2sQCs3ibm8VxiX_sS/roo0BHy0KvLljKaP5vQFk4-CRozTNqJcZAoo2-Igeak.php(232): Twig_Template->displayBlock('highlighted', Array, Array) 
#13 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(215): __TwigTemplate_1db6037c41b04c826234d42c9d1507d46d672376759f8d7b26fca392fdddbb7e->block_main(Array, Array) 
#14 /srv/www/vhosts/test_nightowl_foundationu_com/web/sites/default/files/php/twig/5a0be1b90dacc_page.html.twig_zgocC1ma2sQCs3ibm8VxiX_sS/roo0BHy0KvLljKaP5vQFk4-CRozTNqJcZAoo2-Igeak.php(81): Twig_Template->displayBlock('main', Array, Array) 
#15 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_1db6037c41b04c826234d42c9d1507d46d672376759f8d7b26fca392fdddbb7e->doDisplay(Array, Array) 
#16 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) 
#17 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) 
#18 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) 
#19 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('sites/default/t...', Array) 
#20 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('page', Array) 
#21 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) 
#22 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) 
#23 /srv/www/vhosts/test_nightowl_foundationu_com/web/sites/default/files/php/twig/5a0be1b90dacc_html.html.twig_tBE6E1WQI0YjBbRBCGuuxwRVw/MrcBnFkAf_u7NN1G_xP4gkO5t4jDxz6T6zwo3wKu3QE.php(90): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) 
#24 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_e1a9dbb34caa1c133cb544a7069db1587b57988d97401f143244d11a5c570367->doDisplay(Array, Array) 
#25 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) 
#26 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) 
#27 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) 
#28 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/bootstra...', Array) 
#29 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('html', Array) 
#30 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) 
#31 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(147): Drupal\Core\Render\Renderer->render(Array) 
#32 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/Renderer.php(576): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() 
#33 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(148): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) 
#34 /srv/www/vhosts/test_nightowl_foundationu_com/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)) 
#35 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(108): Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) 
#36 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) 
#37 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) 
#38 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#39 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#40 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(184): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#41 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(121): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#42 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(75): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#43 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#44 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#45 /srv/www/vhosts/test_nightowl_foundationu_com/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#46 /srv/www/vhosts/test_nightowl_foundationu_com/web/core/lib/Drupal/Core/DrupalKernel.php(657): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#47 /srv/www/vhosts/test_nightowl_foundationu_com/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) 
#48 {main}.
DolfAndringa’s picture

I managed to uninstall the module by inserting a return statement on a new line after line 78 of taxonomy_breadcrumb.module. It basically prevents the module from updating a field on the taxonomy term, which is what caused the issue with uninstalling. I am not sure if this is fully related to the original issue, but I am guessing it is.

So I changed

function taxonomy_breadcrumb_taxonomy_vocabulary_update(EntityInterface $entity) {
  if (!FieldConfig::loadByName('taxonomy_term', $entity->id(), 'taxonomy_breadcrumb_path')) {

into

function taxonomy_breadcrumb_taxonomy_vocabulary_update(EntityInterface $entity) {
  return;
  if (!FieldConfig::loadByName('taxonomy_term', $entity->id(), 'taxonomy_breadcrumb_path')) {

to at least get the module uninstalled.

mxt’s picture

I get mentioned error too. Just installed the module, cleared cache, go to a node with a taxonomy term: the error is thrown

pranali.addweb’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

@all, Please use my attached patch, I tried to resolve this notice error which faced same by me previously. Hope this helps you. share your feedback if you are still facing an issue.

Thanks

akash.addweb’s picture

Status: Needs review » Reviewed & tested by the community

@Manthan.addweb, thanks for your patch, I checked your patch using simplytest.me & follow below steps to test.
1) Install The module
2) cleared cache
3) go to a node with a taxonomy term & I didn't get the same error as mentioned above.

akash.addweb’s picture

nehajyoti’s picture

I have not tested the patch myself but since it has been RTBC and code looks good, committing the patch to 8.x-1.x branch and ll be releasing the 1st stable version 8.x-1.1.

nehajyoti’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.