Skip to content

Commit 34d768e

Browse files
committed
[BUGFIX] Published Nodes didn't replace their old index
An updated document Node created a new index entry after beeing published instead instead of replacing its own live index entry
1 parent d3e6f7d commit 34d768e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer/NodeIndexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function getIndex() {
170170
public function indexNode(Node $node, $targetWorkspaceName = NULL) {
171171
$contextPath = $node->getContextPath();
172172
if ($targetWorkspaceName !== NULL) {
173-
$contextPath = str_replace($node->getWorkspace()->getName(), $targetWorkspaceName, $contextPath);
173+
$contextPath = str_replace($node->getContext()->getWorkspace()->getName(), $targetWorkspaceName, $contextPath);
174174
}
175175
$contextPathHash = sha1($contextPath);
176176
$nodeType = $node->getNodeType();

0 commit comments

Comments
 (0)