#76138Inline Relations - Delete Behaviour with mixed Usage of the Deleted Flag
Description
I am using TYPO3 6.2 (latest from git) but I guess this issue persists also in later versions.
Having a parent record which uses no deleted flag in the database (TCA ctrl > delete not set) results in actually deleting database entries on deletion in the backend.
If this parent record has an inline relation to a record which does use the deleted flag, it results in an odd behaviour on deletion of the parent record: The child records do not get deleted in the database and neither get the deleted flag set.
Apart from having dead entries (which are not marked as deleted) in the database this results in another problem when using translations. Consider the following scenario:
1.) Create a parent record.
2.) Create a child record as inline relation for the parent.
3.) Localise the parent record. The child record gets localised along with it automatically (in my example TCA, otherwise you can do it manually).
4.) Delete the translated parent record. Now the translated child records still exist (undeleted) in the database.
5.) Localise the parent record again. The localisation of the child record (no matter if automatically or manually) will fail because there is a localisation already in the database.
I will attach a little example extension with which you can reproduce the scenario. It uses FAL references for the inline relation.
About the desired behaviour:
At least the deleted flag should be set in the child records upon deletion of the parent record.
But since the parent record does not exist anymore, it could also make sense to ignore the deleted flag of the child record and also remove it completely from the database. It just has no reference anymore.
The problem seems to lie within TYPO3\CMS\Core\DataHandling\DataHandler::deleteRecord() but I am not sure how to approach this issue best.
Reviews 3
Related issues 2
Files 1
History 1116
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2016-05-11T11:03:52+00:00" > 05/11/16, 11:03 </span>
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2016-05-11T11:04:39+00:00" > 05/11/16, 11:04 </span>
tx_styleguide_inline_parentnosoftdelete
-
Markus Klein changed category status
NewAccepted target version Complexity medium Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2016-05-11T11:48:57+00:00" > 05/11/16, 11:48 </span> -
Anja Leichsenring commented <span data-processor="relativetime" data-value="2016-05-11T18:05:56+00:00" > 05/11/16, 18:05 </span>
the PR has been accepted to ext:styleguide, and the version requirement has been raised for the core. So the test bed is now available in current core. Table is tx_styleguide_inline_parentnosoftdelete.
-
Gerrit Code Review pushed patch set 1 for master to change 48101 status
AcceptedUnder Review <span data-processor="relativetime" data-value="2016-05-12T14:48:59+00:00" > 05/12/16, 14:48 </span> -
Gerrit Code Review pushed patch set 2 for master to change 48101 <span data-processor="relativetime" data-value="2016-05-12T16:40:19+00:00" > 05/12/16, 16:40 </span>
-
Christian Kuhn changed Sprint Focus
On Location Sprint<span data-processor="relativetime" data-value="2016-06-07T12:06:24+00:00" > 06/07/16, 12:06 </span> -
Gerrit Code Review pushed patch set 3 for master to change 48101 <span data-processor="relativetime" data-value="2018-05-04T15:13:49+00:00" > 05/04/18, 15:13 </span>
-
Benni Mack changed status
Under ReviewNew <span data-processor="relativetime" data-value="2018-11-14T06:26:00+00:00" > 11/14/18, 06:26 </span> -
Markus Klein changed Related to #79014 <span data-processor="relativetime" data-value="2019-08-01T22:13:23+00:00" > 08/01/19, 22:13 </span>
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2025-06-03T15:57:20+00:00" > 06/03/25, 15:57 </span>
rechecked: this is partially solved with #79014 and some remaining details are fixed with #106815
-
Christian Kuhn changed Related to #106815 <span data-processor="relativetime" data-value="2025-06-03T15:57:31+00:00" > 06/03/25, 15:57 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 89614 status
NewUnder Review <span data-processor="relativetime" data-value="2025-06-03T15:58:08+00:00" > 06/03/25, 15:58 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 89617 <span data-processor="relativetime" data-value="2025-06-03T18:13:43+00:00" > 06/03/25, 18:13 </span>
-
Christian Kuhn commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-06-03T18:25:07+00:00" > 06/03/25, 18:25 </span>Applied in changeset commit:32ba2eac0c08775ae81426e1e9208064f5c7497d.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-08-12T14:35:30+00:00" > 08/12/25, 14:35 </span>
First: Thanks for a very good issue explanation and for the test extension!
I’ll in the currently ongoing sprint in cluj if anyone could transfer your test extension as test bed to ext:styleguide – this is our main tca test extension for such cases.