From 28f3c9424d9469beeea3a36f055b90c75a6e42bd Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Tue, 12 Sep 2023 14:43:20 +0200 Subject: [PATCH] =?UTF-8?q?BUGFIX:=20Don=E2=80=99t=20include=20subnodetype?= =?UTF-8?q?s=20of=20subnodetypes=20in=20node=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: #4502 --- .../Controller/Service/NodesController.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Neos.Neos/Classes/Controller/Service/NodesController.php b/Neos.Neos/Classes/Controller/Service/NodesController.php index 2722382ce21..c1ca936d0b6 100644 --- a/Neos.Neos/Classes/Controller/Service/NodesController.php +++ b/Neos.Neos/Classes/Controller/Service/NodesController.php @@ -23,7 +23,6 @@ use Neos\Neos\View\Service\NodeJsonView; use Neos\Neos\Service\Mapping\NodePropertyConverterService; use Neos\ContentRepository\Domain\Model\NodeInterface; -use Neos\ContentRepository\Domain\Model\NodeType; use Neos\ContentRepository\Domain\Service\NodeTypeManager; use Neos\ContentRepository\Domain\Utility\NodePaths; @@ -93,22 +92,9 @@ class NodesController extends ActionController */ public function indexAction($searchTerm = '', array $nodeIdentifiers = [], $workspaceName = 'live', array $dimensions = [], array $nodeTypes = ['Neos.Neos:Document'], NodeInterface $contextNode = null) { - $searchableNodeTypeNames = []; - foreach ($nodeTypes as $nodeTypeName) { - if (!$this->nodeTypeManager->hasNodeType($nodeTypeName)) { - $this->throwStatus(400, sprintf('Unknown node type "%s"', $nodeTypeName)); - } - - $searchableNodeTypeNames[$nodeTypeName] = $nodeTypeName; - /** @var NodeType $subNodeType */ - foreach ($this->nodeTypeManager->getSubNodeTypes($nodeTypeName, false) as $subNodeTypeName => $subNodeType) { - $searchableNodeTypeNames[$subNodeTypeName] = $subNodeTypeName; - } - } - $contentContext = $this->createContentContext($workspaceName, $dimensions); if ($nodeIdentifiers === []) { - $nodes = $this->nodeSearchService->findByProperties($searchTerm, $searchableNodeTypeNames, $contentContext, $contextNode); + $nodes = $this->nodeSearchService->findByProperties($searchTerm, $nodeTypes, $contentContext, $contextNode); } else { $nodes = array_filter( array_map(function ($identifier) use ($contentContext) {