No Code Attached Yet Information Required
avatar mikeprince
mikeprince
15 Apr 2026

Description

A TypeError is thrown by plg_system_debug on every redirect-based action (such as administrator login and logout) in Joomla 6.1.0.

Exception

TypeError: Joomla\Plugin\System\Debug\DataCollector\QueryCollector::__construct():
Argument #2 ($queryMonitor) must be of type Joomla\Database\Monitor\DebugMonitor,
null given, called in .../plugins/system/debug/src/Extension/Debug.php on line 323

Root cause

In plugins/system/debug/src/Extension/Debug.php at line 323, QueryCollector is instantiated without first checking whether $queryMonitor is null. When a redirect fires (e.g. after login/logout), the database monitor has not been initialised, resulting in the type error.

Expected behaviour

The Debug plugin should guard against a null $queryMonitor before instantiating QueryCollector, either skipping the collector silently or initialising the monitor if appropriate.

Suggested fix

phpif ($queryMonitor !== null) {
$this->debugBar->addCollector(
new QueryCollector($this->db, $queryMonitor)
);
}

Steps to reproduce

Enable the System - Debug plugin
Log in or log out of the Joomla administrator backend
Exception is thrown on every such action

Environment

Joomla 6.1.0
PHP 8.4

avatar mikeprince mikeprince - open - 15 Apr 2026
avatar mikeprince mikeprince - change - 15 Apr 2026
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 15 Apr 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Apr 2026
avatar Fedik
Fedik - comment - 15 Apr 2026

I cannot reproduce.
I enable Debug and Login/Logout still works.

is there any extra step?
Or maybe some extension installed?

avatar hiteshm0
hiteshm0 - comment - 15 Apr 2026

@mikeprince
#47601 tries to fix a very similar issue, can you test it for this issue aswell

avatar Fedik Fedik - change - 15 Apr 2026
Labels Added: Information Required
avatar Fedik Fedik - labeled - 15 Apr 2026
avatar mikeprince
mikeprince - comment - 15 Apr 2026

Or maybe some extension installed?

I have Admin Tools installed so get the exception by email, but it should still be generated if Debug is on.
There is no major problem: login and logout still work fine

avatar mikeprince
mikeprince - comment - 15 Apr 2026

@mikeprince #47601 tries to fix a very similar issue, can you test it for this issue aswell

I couldn't reproduce that issue in the same environment

avatar b2z
b2z - comment - 17 Apr 2026

I've got the same error on all site pages after update to 6.1.0. But after few refreshes of the page the error is gone. Login and logout works fine for me.

avatar joomdonation
joomdonation - comment - 17 Apr 2026
Image

Got same error today. Haven't had time to check to see why it happens yet.

Add a Comment

Login with GitHub to post a comment