diff --git a/src/Repository/StructuralDBElementRepository.php b/src/Repository/StructuralDBElementRepository.php index 781c7622..7fc38671 100644 --- a/src/Repository/StructuralDBElementRepository.php +++ b/src/Repository/StructuralDBElementRepository.php @@ -243,6 +243,14 @@ class StructuralDBElementRepository extends AttachmentContainingDBElementReposit return $result[0]; } + //If the name contains category delimiters like ->, try to find the element by its full path + if (str_contains($name, '->')) { + $tmp = $this->getEntityByPath($name, '->'); + if (count($tmp) > 0) { + return $tmp[count($tmp) - 1]; + } + } + //If we find nothing, return null return null; }