Bug #76446

IRRE: Deleting the parent record leaves orphan child records referenced by MM table

Added by Axel Böswetter about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2016-06-03
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

As the subject mentions, if you delete a parent record containing IRRE child records, which are referenced by a MM table, the child records won't get deleted.

This bug is present in 6.2 LTS and 7.6 LTS. I didn't check v8.

I'll attach a patch and I think it's really a no-brainer and should be easy to migrate.

bug_76446.diff View (912 Bytes) Axel Böswetter, 2016-06-03 14:00

History

#1 Updated by Axel Böswetter about 2 years ago

Patch added for \TYPO3\CMS\Core\DataHandling\DataHandler->deleteRecord_procBasedOnFieldType()

#2 Updated by Stephan Großberndt about 2 years ago

I don't think this is a no-brainer. It's not a bug but a change in behaviour and in many places this will not be the wanted behaviour.

In MM-Relations there may be multiple relations between several objects:

A-X
B-X

Just because you want to delete A this does not have to mean X must be deleted too, B would lose its relation too.

#3 Updated by Axel Böswetter about 2 years ago

Yeah, you're absolutely right. Sorry, I just took our scenario into consideration, which simply is a "cleaner" 1:n by using a MM table. The ticket should be closed then.

#4 Updated by Stephan Großberndt about 2 years ago

  • Status changed from New to Closed

Also available in: Atom PDF