Project

General

Profile

Actions

Bug #99957

closed

configurationManager::getConfiguration sometimes returns empty result when called from Middleware

Added by Mordamir over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2023-02-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

For our website we have 2 middleware scripts. They both are near the end of the frontend middleware stack.

frontend
    typo3/cms-frontend/timetracker = TYPO3\CMS\Frontend\Middleware\TimeTrackerInitialization
    typo3/cms-core/normalized-params-attribute = TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute
*** REMOVED LOTS OF MIDDLEWARES ***
    typo3/cms-frontend/content-length-headers = TYPO3\CMS\Frontend\Middleware\ContentLengthResponseHeader
    dirkpersky/plain-rendering-handler = DirkPersky\DpCookieconsent\Middleware\PlainRenderingMiddleware
->    ***/***/current-project = ***\***\Middleware\CurrentProject
->    ***/***/project-update = ***\***\Middleware\ProjectUpdate
    aoe/crawler/initialization = AOE\Crawler\Middleware\CrawlerInitialization
    typo3/cms-frontend/output-compression = TYPO3\CMS\Frontend\Middleware\OutputCompression

For them to work correctly the need some values from the typoscript configuration. We do this by:
    $configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
    $settings = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'EXTENSION_KEY');

It was working a long time. Since 2 weeks now this call does return inconsistent results. Sometimes the $settings-Array is empty and sometimes it contains the values it should have.
The question now is, how it could be possible that the result of the getConfiguration call is sometimes empty?
There was no update in typo3 or php version. The request url is always the same.
Currently i dont know if the configuration array is empty at all or if only the extension related entries are missing.
What could i do to debug this issue?

Actions

Also available in: Atom PDF