Typo3 custom page to handle error getSiteByIdentifier

30 views Asked by At

In typo3 10.4 I want to display custom, styled page in case that I get 500 error connected with getSiteByIdentifier function. It's in SiteFinder.php sysext/core/Classes/Site/Sitefinder.php

public function getSiteByIdentifier(string $identifier): Site
    {
        if (isset($this->sites[$identifier])) {
            return $this->sites[$identifier];
        }
        throw new SiteNotFoundException('No site found for identifier ' . $identifier, 1521716628);
    }

I tried override this method or change typo3conf/LocalConfiguration and create special site in the backend, but none succeed.

0

There are 0 answers