-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: CopyNodesRecursively vs Content Dimensions #5054
Comments
To elaborate on this: Given the following variation and content graph: When we copy Node "mc-nodeface" in origin DSP {"language": "ltz"} to a new parent "nodington-iii" in the same DSP, the following happens: The first weird thing is, that "nodimus-copied" is now varied to ltz, where its original did only exist as a virtual variant. That's acceptable though imho. What troubles me more is what happens if I decide to not only copy the node, but all its variants (which kind of makes sense, even by default). Since I cannot define a DSP set which to copy, I have to do this by hand with a second command: By default, the nodes again get new - and thus differing - aggregateIds, although they were copied from the same original. We copied one node aggregate into two and there is no way to remediate this (except, of course, with vary, copy&paste content, delete). And if we tried again with the same NodeAggregateId mapping, node creation would fail due to the aggregates already existing. What could we do instead? Questions so far? |
Some of the desired 8.3 behaviour is actually documented in this commit: 02a8a18 ($detachedCopy is set if
Behaviour seemed to be depending on document vs content |
As decided in todays weekly, we plan to:
|
see neos/neos-development-collection#5054 (comment) Previously the `$targetDimensionSpacePoint` was also wrongly chosen, and it was attempted to paste the node into the subjects home dimension
with #5403 we might actually be able to reimplement the old 8.3, which i attempted but failed very fast because: Details
@contentrepository @adapters=DoctrineDBAL
@flowEntities
Feature: Create node aggregate with node with dimensions
Background:
Given using the following content dimensions:
| Identifier | Values | Generalizations |
| language | de,gsw,fr | gsw->de, fr |
And using the following node types:
"""yaml
'Neos.ContentRepository.Testing:Document': {}
'Neos.ContentRepository.Testing:Content':
properties:
text:
type: string
"""
And using identifier "default", I define a content repository
And I am in content repository "default"
And the command CreateRootWorkspace is executed with payload:
| Key | Value |
| workspaceName | "live" |
| workspaceTitle | "Live" |
| workspaceDescription | "The live workspace" |
| newContentStreamId | "cs-identifier" |
And I am in workspace "live"
And I am in dimension space point {"language": "de"}
And the command CreateRootNodeAggregateWithNode is executed with payload:
| Key | Value |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.ContentRepository:Root" |
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues |
| sir-david-nodenborough | lady-eleonode-rootford | Neos.ContentRepository.Testing:Document | {} |
| nody-mc-nodeface | sir-david-nodenborough | Neos.ContentRepository.Testing:Content | {"text": "german"} |
Then I am in dimension space point {"language": "fr"}
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName |
| sir-nodeward-nodington-iii | lady-eleonode-rootford | Neos.ContentRepository.Testing:Document |
Scenario: Paste variant into other spezialisation
And the command CreateNodeVariant is executed with payload:
| Key | Value |
| nodeAggregateId | "sir-david-nodenborough" |
| sourceOrigin | {"language":"de"} |
| targetOrigin | {"language":"fr"} |
When insert variant is executed with payload:
| Key | Value |
| sourceDimensionSpacePoint | {"language": "de"} |
| sourceNodeAggregateId | "nody-mc-nodeface" |
| targetDimensionSpacePoint | {"language": "fr"} |
| targetParentNodeAggregateId | "sir-david-nodenborough" |
And I expect the node aggregate "nody-mc-nodeface" to exist
And I expect this node aggregate to be classified as "regular"
And I expect this node aggregate to be unnamed
And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:Content"
And I expect this node aggregate to occupy dimension space points [{"language": "de"}, {"language": "fr"}]
And I expect this node aggregate to disable dimension space points []
And I expect this node aggregate to have no child node aggregates
And I expect this node aggregate to have the parent node aggregates ["sir-david-nodenborough"]
And I am in dimension space point {"language": "de"}
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{"language": "de"}
And I expect this node to have the following properties:
| Key | Value |
| text | "german" |
And I am in dimension space point {"language": "fr"}
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{"language": "fr"}
And I expect this node to have the following properties:
| Key | Value |
| text | "german" |
Scenario: Paste variant into other root dimension
When insert variant is executed with payload:
| Key | Value |
| sourceDimensionSpacePoint | {"language": "de"} |
| sourceNodeAggregateId | "nody-mc-nodeface" |
| targetDimensionSpacePoint | {"language": "fr"} |
| targetParentNodeAggregateId | "sir-nodeward-nodington-iii" |
And I expect the node aggregate "nody-mc-nodeface" to exist
And I expect this node aggregate to be classified as "regular"
And I expect this node aggregate to be unnamed
And I expect this node aggregate to be of type "Neos.ContentRepository.Testing:Content"
And I expect this node aggregate to occupy dimension space points [{"language": "de"}, {"language": "fr"}]
And I expect this node aggregate to disable dimension space points []
And I expect this node aggregate to have no child node aggregates
And I expect this node aggregate to have the parent node aggregates ["sir-nodeward-nodington", "sir-nodeward-nodington-iii"]
And I am in dimension space point {"language": "de"}
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{"language": "de"}
And I expect this node to have the following properties:
| Key | Value |
| text | "german" |
And I am in dimension space point {"language": "fr"}
Then I expect node aggregate identifier "nody-mc-nodeface" to lead to node cs-identifier;nody-mc-nodeface;{"language": "fr"}
And I expect this node to have the following properties:
| Key | Value |
| text | "german" |
# todo
# test recursive behaviour
# fail if variant exist
# test generalisation vs spezi |
Is there an existing issue for this?
Current Behavior
When we copy a node, it is not possible to copy a variant of said node to the same location without losing the connection
Expected Behavior
We need to find a way to make interdimensional node copy possible, similar to MoveNode
Steps To Reproduce
Create a node
Vary that node to a different DSP
Copy the node in the source DSP
Copy the node in the varied DSP
See how the aggregateIds differ and the copied variants are detached
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: