You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @a-t-k, I believe this is by design - it would be an expensive operation for Umbraco to find and remove all references to the deleted node, as it would require updating properties, caches and so on. This would be compounded if the deleted node had children/descendants.
However, IMO it's not really an issue, please see my repro steps:
I create a child node, then link to it from a MNTP in the parent node, then delete the child.
When I reload the parent, I see the below, which makes it obvious to editors that the referenced node needs to be removed:
If I then empty the recycle bin and reload the parent, the MNTP property does still have the UDI of the deleted item in the data, but it's not displayed
saving the document removes the reference to the deleted node as the property editor has updated the value when it was unable to retrieve the linked entity.
From what I can see, ModelsBuilder manages this fine on the frontend - the deleted node isn't in the property data when I render the page, I'm assuming the property value converter is ignoring unpublished/trashed entities.
Indeed this is very much by design to make sure that deleting an item doesn't cause a big cascade of having to look through potentially 1000s of nodes, reading and/or deserializing (1000s * each property) on each node to check for orphans and then potentially having to write and republish (1000s * each property).
As mentioned all property editors should gracefully be handling missing references. If they don't then we can look into that.
As for your frontend, this requires a bit of defensive coding, so you should always expect that a UDI does not exist any more while writing code for your templates.
Hope this provides some clarity and I'll close the issue as "by design".
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
8.15.2
Bug summary
Create child item
Create parent Item with "Multinode Treepicker"
On parent Item add child item in "Multinode Treepicker"
When
1 - Delete child Item (it is now "recycle bin" and has flag "recycled")
2 - Empty recycle bin, so item is deleted
Then
Parent item has in "Multinode Treepicker" entry for deleted child item "umb://document/5b51c940579c4231b3e662eb2b3d3f6f"
Specifics
Create child item
Create parent Item with "Multinode Treepicker"
On parent Item add child item in "Multinode Treepicker"
When
1 - Delete child Item (it is now "recycle bin" and has flag "recycled")
2 - Empty recycle bin, so item is deleted
Then
Parent item has in "Multinode Treepicker" entry for deleted child item "umb://document/5b51c940579c4231b3e662eb2b3d3f6f"
Steps to reproduce
Create child item
Create parent Item with "Multinode Treepicker"
On parent Item add child item in "Multinode Treepicker"
When
1 - Delete child Item (it is now "recycle bin" and has flag "recycled")
2 - Empty recycle bin, so item is deleted
Then
Parent item has in "Multinode Treepicker" entry for deleted child item "umb://document/5b51c940579c4231b3e662eb2b3d3f6f"
Expected result / actual result
The entry "umb://document/5b51c940579c4231b3e662eb2b3d3f6f" is deleted too.
The text was updated successfully, but these errors were encountered: