A TypeError is thrown by plg_system_debug on every redirect-based action (such as administrator login and logout) in Joomla 6.1.0.
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
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.
The Debug plugin should guard against a null $queryMonitor before instantiating QueryCollector, either skipping the collector silently or initialising the monitor if appropriate.
phpif ($queryMonitor !== null) {
$this->debugBar->addCollector(
new QueryCollector($this->db, $queryMonitor)
);
}
Enable the System - Debug plugin
Log in or log out of the Joomla administrator backend
Exception is thrown on every such action
Joomla 6.1.0
PHP 8.4
| Labels |
Removed:
?
|
||
| Labels |
Added:
No Code Attached Yet
|
||
@mikeprince
#47601 tries to fix a very similar issue, can you test it for this issue aswell
| Labels |
Added:
Information Required
|
||
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
@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
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.
I cannot reproduce.
I enable Debug and Login/Logout still works.
is there any extra step?
Or maybe some extension installed?