InvalidArgumentException while trying to render item

Created on 1 August 2024, 9 months ago
Updated 6 September 2024, 8 months ago

Problem/Motivation

When view display is not configured for content type and you set search api to render item with desired DM, then custom breadcrumbs throws an error.

InvalidArgumentException while trying to render item entity:node/50036:en with view mode full for search index Default Solr content index: Route required in Drupal\Core\Url::fromRouteMatch() (line 170 of /var/www/html/docroot/core/lib/Drupal/Core/Url.php).

Backtrace 	

#0 /var/www/html/docroot/modules/contrib/custom_breadcrumbs/src/BreadcrumbBuilder.php(445): Drupal\Core\Url::fromRouteMatch()
#1 /var/www/html/docroot/modules/contrib/custom_breadcrumbs/src/BreadcrumbBuilder.php(164): Drupal\custom_breadcrumbs\BreadcrumbBuilder->matchPaths()
#2 /var/www/html/docroot/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php(78): Drupal\custom_breadcrumbs\BreadcrumbBuilder->applies()
#3 /var/www/html/docroot/core/modules/system/src/Plugin/Block/SystemBreadcrumbBlock.php(73): Drupal\Core\Breadcrumb\BreadcrumbManager->build()
#4 /var/www/html/docroot/core/modules/block/src/BlockViewBuilder.php(171): Drupal\system\Plugin\Block\SystemBreadcrumbBlock->build()
#5 [internal function]: Drupal\block\BlockViewBuilder::preRender()

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇵🇱Poland lamp5 Rzeszow

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024