Bug #77435

Story #69617: FormEngine bugs

IRRE throws exception if related record is deleted

Added by Markus Klein about 3 years ago. Updated almost 3 years ago.

Status:
Accepted
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Start date:
2016-08-08
Due date:
% Done:

0%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Stabilization Sprint

Description

It is not possible to edit a record, which holds IRRE relations to deleted records.

DB-structure is an old one with comma-separated uids in parent record.
Example: ke_search filter, which holds references to filter options.

Deleting a referenced filter option leads to the filter itself not being editable anymore.
DatabaseRecordException with code #1437656081 "Record with uid ... not found"

History

#1 Updated by Christian Kuhn about 3 years ago

  • Parent task set to #69617

#2 Updated by Markus Klein about 3 years ago

  • Description updated (diff)

#3 Updated by Georg Ringer about 3 years ago

The problem can be found here:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInline.php#L322-L326


        // For foreign_selector with useCombination $mainChild is the mm record
        // and $combinationChild is the child-child. For 1:n "normal" relations,
        // $mainChild is just the normal child record and $combinationChild is empty.
        $mainChild = $formDataCompiler->compile($formDataCompilerInput);
        if ($parentConfig['foreign_selector'] && $parentConfig['appearance']['useCombination']) {
            try {
                $mainChild['combinationChild'] = $this->compileChildChild($mainChild, $parentConfig);
            } catch (DatabaseRecordException $e) {

The first call to compile() must be caught as well. However generating a flash message there is not the full solution because this will then generate errors in \TYPO3\CMS\Backend\Form\Container\InlineRecordContainer::renderForeignRecordHeader as the required array information is not available.

#4 Updated by Daniel Goerz almost 3 years ago

  • Sprint Focus set to Stabilization Sprint

Also available in: Atom PDF