Skip to content

Commit 733af7b

Browse files
author
mczernik
committed
- remove on publish test
- fix use getDimensions from context
1 parent 72ea33a commit 733af7b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Classes/Indexer/NodeIndexer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class NodeIndexer extends ContentRepositoryAdaptor\Indexer\NodeIndexer
5050
*/
5151
public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
5252
{
53+
if( $node->isRemoved() ){
54+
$this->removeNode($node, $targetWorkspaceName);
55+
return;
56+
}
5357
if ($this->enableLiveAsyncIndexing !== true) {
5458
parent::indexNode($node, $targetWorkspaceName);
5559

@@ -108,7 +112,7 @@ protected function nodeAsArray(NodeInterface $node)
108112
[
109113
'persistenceObjectIdentifier' => $this->persistenceManager->getIdentifierByObject($node->getNodeData()),
110114
'identifier' => $node->getIdentifier(),
111-
'dimensions' => $node->getDimensions(),
115+
'dimensions' => $node->getContext()->getDimensions(),
112116
'workspace' => $node->getWorkspace()->getName(),
113117
'nodeType' => $node->getNodeType()->getName(),
114118
'path' => $node->getPath()

0 commit comments

Comments
 (0)