Project

General

Profile

Actions

Bug #80068

closed

Type value (?) from database record not defined in TCA of table

Added by Christoph Dörfel over 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-03-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

DatabaseRecordTypeValue->addData() throws an exception if $recordTypeValue could not be found.

This happens for records that are not in the default language with no l10n_parent (i.e. l10n_parent = 0), have a TCA field configuration with multiple types but no default type "0" and a TCA field configuration with "l10n_mode = exclude" set.

DatabaseRecordTypeValue->getValueFromDefaultLanguageRecordIfConfigured() returns null since $result['defaultLanguageRow'] is null and there's no null check in place.

Sample TCA:

'tx_extbase_type' => [
    'exclude' => 1,
    'l10n_mode' => 'exclude',
    'label' => 'Extbase type',
    'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'items' => [
            ['Type A, 'Tx_Extension_Domain_Model_A'],
            ['Type B', 'Tx_Extension_Domain_Model_B']
        ],
        'size' => 1,
        'maxitems' => 1,
        'default' => 'Tx_Extension_Domain_Model_A'
    ]
]

Actions

Also available in: Atom PDF