Review 14.3 Merged

96967[TASK] Soft-fail and show broken site configurations

Garvin Hicking CR +2 V +2 Expert +1850 −75 updated 10/30/26, 10:53

Commit message

A single site configuration that could not be loaded rendered the
whole installation inaccessible, as soon as the site configuration
cache was rebuilt. A typical cause is an environment variable that
resolves to an empty string, turning "https://%env(HOST)%/" into the
malformed base "https:///".

Site configurations failing to be turned into a Site object are now
skipped and collected as invalid sites, listing the exception type,
code, message and (if known) - the affected configuration option.

Errors from loading/resolving are kept in the core cache, errors
of the Site object creation are evaluated per
request, as base variants depend on the context.

`Site` throws the new `InvalidSiteConfigurationException` for malformed
entry points and missing locales, naming the configuration path, e.g.
"languages.1.base".

Invalid sites are shown in a new section of the GUI Sites module, can be
edited there with the error shown above the form, and do not offer to
create a duplicate site configuration for their root page. This
follows the approach of invalid site sets or unassigned sites.

The new CLI command `site:validate` reports invalid sites and fails
if there are any, `site:list` shows a warning. `site:validate` also
checks the base of every base variant, as the Site object only
evaluates the variant matching the current context.

Only configuration errors are collected, other exceptions are thrown
as before. Pages of an invalid site nested in another site are not
resolved to the outer site.

Review

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

Issues 1

Files 41

Show 21 more files

Review log 711

  1. Garvin Hicking commented on patch set 1 10/21/26, 09:29

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php * typo3/sysext/core/Tests/Functional/Command/CliCommandTest.php * typo3/sysext/core/Tests/Unit/Configuration/SiteConfigurationTest.php
  2. core-ci voted on patch set 1 V -1 10/21/26, 09:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111985

  3. Garvin Hicking uploaded patch set 2 V -1 10/21/26, 10:01

    backport
  4. core-ci voted on patch set 2 V +1 10/21/26, 10:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111989

  5. Garvin Hicking commented on patch set 3 V +1 10/30/26, 10:37

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php * typo3/sysext/core/Tests/Functional/Command/CliCommandTest.php * typo3/sysext/core/Tests/Unit/Configuration/SiteConfigurationTest.php
  6. Garvin Hicking uploaded patch set 4 10/30/26, 10:41

    backport
  7. core-ci voted on patch set 3 V -1 10/30/26, 10:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112849

  8. Garvin Hicking marked it ready for review 10/30/26, 10:45

  9. core-ci voted on patch set 4 V +1 10/30/26, 10:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112851

  10. Garvin Hicking voted on patch set 4 CR +2 V +2 10/30/26, 10:53

  11. Garvin Hicking merged patch set 5 10/30/26, 10:53