#69334Rollback on content element doesn't restore deleted File Reference
Description
Deleting an image inside of a content element and then using the History / Undo function on the content element to restore the image doesn’t bring back the deleted file reference. Instead it takes a completely different record from the sys_file_reference table that wasn’t deleted and points the uid_foreign field to the content element, practically stealing the file reference from another content element.
Steps to reproduce the issue:- create new “Images” element
- add a picture to it and save
- delete the picture and save
- use History / Undo on the “Images” element and undo the last step
- the element will now have a completely different image to before while the deleted file reference is still deleted
Undeleting the file reference by doing History / Undo on the page the content element and file reference are on works correctly and you can bring back the deleted image that way but I think that’s a very unintuitive for most users.