Where will Sitecore restore an item from the recycle bin whose Original Location is
If you restore an item from the recycle bin that has one or more ancestor items that have been deleted, Sitecore will recreate the ancestor items as well, but they will be items without a version.
For example, let's say we have a content tree like this one with three nested items (
I delete the
Sub-Child item first, and then the
Parent item. The two items will be listed in the Recycled Bin as follow:
Now I restore the
Sub-Child item only. The content tree will have the same initial nested structure, but the created
Parent item and the
Child item will not have a version:
Answer to the follow up question "What happens if there is no path and it only says [orphan]/Sub-Child?":
I am not sure how you got an archived item with the path
[Orphan]/Item Name in the Recycle Bin.
The path of the recycled items is stored in the
OriginalLocation field of the records in the
Archive table of the master database. I manually changed the path of one of my recycled items to be '[Orphan]/Item Name` to mimic your scenario.
When I tried to restore it, I got an error message saying that the item could not be restored. So it seems that Sitecore prevents the restoring of an archived item that has an invalid path.
Error in the logs:
ERROR Restore: failed to restore: archiveId 2471b9c5-1241-4043-a450-96110e5b44c5, error: Empty strings are not allowed. Parameter name: path