Skip to content

Commit 0a921c2

Browse files
committed
BUGFIX: Skip content with hidden parent nodes in fulltext index
Resolves: #214 #377
1 parent 6ce6aa9 commit 0a921c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Classes/Indexer/NodeIndexer.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,16 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null): voi
243243
}
244244
}
245245

246+
// Don't index fulltext if the node has a hidden content parent
247+
$parentNode = $node;
248+
while (($parentNode = $parentNode->getParent()) && $parentNode->getNodeType()->isOfType(
249+
'Neos.Neos:Content'
250+
)) {
251+
if (!$parentNode->isVisible()) {
252+
return;
253+
}
254+
}
255+
246256
$documentIdentifier = $this->documentIdentifierGenerator->generate($node, $targetWorkspaceName);
247257
$nodeType = $node->getNodeType();
248258

0 commit comments

Comments
 (0)