core/modules/taxonomy/src/TermStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php index 826cfbb..2db0392 100644 --- a/core/modules/taxonomy/src/TermStorage.php +++ b/core/modules/taxonomy/src/TermStorage.php @@ -166,7 +166,7 @@ protected function getAncestors(TermInterface $term) { while ($tid = array_shift($search)) { foreach ($this->getParents(static::load($tid)) as $id => $parent) { - if ($parent && !isset($this->ancestors[$id])) { + if ($parent && !isset($this->ancestors[$term->id()][$id])) { $this->ancestors[$term->id()][$id] = $parent; $search[] = $id; }