Issue Bug Closed

#82121Deleting inline 1:1 relation throws error

Tymoteusz Motylewski 08/17/17, 13:12 updated 07/08/24, 17:54

Description

1) Given a 1:1 inline relation like https://github.com/TYPO3/styleguide/pull/102

  'inline_1' => [
      'exclude' => 1,
      'label' => 'inline_1',
      'config' => [
         'type' => 'inline',
         'foreign_table' => 'tx_styleguide_inline_1_1_child',
          'behaviour' => [
               'localizeChildrenAtParentLocalization' => true,
           ],
           'appearance' => [
               'showSynchronizationLink' => true,
               'showAllLocalizationLink' => true,
               'showPossibleLocalizationRecords' => true,
           ],
           'maxitems' => 1,
       ],
    ],

2) add a child relation
3) save the record
4) delete the relation
5) save the parent record
6) an error is thrown:

Uncaught TYPO3 Exception
#1437656081: Record with uid 2 from table tx_styleguide_inline_1_1_child not found (More information)

TYPO3\CMS\Backend\Form\Exception\DatabaseRecordException thrown in file
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractDatabaseRecordProvider.php in line 51.

21 TYPO3\CMS\Backend\Form\FormDataProvider\AbstractDatabaseRecordProvider::getRecordFromDatabase("tx_styleguide_inline_1_1_child", 2)

typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseEditRow.php:
00036:         }
00037: 
00038:         $databaseRow = $this->getRecordFromDatabase($result['tableName'], $result['vanillaUid']);
00039:         if (!array_key_exists('pid', $databaseRow)) {
00040:             throw new \UnexpectedValueException(

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Oliver Hader changed category 11/29/17, 21:54

  2. Georg Ringer commented and changed status New Closed 07/08/24, 17:47

    hey Tymoteusz,

    I couldn’t reproduce that in v13 and tx_styleguide_inline_11, therefore closing the issue. I guess at least fixed also in v12

  3. Tymoteusz Motylewski commented 07/08/24, 17:54

    thanks for rechecking!