http://forge.typo3.org/
http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?1705866169
2016-07-22T16:17:47Z
TYPO3 Forge
TYPO3 Core - Bug #77221: IRRE: l10n_mode (=exclude) not evaluated for translated children
http://forge.typo3.org/issues/77221?journal_id=310277
2016-07-22T16:17:47Z
Mathias Schreiber
mathias.schreiber@typo3.com
<ul><li><strong>Category</strong> changed from <i>Backend User Interface</i> to <i>FormEngine aka TCEforms</i></li></ul>
TYPO3 Core - Bug #77221: IRRE: l10n_mode (=exclude) not evaluated for translated children
http://forge.typo3.org/issues/77221?journal_id=310471
2016-07-26T18:15:01Z
M. Stichweh
mstichweh@rle.de
<ul></ul><p>I have temporary fixed it with a Xclass of IconFactory:</p>
<pre>
class IconFactory extends \TYPO3\CMS\Core\Imaging\IconFactory
{
public function mapRecordTypeToIconIdentifier( $table, array $row )
{
if( isset( $GLOBALS['TCA'][$table]['ctrl']['typeicon_column'] ) &&
isset( $GLOBALS['TCA'][$table]['ctrl']['languageField'] ) &&
isset( $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] ) &&
$GLOBALS['TCA'][$table]['columns'][$GLOBALS['TCA'][$table]['ctrl']['typeicon_column']]['l10n_mode'] === 'exclude' &&
isset( $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] ) &&
isset( $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] ) )
{
$sysLanguageUid = $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']];
$sysLanguageUid = is_array( $sysLanguageUid )? (int)array_shift( $sysLanguageUid ) : (int)$sysLanguageUid;
if( $sysLanguageUid > 0 )
{
$parentUid = $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];
$parentUid = is_array( $parentUid )? (int)array_shift( $parentUid ) : (int)$parentUid;
if( $parentUid )
{
$column = $GLOBALS['TCA'][$table]['ctrl']['typeicon_column'];
if( $rowDefaultLang = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord( $table, $parentUid, $column ) )
{
$row[$column] = $rowDefaultLang[$column];
}
}
}
}
return parent::mapRecordTypeToIconIdentifier( $table, $row );
}
}
</pre>
TYPO3 Core - Bug #77221: IRRE: l10n_mode (=exclude) not evaluated for translated children
http://forge.typo3.org/issues/77221?journal_id=311066
2016-08-02T22:10:42Z
Markus Klein
markus.klein@typo3.org
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs Feedback</i></li></ul><p>I'm not sure where the exact bug really is. Actually the row passed into that function should be "ready" (meaning record overlays applied, etc).<br />Then the value of the typeicon_column should be correct and exclude-mode needs no extra handling anymore.</p>
<p>Can you elaborate how you use that function?</p>
TYPO3 Core - Bug #77221: IRRE: l10n_mode (=exclude) not evaluated for translated children
http://forge.typo3.org/issues/77221?journal_id=311804
2016-08-15T10:47:45Z
M. Stichweh
mstichweh@rle.de
<ul></ul><p>Markus Klein wrote:</p>
<blockquote>
<p>I'm not sure where the exact bug really is. Actually the row passed into that function should be "ready" (meaning record overlays applied, etc).<br />Then the value of the typeicon_column should be correct and exclude-mode needs no extra handling anymore.</p>
<p>Can you elaborate how you use that function?</p>
</blockquote>
<p>An example of a TCA configuration could be:</p>
<pre>
$GLOBALS['TCA']['tx_child'] = array(
'ctrl' => array(
'title' => 'Child',
'label' => 'typecolumn',
...,
'origUid' => 't3_origuid',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted',
'type' => 'typecolumn',
'typeicon_column' => 'typecolumn',
'typeicon_classes' => array(
'' => 'type-unknown',
'A' => 'type-a',
'B' => 'type-b',
'C' => 'type-c',
)
),
'columns' => array(
...,
'typecolumn' => array(
'exclude' => 0,
'l10n_mode' => 'exclude',
'l10n_display' => 'defaultAsReadonly',
'label' => 'Type',
'config' => array(
'type' => 'input',
'size' => 1,
'eval' => 'trim'
),
),
'parent' => array(
'config' => array(
'type' => 'passthrough',
)
)
)
);
$GLOBALS['TCA']['tx_parent'] = array(
'ctrl' => array(
'title' => 'Parent',
'label' => 'title',
...,
'origUid' => 't3_origuid',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted'
),
'columns' => array(
...,
'children' => array(
'exclude' => 0,
'label' => 'Children',
'config' => array(
'type' => 'inline',
'foreign_table' => 'tx_child',
'foreign_field' => 'parent',
'maxitems' => 9999,
'foreign_default_sortby' => 'typecolumn',
'appearance' => array(
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 0,
'showPossibleLocalizationRecords' => 1,
'showAllLocalizationLink' => 1,
'expandSingle' => 1,
'collapseAll' => 1,
'useSortable' => 0,
'enabledControls' => array(
'info' => 0,
'new' => 1,
'dragdrop' => 0,
'sort' => 0,
'hide' => 0,
'delete' => 1,
'localize' => 1,
),
),
'behaviour' => array(
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => true,
'disableMovingChildrenWithParent' => true,
)
)
)
)
);
</pre>
<p>The non-localized column <code>typecolumn</code> is used as type. All inline entries of a localized parent has an empty value for <code>typecolumn</code> and the type class will always be <code>type-unknown</code>.</p>
TYPO3 Core - Bug #77221: IRRE: l10n_mode (=exclude) not evaluated for translated children
http://forge.typo3.org/issues/77221?journal_id=311807
2016-08-15T11:08:01Z
Markus Klein
markus.klein@typo3.org
<ul><li><strong>Subject</strong> changed from <i>The TCA configs typeicon_column and typeicon_classes are not working on non-translatable fields (l10n_mode is set to exclude)</i> to <i>IRRE: l10n_mode (=exclude) not evaluated for translated children</i></li></ul>
TYPO3 Core - Bug #77221: IRRE: l10n_mode (=exclude) not evaluated for translated children
http://forge.typo3.org/issues/77221?journal_id=318600
2016-11-28T16:25:13Z
Alexander Opitz
opitz.alexander@googlemail.com
<ul><li><strong>Status</strong> changed from <i>Needs Feedback</i> to <i>New</i></li></ul>