Skip to content
Snippets Groups Projects
  1. Feb 25, 2023
    • calien666's avatar
      [BUGFIX] Add correct diff source values to translated record · 5df55e11
      calien666 authored
      This change ensures that the original language record diff source
      (usually in the field l10n_diffsource as configured by
      transOrigDiffSourceField) is set correctly as soon as a localized
      record is created.
      
      To guard this, an additional test for pages is added, and several
      DataHandler tests are adjusted.
      
      TYPO3 displays the source language value of a field for a translated
      record. This information field can display a diff, if the source record
      value was changed. To accomplish this a shadow copy of localizable
      fields from the source language record is saved in the configurable
      language diff source field.
      
      Localization of a record creates a new record, adding the values of
      localizable fields value with a prefix and setting needed system fields
      like parent record id, language id and so on. This is updated if a
      localized field is changed in the localized language.
      
      `\TYPO3\CMS\Core\DataHandling\DataHandler` as the main actor in the
      backend is responsible for maintaining this source diff field along
      with other tasks. Due to an oversight, the source language record data
      was not set during record localization. Because of this, the field
      source display did not work until the localized record was saved again.
      This probably went undetected because in normal editorial work the
      record would be changed straight away.
      
      Extension authors using DataHandler hooks can influence which data is
      written, for example using translation tools and databases to localize
      records automatically during the translation process. Therefore, it is
      not really mandatory to change the value afterwards. In the past, that
      practice lead to a broken and invalid source diff field. The issue
      existed for pages and other records in the same way.
      
      Resolves: #99985
      Releases: main, 11.5
      Change-Id: I47d5262dfbcaaa1fa5108e950308f72319c41b5b
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77895
      
      
      Tested-by: default avatarSybille Peters <sypets@gmx.de>
      Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
      Reviewed-by: default avatarSybille Peters <sypets@gmx.de>
      Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
      Tested-by: default avatarcore-ci <typo3@b13.com>
      Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
      5df55e11
  2. Feb 24, 2023
  3. Feb 23, 2023
  4. Feb 22, 2023
  5. Feb 21, 2023
  6. Feb 20, 2023
  7. Feb 17, 2023
  8. Feb 16, 2023
  9. Feb 15, 2023