Issue Bug Resolved

#110913Invalid site url prevents access to install tool

Simon Praetorius 10/05/26, 09:59 updated 10/30/26, 10:55

Description

If the site config contains an invalid base url (either on root level or for a language), an InvalidArgumentException is thrown, which prevents access both to TYPO3 FE/BE and InstallTool. In my case, an environment variable was set to an empty string, which resulted in https:/// as base url.

Mon, 05 Oct 2026 11:44:51 +0200 [CRITICAL] request="a2a4aeb9e0040" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB: BE): InvalidArgumentException, code #1436717322, file /html/myproject/Staging/releases/85/vendor/typo3/cms-core/Classes/Http/Uri.php, line 138: The parsedUri "https:///" appears to be malformed - {"mode":"WEB","application_mode":"BE","exception_class":"InvalidArgumentException","exception_code":1436717322,"file":"/html/myproject/Staging/releases/85/vendor/typo3/cms-core/Classes/Http/Uri.php","line":138,"message":"The parsedUri \"https:///\" appears to be malformed","request_url":"https://mydomain/typo3/login","exception":null}

Reviews 2

Files 3

History 513

  1. Garvin Hicking commented and changed category status New Accepted Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-10-05T12:04:58+00:00" > 10/05/26, 12:04 </span>

    To properly test this, know: Once the site config is cached, this problem will not show up. So clear the cache when inserting an invalid base URI.

    The reason this happens is due to resolveAllExistingSites supplying the base (and aspects) to the “Uri” class and chokes on it when building the cache of all site configs.

    This can be circumvented quite easily with the hammer:

    --- a/typo3/sysext/core/Classes/Configuration/SiteConfiguration.php
    +++ b/typo3/sysext/core/Classes/Configuration/SiteConfiguration.php
    @@ -118,14 +118,19 @@ readonly class SiteConfiguration
                 $identifier = (string)$identifier;
                 // The Site object is always created at runtime, as the constructor evaluates
                 // base variant expressions, which must not be cached persistently.
    -            $site = new Site(
    -                $identifier,
    -                $data['rootPageId'],
    -                $data['configuration'],
    -                $data['settings'],
    -                $data['typoscript'],
    -                $data['tsConfig'],
    -            );
    +            try {
    +                $site = new Site(
    +                    $identifier,
    +                    $data['rootPageId'],
    +                    $data['configuration'],
    +                    $data['settings'],
    +                    $data['typoscript'],
    +                    $data['tsConfig'],
    +                );
    +            } catch (\InvalidArgumentException) {
    +                // Swallow it whole. Check caching.
    +                continue;
    +            }
                 $site->invalidSets = $data['invalidSets'];
                 $sites[$identifier] = $site;
             }

    That even makes the frontend nicely fail with a “No site configuration found” error. However, it also hides the whole site from the backend, and the error could not be revealed.

    A solution I could imagine is that we’d need to handle “invalidSites” just like “invalidSets”: Let the GUI show errors of unresolvable sites, let them be edited, let them stay outside of the cache. Or use error logging for it (but that would not properly indicate failing sites in the backend then).

    Other option is to put in a blank URI for misconfigured URIs, but that would make it silently swallow errors.

  2. Benjamin Franzke commented <span data-processor="relativetime" data-value="2026-10-07T11:02:22+00:00" > 10/07/26, 11:02 </span>

    I like the idea to introduce a concept like invalidSites, similar to unassignedSites and invalidSets, since yes, silently ignoring issues will not help in a long run.

    > TYPO3 FE/BE and InstallTool
    btw: I guess the /typo3/install redirect is broken (which requires working backend routing and was required since we removed the designated entry points), but ?__typo3_install would still work – I understand that does not help much, since this new format is probably not well known yet. Therefore this is just a FYI.

  3. Gerrit Code Review pushed patch set 1 for main to change 96938 status Accepted Under Review <span data-processor="relativetime" data-value="2026-10-20T15:50:54+00:00" > 10/20/26, 15:50 </span>

  4. Garvin Hicking changed attached Screenshot 2026-10-20 at 17.49.01.png attached Screenshot 2026-10-20 at 17.48.26.png attached Screenshot 2026-10-20 at 17.47.59.png <span data-processor="relativetime" data-value="2026-10-20T17:42:40+00:00" > 10/20/26, 17:42 </span>

  5. Garvin Hicking commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-30T10:55:15+00:00" > 10/30/26, 10:55 </span>

    Applied in changeset commit:51b916b7565eae7748d61e1dfe101f11512fe76e.