Bug #40656

t3lib_TCEforms_inline->createNewRecord doesn't create localized records

Added by Viktor Livakivskyi almost 3 years ago. Updated about 1 year ago.

Status:Resolved Start date:2012-09-05
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:FormEngine aka TCEforms Spent time: -
Target version:6.2.0
TYPO3 Version:4.7 Is Regression:No
PHP Version: Sprint Focus:
Complexity:

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


Related issues

related to Core - Bug #57063: Parent language is not applied to new child records Resolved 2014-03-19
related to Core - Bug #21964: New child records created from a translated record have d... Closed 2010-01-15
related to Core - Bug #57272: Extbase doesn't handle FAL translations correctly Under Review 2014-03-25

History

#1 Updated by Mathias Brodala over 1 year ago

  • Target version set to 6.2.0

This bug is still present in the upcoming 6.2 LTS. (Checked EXT:backend/Classes/Form/Element/InlineElement.php)

#2 Updated by Helmut Hummel about 1 year ago

  • Status changed from New to Resolved
  • Is Regression set to No

Resolved with fix #57063

Also available in: Atom PDF