Project

General

Profile

Actions

Bug #76446

closed

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

Added by Axel Böswetter over 8 years ago. Updated over 8 years ago.

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

0%

Estimated time:
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.


Files

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

Updated by Axel Böswetter over 8 years ago

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

Actions #2

Updated by Stephan Großberndt over 8 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.

Actions #3

Updated by Axel Böswetter over 8 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.

Actions #4

Updated by Stephan Großberndt over 8 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF