diff -u b/src/PathautoGenerator.php b/src/PathautoGenerator.php --- b/src/PathautoGenerator.php +++ b/src/PathautoGenerator.php @@ -412,7 +412,7 @@ // tokens. $child_entity_pattern = $this->getPatternByEntity($child_entity); if ( - ($child_entity->id() !== $entity->id && $child_entity->getEntityTypeId() !== $entity->getEntityTypeId()) + ($child_entity->id() !== $entity->id || $child_entity->getEntityTypeId() !== $entity->getEntityTypeId()) && $child_entity_pattern && strpos($child_entity_pattern->getPattern(), ':menu-link:parent') !== 0 ) {