Bug #254
offen[Bugsink] Exception: Call to a member function getTitle() on null
0%
Beschreibung
Bugsink: https://bugsink.cytrus.de/issues/issue/2706bf55-672d-48a1-a978-0b4b242915d3/event/last/
Typ: NEW issue
Projekt: www-fuchsfelge-com
Bugsink Alert
Exception: Call to a member function getTitle() on null
Automatisch erstellt durch n8n
KI-Analyse:
1. Root Cause Identified¶
The error Call to a member function getTitle() on null indicates that a null object is being dereferenced. In the context of TYPO3's HTTP kernel stack, this occurs during the frontend bootstrap in AbstractApplication::run() (around line 106). The site resolution mechanism (TYPO3\CMS\Core\Site\Resolver\SiteResolver) fails to find a matching site configuration for the incoming request. Consequently, the site object remains null, and any subsequent call to getTitle() on it triggers the fatal error.
Typical triggers:
- The request host/domain is not mapped in the "Sites" module configuration.
- Corrupted or outdated cache (
siteConfigurationcache pages). - Misconfiguration of the
VerifyHostHeadermiddleware (listed in your stack at frame-/vendor/typo3/cms-core/Classes/Middleware/VerifyHostHeader.php:55), which may block or alter the host matching process. - Missing
base,rootPageId, orlanguagesin the site configuration.
2. Concrete Fix Description¶
-
Clear all TYPO3 caches immediately:
typo3cms cache:flush # or via Install Tool: "Flush all caches" -
Verify site configuration in the TYPO3 Backend:
- Navigate to Tools > Sites (or
siteadminmodule). - Confirm that the requesting host/domain is listed under
Root permissionsor has a matchingConfiguration. - Ensure each site record has a valid
baseURL,rootPageId, and configuredlanguages.
- Navigate to Tools > Sites (or
-
Inspect
VerifyHostHeadermiddleware:- Check your
Configuration/Backend/HostHeaderConfiguration.php(orAdditionalConfiguration.php). - Ensure
ALLOWED_HOSTSor the middleware's matching logic includes the actual request host. If misconfigured, either adjust the whitelist or temporarily disable the middleware to verify if the error persists.
- Check your
-
Check for custom code invoking
getTitle():- If you have extensions or custom frontend code that calls
getTitle()on a site/page object, wrap it with a null guard:if ($site = $this->getSite()) { $title = $site->getTitle(); } - However, the primary fix remains correct site configuration.
- If you have extensions or custom frontend code that calls
3. Affected TYPO3 Extension¶
The issue originates from TYPO3 Core (TYPO3\CMS\Core), specifically the Site Resolution and Http Kernel components. The stack traces point to:
-
AbstractApplication::run/handle -
MiddlewareDispatcher(includingVerifyHostHeader,NormalizedParamsAttribute,ResponsePropagation)
There is no single "extension" to blame; rather, the project's site configuration (managed in the backend "Sites" module) is the responsible entity. If an extension alters site configuration loading or host handling, it could contribute, but the root is core site handling.
4. Confidence Score¶
85%
High confidence that the site object is null due to missing/mismatched host mapping or cache issues. The exact line number (106 in AbstractApplication) may vary slightly between TYPO3 11/12/13, but the pattern is consistent. Alternative causes (e.g., custom code calling getTitle() on a null object) are possible but less likely given the pure core middleware stack.
Nichts anzuzeigen