"SimpleSearch ContentRepositoryAdaptor" workspace issue with "NodeReplicator"

Hi there,

I’m stucking on an error between two packages on creating a new node (with NodeReplicator) and the nodes indexing.
I’m using the Flowpack / Flowpack.SimpleSearch.ContentRepositoryAdaptor-Package, because a certain hoster provides no ElasticSearch in some Packages. Works fine until now.

Since I installed yesterday the punktDe / nodereplicator-Package.

Both packages for itself are working very well on updating, moving, deleting some nodes. But together there is thrown an error on creating a new node, because there is a workspace-name issue (the property is not set) in:

Function "indexNode" in line 141:
$properties['__workspace'] .= ', #' . ($targetWorkspaceName ?? $node->getContext()->getWorkspaceName()) . '#';

I’m debugging the NodeReplicator (everything looks fine; workspaces are set to the new nodes) and the SimpleSearch_ContentRepositoryAdapter in the part, where the error is thrown. And here I can say, that the problem on new created nodes is, that “$this->indexedNodeData” is filled with two node identifiers, but from the function “findOneByIdentifier” nothing comes back.

If I skip (comment out) the whole if-Part (from line 138 until 149) everything works fine on the first look. The nodes also indexed (search in FE works). Everything seems to works however so far. But I assume without that part some issues will occur over time on updating some nodes.

Bug or misconfiguration?

The last lines from the error log:

Exception #1 in line 141 of /var/www/public/neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Flowpack_SimpleSearch_ContentRepositoryAdaptor_Indexer_NodeIndexer.php: Notice: Undefined index: __workspace in /var/www/public/neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Flowpack_SimpleSearch_ContentRepositoryAdaptor_Indexer_NodeIndexer.php line 141

51 Neos\Flow\Error\ErrorHandler::handleError(8, "Undefined index: __workspace", "/var/www/public/neos/Data/Temporary/Development/Ca…h_ContentRepositoryAdaptor_Indexer_NodeIndexer.php", 141, array|6|)
50 Flowpack\SimpleSearch\ContentRepositoryAdaptor\Indexer\NodeIndexer_Original::indexNode(Neos\ContentRepository\Domain\Model\Node, NULL, false)
49 Flowpack\SimpleSearch\ContentRepositoryAdaptor\Indexer\NodeIndexer_Original::Flowpack\SimpleSearch\ContentRepositoryAdaptor\Indexer\{closure}()
48 Closure::__invoke()
47 Neos\Flow\Security\Context_Original::withoutAuthorizationChecks(Closure)
46 Flowpack\SimpleSearch\ContentRepositoryAdaptor\Indexer\NodeIndexer_Original::indexNodeInWorkspace("85b972cb-f0f5-44c2-8363-c3b7f281af63", "user-max")


I looked into it today and can’t still solve it. Maybe it’s a bug, maybe a weird local issue. I can’t say it exactly.

If I’m using Sqlite I can see, that the connection is created. But in the NodeIndexer-Class - before line 141 (see above) - the findByIdentifier function does not return anything. So it crashes anytime at this point on creating a new node. But only if I’m using the NodeReplicator, thats important to say. The SimpleSearch for itself works fine.

I decided to switch to ElasticSearch. Works fine together with NodeReplicator.

I’ll have a look at simple search but sounds like a really weird interaction happening between the two packages.