Bug #40656

t3lib_TCEforms_inline->createNewRecord doesn't create localized records

Added by Viktor Livakivskyi almost 7 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2012-09-05
Due date:
% Done:

0%

TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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 TYPO3 Core - Bug #21964: New child records created from a translated record have default language Closed 2010-01-15
Related to TYPO3 Core - Bug #57272: Extbase doesn't handle FAL translations correctly Closed 2014-03-25
Related to TYPO3 Core - Bug #57063: Parent language is not applied to new child records Closed 2014-03-19

History

#1 Updated by Mathias Brodala over 5 years 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 5 years ago

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

Resolved with fix #57063

#3 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF