Issue Feature New Orphaned

#94504Make queries backtrace limit configurable

Christoph Lehmann 07/08/21, 09:27 updated 01/24/26, 11:22

Description

In TYPO3 10.4 it’s fixed to 7, where only 4 steps are displayed.

Would be nice to be able to increase the limit by configuration. Queries may occur multiple times and the important “step” may be missing.

See \TYPO3\CMS\Adminpanel\Log\DoctrineSqlLogger::startQuery()

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[FEATURE] Make queries backtrace limit configurable Resolves: #94504 Releases: main

History 1

  1. Benni Mack commented <span data-processor="relativetime" data-value="2026-01-24T11:22:38+00:00" > 01/24/26, 11:22 </span>

    background info… this is in typo3/sysext/adminpanel/Classes/Log/DoctrineSqlLogger.php

    $visibleBacktraceLength = 4;
    $removeFromBacktraceLength = 4; 

    The debug_backtrace() call on line 56 uses $visibleBacktraceLength + $removeFromBacktraceLength (= 8) as the limit, then 4 frames are removed (internal Doctrine/logging methods), leaving only 4 visible backtrace steps in the Admin Panel’s SQL query log.