Review main Abandoned

95024[BUGFIX] Respect doktype of page translations in PageInformationFactory

Benni Mack CR +1 V +1 Normal +54 −6 updated 09/14/26, 15:52

Commit message

PageInformationFactory determines the doktype of the resolved page
from the default language record, before settingLanguage() overlays
the record into the requested language. The doktype dispatch for
pages of type "Link" and "Shortcut" then acts on the stale value,
while the record handed over to PageTypeLinkResolver and
PageRepository is the overlaid one.

A translation declaring a doktype different from its default
language page record therefore either throws an uncaught
RuntimeException in PageTypeLinkResolver::resolveTypolinkParts()
or resolves the wrong target.

The doktype is now determined again from the overlaid record, so
link and shortcut resolution acts on the doktype the translation
actually declares. The mount point is only reset if the translation
is still of type link or shortcut.

Review

  • Code review CR +1
    • Wouter Wolters +1
  • Verified V +1
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 79

  1. Benni Mack uploaded patch set 1 07/30/26, 16:44

  2. Benni Mack uploaded patch set 2 07/30/26, 16:47

  3. Benni Mack marked it ready for review 07/30/26, 16:47

  4. core-ci voted on patch set 1 V +1 07/30/26, 16:53 Copied votes on follow-up patch sets have been updated: * Verified+1 has been copied to patch set 2 (copy condition: "changekind:NO_CHANGE"). Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105705

  5. core-ci voted on patch set 2 V +1 07/30/26, 16:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105706

  6. Wouter Wolters voted on patch set 2 CR +1 V +1 07/30/26, 17:48

  7. André Buchmann commented on patch set 2 07/31/26, 13:56

    Did not work for me in the backend layout module. I think it's okay to implement a solution for v14. but with v15 the doktypes should be enforced like the CType. I've therefore created another patch: https://review.typo3.org/c/Packages/TYPO3.CMS/+/95038
  8. Benni Mack commented on patch set 2 07/31/26, 15:22

    Reply Unresolved

    if we're going the other route, we should also ensure that other fields are synced). Let's say: EN = default language and IT is the translation, which previously had a External URL or a shortcut to different page (I really had this scenario, because the customers did not to translate everything into IT, so they just created a "call this number for more information"). When we do this, we leave users with an empty IT page. just sayin...
  9. Benni Mack abandoned the change 09/14/26, 15:52

    yeah, looks like the wrong appraoch