Issue Feature Closed

#81738Create new IRRE CE in already translated CE v.7.6.19

Eduard Luft 06/29/17, 10:44 updated 10/22/26, 20:37

Description

*Description:*
1. Create default plugin with IRRE functionality.
2. Translate it to a language.
3. Go into the translated plugin and create now an IRRE CE.

*Expectations:*
Should not be possible or translate with warning “inconsistent content detected”

*Result:*
Translate with sys_language_uid 0… (wrong language)

*Actually possible solution:*
Using of TCA option: customControls with myUserFuncMethod for disabling create buttons in translated languages

*Better solutions:*
- New TCA configuration => disable option of the create button in translated languages
- Disable create functionality in translated languages
- Translate into correct language with warning “inconsistent content detected”

TCA configuration:

'ttcontent_pid' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:'.$_EXTKEY.'/Resources/Private/Language/locallang_be.xlf:'.$tmp_rbc_table.'.ttcontent_pid',
    'config' => array(
        'type' => 'select',
        'renderType' => 'selectSingle',
        'foreign_table' => 'tt_content',
        'foreign_table_where' => 'AND tt_content.pid=###CURRENT_PID### AND tt_content.CType="'.$tmp_rbc_ctype.'"',
        'maxitems' => 1,
        'showPossibleLocalizationRecords' => 1,
        'showRemovedLocalizationRecords' => 1,
        'showAllLocalizationLink' => 1,
        'showSynchronizationLink' => 1,
        'enabledControls' => array(
            'info' => FALSE,
        )
    ),
),

*Related issues:*
Bug #71596

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 6

  1. Eduard Luft commented <span data-processor="relativetime" data-value="2017-06-29T11:26:19+00:00" > 06/29/17, 11:26 </span>

    Edit TCA configuration:

        'type' => 'inline',
        'allowed' => 'tt_content',
        'foreign_table' => 'tt_content',
        'foreign_field' => 'tx_table_xyz',
        'foreign_record_defaults' => array(
            'colPos' => '999'
        ),
        'languageField' => 'sys_language_uid',
        'transOrigPointerField' => 'l18n_parent',
        'minitems' => 0,
        'maxitems' => 99,
        'appearance' => array(
            'collapseAll' => 1,
            'expandSingle' => 1,
            'levelLinksPosition' => 'bottom',
            'useSortable' => 1,
            'showPossibleLocalizationRecords' => 1,
            'showRemovedLocalizationRecords' => 1,
            'showAllLocalizationLink' => 1,
            'showSynchronizationLink' => 1,
            'enabledControls' => array(
                'info' => FALSE,
            )
        )
  2. Eduard Luft commented <span data-processor="relativetime" data-value="2017-06-29T14:32:47+00:00" > 06/29/17, 14:32 </span>

    Edit:

    Description:
    2. Translate or copy it to a language.

  3. Riccardo De Contardi commented <span data-processor="relativetime" data-value="2020-03-25T22:34:44+00:00" > 03/25/20, 22:34 </span>

    I tried the following test with TYPO3 9.5.14 and EXT:news (which allows you to add content elements to a new item)

    Prerequisites:

    1) TYPO3 with at least 2 languages (ITA (default), ENG (ID=1))
    2) A sysfolder, translated
    3) Latest version of EXT:News

    test

    1) Create a news record “Test” and translate it (“Test ENG”)
    2) Open Text ENG > Content elements tab

    Results

    1) even with “Translation behavior: value of default language”, the “Create New” button still works
    2) It allows you to create a new content element
    3) But after saving it, the element is not present in the list (But it is created, you can see it in list view, and it has [sys_language_uid] = 1 and [l18n_parent] = 0

  4. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-10-22T20:37:00+00:00" > 10/22/26, 20:37 </span>

    The reported behaviour (new inline child created in an already translated parent ending up with sys_language_uid = 0) was fixed in the meantime by #73609 / #76048 / #48883 (commit c4c2ae465ad) and #76440 (commit bcb412920df). New inline children now inherit the language of their parent: DatabaseRowInitializeNew sets the child’s language field from inlineParentConfig['inline']['parentSysLanguageUid'], which is covered by DatabaseRowInitializeNewTest and FormInlineAjaxControllerTest.

    I also checked the follow-up case from the comment of 2020-03-25 (child record created in a translated parent shows up with sys_language_uid = 1 and l18n_parent = 0, but is not listed afterwards) on current main with a functional test: A child saved via DataHandler in a translated parent is stored with the language and parent of the translation and is listed again when the translated parent is opened in FormEngine. I could not reproduce the problem there. I did not test it with EXT:news and tt_content as child table, though.

    Closing this issue as resolved.

    If this is still valid for you in v14, please open a new issue and provide information how to reproduce it. Thanks!