Project

General

Profile

Actions

Bug #71245

open

Undelete does not restore inline records

Added by Alexander Jahn over 8 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Must have
Category:
DataHandler aka TCEmain
Target version:
Start date:
2015-11-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

When a record is deleted all inline records are deleted as well.
However, when restoring the original record, none of these elements are restored.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #69334: Rollback on content element doesn't restore deleted File ReferenceClosed2015-08-26

Actions
Actions #1

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44478

Actions #2

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44478

Actions #3

Updated by Markus Sommer over 8 years ago

  • Assignee set to Alexander Jahn
Actions #4

Updated by Susanne Moog almost 7 years ago

  • Complexity changed from no-brainer to hard
Actions #5

Updated by Mathias Schreiber about 6 years ago

  • Related to Bug #69334: Rollback on content element doesn't restore deleted File Reference added
Actions #6

Updated by Coders.Care Extension Team almost 6 years 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:

  1. If there is no deleted record having that particular UID, no child record gets undeleted together with the parent record.
  2. 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.

Actions #7

Updated by Christian Kuhn over 5 years ago

  • Status changed from Under Review to New

setting this issue back to new since the according patch stalled in the review system and nothing happened for a long time.

Actions #8

Updated by Michael Stopp almost 3 years ago

So we're on 10 LTS (with 11 on the horizon) and this problem still persists. If cascading delete is (sensibly) the default for inline records, a rollback function MUST include child records as well. If not, it's broken and should be fixed, since there is no decent way to recover these records without a lot of manual labor (eg. if a user has deleted the contents of a whole folder, where every record has multiple child records - a problem I just faced this morning...).

Actions

Also available in: Atom PDF