Closed herflis closed 3 years ago
Frontend related issue is fixed by https://github.com/SenseNet/sn-client/pull/840 But I think something also wrong on backend. When deleting one or all of the allowed childtypes coming from the CTD, it gives strange results.
When adding the first new type (Image) to the list (step 4) tha PATCH request body is the following, which is correct:
{ "AllowedChildTypes": ["Folder", "File", "SystemFolder", "Image"]}
Subsequent payloads look very different: the field value contains objects instead of type names. The backend cannot parse this request.
"AllowedChildTypes": [
{"Id": 1252, "ParentId": 1249, "VersionId": 265, "Type": "ContentType", "TypeIs": "ContentType", "Name": "Folder",…}
{"Id": 1277, "ParentId": 1249, "VersionId": 290, "Type": "ContentType", "TypeIs": "ContentType", "Name": "File",…}
{"Id": 1305, "ParentId": 1252, "VersionId": 318, "Type": "ContentType", "TypeIs": "ContentType",…}
]
🐜 Bug Report
Manually added content types cannot be removed from the allowed childtype field.
📦 Package / Application
@sensenet/sn-app @sensenet/controls-react
📃 Version
latest
🐜 Describe the bug
After removing a content type from the allowed childtypes field on the ui, the content seems to be successfully deleted, but if you go back to the edit form again, you can see that the type remained in the allowed childtypes list.
👉 Steps To Reproduce
😯 Current behavior
The previously deleted allowed childtype it's still there in the allowed childtypes list.
🤔 Expected behavior
The deleted items should be completely removed from the list
🖼 Screenshots