You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disabling islandora_breadcrumbs module or commenting out line 111 (as below) makes it work
/var/www/html/drupal/web/modules/contrib/islandora/modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php
108 // Find the next in the chain, if there are any.
109 if ($entity->hasField($this->config->get('referenceField')) &&
110 !$entity->get($this->config->get('referenceField'))->isEmpty()) {
111 // $this->walkMembership($entity->get($this->config->get('referenceField'))->entity, $crumbs);
112 }
Error
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\islandora_breadcrumbs\IslandoraBreadcrumbBuilder::walkMembership() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /var/www/html/drupal/web/modules/contrib/islandora/modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php on line 111 in Drupal\islandora_breadcrumbs\IslandoraBreadcrumbBuilder->walkMembership() (line 93 of modules/contrib/islandora/modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php).
Drupal\islandora_breadcrumbs\IslandoraBreadcrumbBuilder->walkMembership(NULL, Array) (Line: 111)
Drupal\islandora_breadcrumbs\IslandoraBreadcrumbBuilder->walkMembership(Object, Array) (Line: 72)
Drupal\islandora_breadcrumbs\IslandoraBreadcrumbBuilder->build(Object) (Line: 83)
Drupal\Core\Breadcrumb\BreadcrumbManager->build(Object) (Line: 72)
Drupal\system\Plugin\Block\SystemBreadcrumbBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)
The text was updated successfully, but these errors were encountered:
Not tested but below seems to get rid of the error
diff --git a/modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php b/modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php
index c58e700..86090ff 100644
--- a/modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php
+++ b/modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php
@@ -107,7 +107,8 @@ class IslandoraBreadcrumbBuilder implements BreadcrumbBuilderInterface {
// Find the next in the chain, if there are any.
if ($entity->hasField($this->config->get('referenceField')) &&
- !$entity->get($this->config->get('referenceField'))->isEmpty()) {
+ !$entity->get($this->config->get('referenceField'))->isEmpty() &&
+ $entity->get($this->config->get('referenceField'))->entity instanceof EntityInterface) {
$this->walkMembership($entity->get($this->config->get('referenceField'))->entity, $crumbs);
}
}
Steps to re-create:
Work-around
Disabling islandora_breadcrumbs module or commenting out line 111 (as below) makes it work
Error
The text was updated successfully, but these errors were encountered: