Undelete does not restore inline records
When a record is deleted all inline records are deleted as well.
However, when restoring the original record, none of these elements are restored.
#6 Updated by Coders.Care Extension Team over 1 year ago
Just for the record and taken from the review tracker comments of the duplicate issue which is now abandoned:
The actual problem for the missing rollbacks is, that there are two kinds of integer values involved, which are mistaken during the process.
The "children" field of the parent record contains an integer, representing the number of child elements attached to this parent.
During the rollack process this number is treated as a UID of a record of the table connected to this field, which leads to two different unwanted behaviours:
- If there is no deleted record having that particular UID, no child record gets undeleted together with the parent record.
- If there is a deleted record having the UID, it will get undeleted, even though it might not be a child of the undeleted parent.
While (1) is just a broken undelete action, which is already bad, (2) is even worse, since it might roll back records somewhere in the page tree, that should have stayed deleted by all means. Especially when these records contain legally relevant content, this might cause severe issues for the owner of the website. Still the editor would not even notice that the record magically returned.
This happens to Gridelements as well as to any other kind of parent/chlid combination, i.e. using sys_file_references and the like.