From 15243dbcc889d4fe1b13f6c424f67b0ee95b8be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 7 Dec 2025 20:39:03 +0100 Subject: [PATCH] Allow to autodetermine categories and pathes from info provider import using a full path This fixes issue #1113 --- src/Repository/StructuralDBElementRepository.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }