Describe the bug
When I clone a document via the CMS UI. The document gets a new ID (and a new version ID) but not the embedded elements, which are included via a bag content part.
To Reproduce
Steps to reproduce the behaviour:
- Create content-type: Bar
- On Add Parts To "Bar", add: Title
- Create a second content-type: Foo
- On Add Parts To "Foo", add: Bag, Title
- Edit that content-type "Foo": Edit Bag and select the "Bar" content-type at "Contained Content Types"
- Create a new content item from content-type: Foo, with a title and at least one Bar item
- Using the graphQL query below to query the just created a content item from content-type: Foo
- Clone the content just created a content item from content-type: Foo
- Using the same query to query both items
Expected behaviour
I was expecting that a clone content item has new ids for all embedded elements.
GraphQL query
query fooQuery {
foo {
contentType
contentItemId
contentItemVersionId
displayText
bag {
contentItems {
contentItemId
contentType
displayText
}
}
}
}
Query result from the first created content item
{
"data": {
"foo": [
{
"contentType": "Foo",
"contentItemId": "4afm7w6fcdddvv4jnh7bym6y5f",
"contentItemVersionId": "4cezhk796c95avxmecs6yrcfm6",
"displayText": "Test 1",
"bag": {
"contentItems": [
{
"contentItemId": "4v1zxrewd0k0cwqf2kxvx8mvma",
"contentType": "Bar",
"displayText": "Bar 1"
}
]
}
}
]
}
}
Query result with the clone content item
{
"data": {
"foo": [
{
"contentType": "Foo",
"contentItemId": "47yyt8a4fsjv63w492tt1er5da",
"contentItemVersionId": "4jn8r5wxypwte50m6g5qygtcnr",
"displayText": "Test 1 Clone",
"bag": {
"contentItems": [
{
"contentItemId": "4v1zxrewd0k0cwqf2kxvx8mvma",
"contentType": "Bar",
"displayText": "Bar 1"
}
]
}
},
{
"contentType": "Foo",
"contentItemId": "4afm7w6fcdddvv4jnh7bym6y5f",
"contentItemVersionId": "4cezhk796c95avxmecs6yrcfm6",
"displayText": "Test 1",
"bag": {
"contentItems": [
{
"contentItemId": "4v1zxrewd0k0cwqf2kxvx8mvma", <-- same ID
"contentType": "Bar",
"displayText": "Bar 1"
}
]
}
}
]
}
}
Describe the bug
When I clone a document via the CMS UI. The document gets a new ID (and a new version ID) but not the embedded elements, which are included via a bag content part.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
I was expecting that a clone content item has new ids for all embedded elements.
GraphQL query
Query result from the first created content item
Query result with the clone content item