Review main Ready for review

96331[BUGFIX] Point localized workspace records to live records

Benni Mack CR 0 V 0 Expert +1218 −99 updated 11/19/26, 05:24

Commit message

The workspace version of a localized record stores its default
language parent in "l10n_parent" and its translation source in
"l10n_source". Which uid ended up there depended on the order of
actions: Changing a localization in a workspace kept the live uid,
while moving the default language record pointed the localization
to the workspace version of its parent. The latter was accidental:
When a localization is versioned in the same DataHandler run as its
parent, the copy remapping replaced the pointer with the uid of the
parent's workspace version.

Readers expected one or the other. A localization that was first
changed and then moved along with its default language record
vanished from the List module and was shown as untranslated in the
Page module. A page translation moved along with its page was
missing in the frontend workspace preview.

The fix for #97548 already kept the live uid when a default language
record is changed in a workspace, and made FormEngine aware of both
variants. This patch makes it the rule: Workspace versions of
localizations always point to the live default language record. Only
localizations of a record that exists in the workspace only point to
that workspace record, since there is no live record.

DataHandler:
* Versioning a record no longer remaps its language pointers.
* Copying a page with moved localizations copies their move
  pointers only, not their live records a second time, and keeps
  "l10n_source" of the copies connected.

Discard workflow:
The workspace pointer implied "this localization was versioned
along with its parent", which discarding relied on. Discarding the
move or deletion of a default language record now handles the
workspace versions of its localizations explicitly:
* A version created by the move or deletion only is discarded.
* A version that already carried changes, for instance "change
  localization, then move default language record", is turned back
  into a changed version at the position of its live record. The
  changes of the editor are kept.
* Versions of localizations changed independently of a changed
  default language record are not touched.
* A localization deleted on its own, without further changes, can
  not be told apart from one deleted along with its default
  language record. It is restored as well.

Backend:
* Localizations of a moved default language record are found by
  its live uid in the List module, its delete dialog and the Page
  module. Localizations pointing to a workspace version are still
  found until they are migrated.

The upgrade wizard "Point localized workspace records to live
default language records" updates existing records.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 9
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/31/96331/9 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/31/96331/9 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 2

  1. main 62192[BUGFIX] Prevent localizing already translated inline children again Based on this change Merged Andreas Wolf CR +2 V +2 → 14.3 DataHandler Normal +135 −4

    The chain has patch set 28 of 30, the changes above it need a rebase.

  2. 96331 [BUGFIX] Point localized workspace records to live records This change

Merge conflicts 46

Issues 2

Files 48

Show 28 more files

Review log 1221

  1. Benni Mack uploaded patch set 1 10/02/26, 18:33

  2. core-ci voted on patch set 1 V -1 10/02/26, 18:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109988

  3. Benni Mack uploaded patch set 2 V -1 10/05/26, 16:24

  4. Benni Mack marked it ready for review 10/05/26, 16:31

  5. core-ci voted on patch set 2 V +1 10/05/26, 16:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110129

  6. Benni Mack uploaded patch set 3 V +1 10/07/26, 10:46

  7. core-ci voted on patch set 3 V +1 10/07/26, 10:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110302

  8. Benni Mack uploaded patch set 4 V +1 10/09/26, 16:53

  9. core-ci voted on patch set 4 V -1 10/09/26, 17:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110657

  10. Benni Mack uploaded patch set 5 V -1 10/15/26, 20:24

  11. core-ci voted on patch set 5 V +1 10/15/26, 20:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111264

  12. Benni Mack wrote 10/15/26, 22:32

    Topic set to DataHandler
  13. Benni Mack uploaded patch set 6 V +1 10/25/26, 11:27

  14. core-ci voted on patch set 6 V +1 10/25/26, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112482

  15. Oliver Klee voted on patch set 6 V +1 10/25/26, 13:08

  16. Benni Mack uploaded patch set 7 V +1 11/10/26, 06:29

  17. core-ci voted on patch set 7 V -1 11/10/26, 06:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113840

  18. Benni Mack rebased onto patch set 8 V -1 11/10/26, 07:29

  19. core-ci voted on patch set 8 V +1 11/10/26, 07:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113848

  20. Benjamin Kott uploaded patch set 9 V +1 11/19/26, 05:18

  21. core-ci voted on patch set 9 V +1 11/19/26, 05:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114963