Issue Bug Under Review

#110179RuntimeException on page translation with different doktype than default language

Martina Kratky 07/09/26, 11:55 updated 11/19/26, 10:57

Description

Visiting a translated page whose doktype differs from its default-language page throws an uncaught RuntimeException (“This class may only be used with pages of doktype ‘Link’ (3), doktype X is not supported”) when the default-language page has doktype = 3 (Link).

Steps to reproduce

  1. Create a page with doktype = 3 (Link) in the default language (e.g. link = ‘#’).
  2. Create a free-mode translation of that page (l10n_parent = 0) with a different doktype, e.g. doktype = 4 (Shortcut) pointing elsewhere. Only tested in free mode; connected mode (l10n_parent = source page uid) not verified.
  3. Visit the translation’s own slug in the frontend.
  4. RuntimeException (code 1762776917) in PageTypeLinkResolver::resolveTypolinkParts().

Analysis

In PageInformationFactory::setPageAndRootline(), $pageDoktype is read from the page record before settingLanguage() overlays it into the requested language. The branch condition (if ($pageDoktype === DOKTYPE_LINK)) still uses this stale pre-overlay value, but the record passed to PageTypeLinkResolver::resolveTypolinkParts() is the post-overlay (translated) record. That resolver strictly checks the translated record’s actual doktype:

if ((int)($pageRecord['doktype'] ?? 0) !== PageRepository::DOKTYPE_LINK) { throw new \RuntimeException(...); }

If the translation’s doktype differs, this throws. The same stale-variable pattern likely affects the DOKTYPE_SHORTCUT
branch further down (unconfirmed crash there — resolved silently to the wrong result in testing instead).

Impact

Any multi-language site using per-translation doktype overrides on the same page (e.g. default = inert doktype=3 placeholder, one translation = doktype=4 shortcut) gets a hard 500 on that translation. So far only confirmed for free-mode translations; unknown whether connected-mode translations are equally affected.

Reviews 4

History 310

  1. André Buchmann commented <span data-processor="relativetime" data-value="2026-07-17T22:08:04+00:00" > 07/17/26, 22:08 </span>

    Hey @martinavk

    thx for reporting this issue. I can reproduce it with just changing the doktype of the translation to something else than link (3). No need to modify the l10n_parent.

    I’ve got two issues here:

    1. Disconnecting page translations by setting l10n_parent breaks the system. A page can’t exist in a translation only, there needs to be a l10n_parent at any time. A default TYPO3 installation doesn’t allow editors to disconnect the pages. (How does e.g. the page tree behave in this case?)

    2. Like the CType of tt_content was changable for translations up to TYPO3 12, it’s now enforced to be the same for all connected translations. I personally think that the same logic should be applied to pages.doktype in future TYPO3 versions. Differing doktypes in translations make all the checks down the road way more complex. As we can see in this example with the PageInformationFactory, this usecase hasn’t been presend during development.

    Possible workaround:
    Instead of modifying the doktype in the translation, create a second page with the desired doktype and use l18n_cfg to disable the default language.

  2. Martina Kratky commented <span data-processor="relativetime" data-value="2026-07-21T08:15:48+00:00" > 07/21/26, 08:15 </span>

    Thanks for the quick reproduction and the detailed breakdown!

    For our specific case, we didn’t actually want a differing doktype per translation — it was a data inconsistency from an earlier migration, not an intentional editorial choice.
    We fixed it by aligning the translation’s doktype with the default language, so the l18n_cfg workaround isn’t something we need here.

    That said, we agree with your assessment: enforcing doktype consistency across connected translations (like CType has been enforced since v12) would remove a whole class of PageInformationFactory-style edge cases, and “translation with a different doktype than its parent” doesn’t seem like a state a default installation should even be able to reach via the backend UI in the first place.