Translated records of custom domain models not fetched in TypoScript

Hello all,

I have a content element where I can select entries from a custom domain model. I want to display the selected data - in my case some people - in the frontend. I use TypoScript to fetch the data:

dataProcessing {
    10 = database-query
    10 {
        table = tx_myext_domain_model_teammember
        as = contact_persons
        pidInList = 0
        uidInList.field = contact_persons
        
        dataProcessing {
            10 = files
            10 {
                references.fieldName = image
                sorting = title
                sorting.direction = descending
                as = image
            }
        }
    }
}

My select field:

    'contact_persons' => [
        ...
        'config' => [
            'type' => 'select',
            'renderType' => 'selectCheckBox',
            "foreign_table" => "tx_myext_domain_model_teammember",
            'foreign_table_where' => 'AND tx_myext_domain_model_teammember.sys_language_uid = ###REC_FIELD_sys_language_uid###',
            "multiple" => 1,
        ],
    ],

This works fine for the default language (German), but when I switch to English no records get fetched. Yes, I have translated the content element and the team members and they are not hidden.
Is it maybe an issue with the team member TCA? I’m using TYPO3 13.1.1 and all database fields are auto-generated (ext_tables.sql is basically empty).

'ctrl' => [
    'title' => 'Team-Mitglied',
    'label' => 'first_name',
    'rootLevel' => -1,
    'security' => [
        'ignorePageTypeRestriction' => true,
        'ignoreRootLevelRestriction' => true,
    ],
    'tstamp' => 'tstamp',
    'crdate' => 'crdate',
    'versioningWS' => true,
    'transOrigPointerField' => 'l10n_parent',
    'transOrigDiffSourceField' => 'l10n_diffsource',
    'languageField' => 'sys_language_uid',
    'translationSource' => 'l10n_source',
    'origUid' => 't3_origuid',
    'delete' => 'deleted',
    'sortby' => 'sorting',
    'enablecolumns' => [
        'disabled' => 'hidden',
    ],
],

It’s hard to find up-to-date resources on TYPO3, so any help as to why I cant seem to fetch translated records would be appreciated :slight_smile:

I found out what the issue is. In the backend I was selecting the translated records (English), but I am supposed to select the records in the default language (German for me). Selecting the default records correctly displays their translated version when switching languages in the frontend.

1 Like