diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php index 995030a..976e6d4 100644 --- a/core/modules/taxonomy/src/Entity/Term.php +++ b/core/modules/taxonomy/src/Entity/Term.php @@ -78,7 +78,8 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti // Delete term hierarchy information after looking up orphans but before // deleting them so that their children/parent information is consistent. - $storage->deleteTermsFromTermHierarchy(array_keys($entities)); + $storage->deleteTermHierarchy(array_keys($entities)); + $storage->deleteTermHierarchyByParent(array_keys($entities)); if (!empty($orphans)) { entity_delete_multiple('taxonomy_term', $orphans); diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php index 4ae132e..836da9e 100644 --- a/core/modules/taxonomy/src/TermStorage.php +++ b/core/modules/taxonomy/src/TermStorage.php @@ -115,14 +115,6 @@ public function deleteTermHierarchyByParent($pids) { } /** - * Removes the terms and reference to parents from term_hierarchy. - */ - public function deleteTermsFromTermHierarchy($tids) { - $this->deleteTermHierarchy($tids); - $this->deleteTermHierarchyByParent($tids); - } - - /** * {@inheritdoc} */ public function updateTermHierarchy(EntityInterface $term) { diff --git a/core/modules/taxonomy/src/TermStorageInterface.php b/core/modules/taxonomy/src/TermStorageInterface.php index 00f37fd..9786f17 100644 --- a/core/modules/taxonomy/src/TermStorageInterface.php +++ b/core/modules/taxonomy/src/TermStorageInterface.php @@ -25,6 +25,7 @@ public function deleteTermHierarchy($tids); /** * Removes reference to terms from term_hierarchy parent. + * * @param array $pids * Array of parent terms that need to be removed from hierarchy. */