Project

General

Profile

Actions

Bug #62921

closed

l10n_mode with relations does not work in Extbase

Added by Dmitry Dulepov over 9 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase + l10n
Target version:
-
Start date:
2014-11-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Original issue is here: https://forge.typo3.org/issues/29293 I believe it is incorrectly closed by Marc Bastian Heinrichs.

Suppose in $TCA:

        'documents' => array(
            'label' => '...',
            'l10n_mode' => 'exclude',
            'config' => array(
                'allowed' => 'tx_documents_document',
                'autoSizeMax' => 30,
                'internal_type' => 'db',
                'maxitems' => 20,
                'max_size' => 128000,
                'minitems' => 0,
                'foreign_table' => 'tx_documents_document',
                'MM' => 'tx_documents_ref',
                'MM_foreign_select' => 1,
                'MM_match_fields' => array(
                    'ident' => 'documents'
                ),
                'MM_opposite_field' => 'file_usage',
                'prepend_tname' => 1,
                'type' => 'group'
            )
        ),

When fetching objects for 'documents' field, there should be no language overlay done at all because there are no translated records (l10n_mode=exclude). However doLanguageAndWorkspaceOverlay in typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php does not care and tries to fetch translated records and unsets valid rows in the default language because there are no translated rows (how there can be?). So you always get no docs in languages other than default.

From TCA reference about l10n_mode:

exclude – Field will not be shown in TCEforms if this record is a localization of the default language. (Works basically like a display condition.) Excluded fields will not be copied when a language-copy is made. May have frontend implications similar to "mergeIfNotBlank".
mergeIfNotBlank – Field will be editable but if the field value is blank the value from the default translation is used (this can be very useful for images shared from the default record). Requires frontend support. In the backend the effect is that the field content is not copied when a new "localization copy" is made.


Files

defLangBining.png (139 KB) defLangBining.png Dmitry Dulepov, 2015-03-18 10:37

Related issues 7 (1 open6 closed)

Related to TYPO3 Core - Bug #65859: Support l10n_mode in extbaseUnder Review2015-03-20

Actions
Related to TYPO3 Core - Bug #57272: Extbase doesn't handle FAL translations correctlyClosed2014-03-25

Actions
Related to TYPO3 Core - Bug #77754: Typo3DbQueryParser does not respect enablefields for translated objectsClosed2016-09-01

Actions
Related to TYPO3 Core - Bug #75851: Extbase 110n_mode exclude + repository orderingsClosed2016-04-21

Actions
Has duplicate TYPO3 Core - Bug #76519: Extbase not respecting l10n_mode = mergeIfNotBlank for mm relationsClosed2016-06-08

Actions
Has duplicate TYPO3 Core - Bug #70948: repository doesn't handle l10n_mode "exclude" in some caseClosed2015-10-22

Actions
Has duplicate TYPO3 Core - Bug #75850: Extbase sys_language_mode + l10n_mode excludeClosed2016-04-21

Actions
Actions

Also available in: Atom PDF