Bug #83802

Epic #83894: PSR-15 Initiative

Timetracker and pre-process middleware ordering is incorrect

Added by Benjamin Franzke over 2 years ago. Updated over 1 year ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


The middlware's introduced in https://review.typo3.org/c/55537/ did not preserve the sequence as used before.

timetracker has been marked to be executed after the preprocessing:

        'typo3/cms-frontend/timetracker' => [
            'target' => \TYPO3\CMS\Frontend\Middleware\TimeTrackerInitialization::class,
            'after' => [

'timetracker' needs to be executed first, then the request 'preprocessing', as done before the mentioned change:

        // Starting time tracking
        $configuredCookieName = trim($GLOBALS['TYPO3_CONF_VARS']['BE']['cookieName']) ?: 'be_typo_user';

        /** @var TimeTracker $timeTracker */
        $timeTracker = GeneralUtility::makeInstance(TimeTracker::class, ($request->getCookieParams()[$configuredCookieName] ? true : false));

        // Hook to preprocess the current request
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest'] ?? [] as $hookFunction) {
            $hookParameters = [];
            GeneralUtility::callUserFunction($hookFunction, $hookParameters, $hookParameters);

Associated revisions

Revision 5515ba25 (diff)
Added by Benjamin Franzke over 2 years ago

[BUGFIX] Fix timetracker and pre-process middleware sequence

Correct middleware configuration to preserve the ordering
timetracker initialization and pre-process hook had prior
the re-implementation as middleware.
The timetracker initialization needs to be first, pre-process second.

Change-Id: Ieecfff459000566f75b692516f27f5d7e176149b
Resolves: #83802
Releases: master
Reviewed-on: https://review.typo3.org/55594
Tested-by: TYPO3com <>
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>


#1 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55594

#2 Updated by Benjamin Franzke over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#3 Updated by Susanne Moog over 2 years ago

  • Parent task set to #83894

#4 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF