Issue Bug Closed

#40656t3lib_TCEforms_inline->createNewRecord doesn't create localized records

Viktor Livakivskyi 09/05/12, 18:12 updated 10/23/17, 21:48

Description

Hi.

Today we’ve found an issue in createNewRecord method of t3lib_TCEforms_inline class.
Line 1106 contains such a condition:
if ($config[‘localizationMode’] == ‘select’)
But TCA specification (http://typo3.org/documentation/document-library/core-documentation/doc_core_tca/4.7.1/view/1/3/#id590095) says, that localizationMode is part of ‘behaviour’ config setting, so, when someone tries to create a new ‘inline’ record inside of localized parent record, ‘inline’ record get olways created with sys_language_uid=0, because condition above will never be TRUE.
Current hack is to make specification in such a way:

'field_name' => array (
    'label' => 'field',
    'config' => array (
        'type' => 'inline',
        'foreign_table' => 'tx_inline_records',
        'foreign_field' => 'parent_id',
        'behaviour' => array(
            'localizationMode' => 'select'
        ),
        'localizationMode' => 'select',
    )
),

localizationMode must be set two times: on root of ‘config’ and inside of ‘behaviour’.

Fix:
Line 1106:
if ($config[‘behaviour’][‘localizationMode’] == ‘select’)

TYPO3 4.7.4

Reviews 0

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