Actions
Bug #101962
openNew records created on a field of type INLINE have the wrong sys_language_uid value
Status:
New
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2024-03-14
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
When adding a field of type "inline" to a pi_flexform structure, a new created inline relation record does not have the language value of the parent record. When using the same config on a regular TCA field the new record will have the correct sys_language_uid (synced with the parent).
This is a variation (only names and labels changed) of the flexform:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Settings</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<records>
<TCEforms>
<label>Records</label>
<config>
<type>inline</type>
<foreign_table>tx_some_record</foreign_table>
<foreign_field>parent_uid</foreign_field>
<foreign_table_field>parent_table</foreign_table_field>
<foreign_match_fields>
<role>some_role</role>
</foreign_match_fields>
<foreign_sortby>sorting</foreign_sortby>
<maxitems>3</maxitems>
<appearance>
<collapseAll>0</collapseAll>
<newRecordLinkTitle>Add new record</newRecordLinkTitle>
<useSortable>1</useSortable>
</appearance>
<behaviour>
<enableCascadingDelete>1</enableCascadingDelete>
</behaviour>
<overrideChildTca>
<columns>
<some_field>
<config>
<default>1</default>
</config>
</some_field>
</columns>
</overrideChildTca>
</config>
</TCEforms>
</records>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
This is the relevant part of the TCA for tx_some_record
<?php
return [
'ctrl' => [
'label' => 'text',
'title' => 'Some record',
'type' => 'type',
'typeicon_classes' => [
'default' => 'tx-some-record',
],
'rootLevel' => 0,
'hideTable' => true,
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'hidden',
],
'sortby' => 'sorting',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
'languageField' => 'sys_language_uid',
'translationSource' => 'l10n_source',
],
'interface' => [
'maxDBListItems' => 30,
'maxSingleDBListItems' => 50,
],
'columns' => [
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'language',
],
],
'l18n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
[
'',
0
]
],
'foreign_table' => 'tx_some_record',
'foreign_table_where' => 'AND tx_some_record.pid=###CURRENT_PID### AND tx_some_record.sys_language_uid IN (-1,0)',
'default' => 0
],
],
'l10n_source' => [
'config' => [
'type' => 'passthrough'
],
],
'l18n_diffsource' => [
'config' => [
'type' => 'passthrough',
'default' => ''
],
],
'type' => [
'config' => [
'type' => 'user',
'renderType' => 'hidden',
'default' => '0',
],
],
// other fields
],
'types' => [
// ...
],
'palettes' => [
// ...
],
];
Files
Actions