Review main Merged

95362[BUGFIX] Avoid fatal error for unresolvable MountPoint site

Maike Kiebele CR +2 V +2 Easy +27 −13 updated 09/03/26, 07:34

Commit message

Generating a link with an 'MP' parameter for a non-default language
throws an uncaught InvalidArgumentException if the MountPoint page no longer resolves to any site, since SiteMatcher::matchByPageId() then returns a NullSite, which only knows language 0.

PageRouter now checks the resolved site's available languages and falls back to the requested language if it is not available there.

Drive-by fix: Since SiteMatcher::matchByPageId() by itself catches the SiteNotFoundException and returns a NullSite, existing try/catch blocks in consumers of that method are now removed.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 810

  1. Maike Kiebele uploaded patch set 1 08/18/26, 07:35

  2. core-ci voted on patch set 1 V +1 08/18/26, 07:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106855

  3. Oliver Klee voted on patch set 1 CR +1 V +1 08/18/26, 07:59

  4. Garvin Hicking commented on patch set 1 08/21/26, 07:05

    PageRouter.php:300

    maybe I'm not getting the full picture here without my IDE - but wouldn't it be better to catch this exception plus InvlaidArgumenrException here? Removing it would then make a request fail instead of falling through?
  5. Maike Kiebele uploaded patch set 2 CR +1 V +1 09/03/26, 06:49

  6. core-ci voted on patch set 2 V +1 09/03/26, 07:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107720

  7. Garvin Hicking commented on patch set 2 CR +1 V +1 09/03/26, 07:03

    PageRouter.php:300 Reply

    We talked about this and I understood the removal now. Aligned it with the trait, resolving this comment. Thanks!
  8. Oliver Klee voted on patch set 2 CR +1 V +1 09/03/26, 07:05

  9. Garvin Hicking voted on patch set 2 CR +2 V +2 09/03/26, 07:10

  10. Garvin Hicking merged patch set 3 09/03/26, 07:34