Issue Bug Closed

#87887"disablePrependAtCopy" does not work properly in combination with "allowLanguageSynchronization"

Benedikt Imminger 03/11/19, 18:24 updated 11/06/26, 10:43

Description

For the assets-field allowLanguageSynchronization is set to ‘true’ and disablePrependAtCopy is active for sys_file_reference .

This configuration works as expected when the content element is translated for the first time. [Translate to XY] is not visible in the translated content element.

However, when I add another image to the content element after the initial translation, [Translate to XY] is visible.

I think this might be a bug because it works as expected on the initial translation, but not correctly afterwards.

Steps to reproduce:
  1. Set allowLanguageSynchronization to true for ‘assets’
  2. Activate disablePrependAtCopy for sys_file_reference
  3. For sys-lang 0: Add image to a content element which uses the assets field (e.g. text-media).
  4. Add metadata for image (e.g. title).
  5. Translate content element to sys_lang 1 ([Translate to XY] is not visible as expected).
  6. Go back to sys-lang 0: add a second image to content element and save the changes.
  7. Switch to sys-lang 1: metadata of new file now contains [Translate to XY]

Reviews 1

Files 1

History 69

  1. Gerrit Code Review pushed patch set 1 for master to change 60266 status New Under Review <span data-processor="relativetime" data-value="2019-03-16T08:19:50+00:00" > 03/16/19, 08:19 </span>

  2. Philip Heidenreich commented <span data-processor="relativetime" data-value="2021-09-22T10:17:26+00:00" > 09/22/21, 10:17 </span>

    The ticket refers to TYPO3 v9, however changes in v10 were made. Nevertheless, these changes do not work. Even if the prefix is not set due to the conditions, it is set in the following line 1352-1354

    if (empty($prefix)) {
        $prefix = 'Translate to ' . $languageRecord['title'] . ':';
    }

    Therefore, the condition if the table allows the prefix need to be moved to the loop, or everything after the edited condition needs to be placed within that IF statement.

  3. Felix Nagel commented <span data-processor="relativetime" data-value="2022-04-22T09:33:01+00:00" > 04/22/22, 09:33 </span>

    I’m able to confirm this for TYPO3 10.4.27 with the pages.media field.

  4. Joey Bouten commented and changed TYPO3 Version 9 10 <span data-processor="relativetime" data-value="2024-02-13T13:16:48+00:00" > 02/13/24, 13:16 </span>

    Still encounter this issue. We do not want any labels anywhere so we just XClasses it to return the data immediatly

  5. Benni Mack commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-06T10:43:06+00:00" > 11/06/26, 10:43 </span>

    Fixed by #97721 (410d2899247, “Align translation prefix handling in DataMapProcessor”, main + 11.5.x since mid 2022): DataMapProcessor::prefixLanguageTitle() now respects TCEMAIN.table..disablePrependAtCopy, so file references added to the default language after the initial translation and synchronized via allowLanguageSynchronization no longer get the “[Translate to …:]” prefix. Verified on current main. Closing — please reopen if it still happens on 12.4/13.4/14.x.