Skip to content

Commit cc2fe14

Browse files
committed
Merge pull request #25 from SimplyAdmire/master
[BUGFIX] When creating a new Document Type ES crashed
2 parents ba6f238 + 45e24c9 commit cc2fe14

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ protected function flushQueuesIfNeeded() {
114114
public function flushQueues() {
115115
/** @var \TYPO3\TYPO3CR\Domain\Model\NodeInterface $nodeToBeIndexed */
116116
foreach ($this->nodesToBeIndexed as $nodeToBeIndexed) {
117-
$this->nodeIndexer->indexNode($nodeToBeIndexed, $this->targetWorkspaceNamesForNodesToBeIndexed[$nodeToBeIndexed->getContextPath()]);
117+
if (!isset($this->targetWorkspaceNamesForNodesToBeIndexed[$nodeToBeIndexed->getContextPath()])) {
118+
// No target workspace for indexing found
119+
continue;
120+
}
121+
$this->nodeIndexer->indexNode($nodeToBeIndexed, $this->targetWorkspaceNamesForNodesToBeIndexed[$nodeToBeIndexed->getWorkspace()->getName()]);
118122
}
119123

120124
foreach ($this->nodesToBeRemoved as $nodeToBeRemoved) {

0 commit comments

Comments
 (0)