BUGFIX: Snyc nodes on shutdown #66
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you move document nodes in sync mode, it leads to an error because it tries to move the content elements first. If you try to move
document-2
intodocument-1
this leads to an error likeNode path /sites/site/document-2/content does not start with /sites/site/document-1/document-2
.Another example from my test when moving a document node into another document node:
Given path "/sites/neosdemo/features/other-elements" is not the beginning of "/sites/neosdemo/features/forms/other-elements/main/node53a18f52e9726", cannot get a relative path between them.
This PR solves the problem by collecting all nodes to be synced/translated and executing all of that on shutdown in an optimized order.
Because removed nodes are not available anymore at this stage, removed nodes must be stored as objects and not just as identifiers.