J4 Issue ?
avatar Fedik
Fedik
8 Aug 2020

Steps to reproduce the issue

Enable debug plugin and enable "Query explain" feature.
In the Debugbar, in Query tab you should be able to see Explain , near the every "select" query.
But it show empty table. @alikon comment: #25675 (comment)

The reasons

The reasons is that the plugin run EXPLAIN without required params, and so database return SQL error.

try
{
$db->setQuery('EXPLAIN ' . ($dbVersion56 ? 'EXTENDED ' : '') . $query);
$this->explains[$k] = $db->loadAssocList();
}
catch (Exception $e)

It would be easy to fix but the problem in QueryMonitor, it does not log a bound params.
https://github.com/joomla-framework/database/blob/4cda5d73eb55ac8a596f261aac08a33d658421fb/src/QueryMonitorInterface.php#L26-L28

So first need to fix QueryMonitor, then can get this issue fixed.

avatar Fedik Fedik - open - 8 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Aug 2020
avatar Fedik Fedik - change - 8 Aug 2020
The description was changed
avatar Fedik Fedik - edited - 8 Aug 2020
avatar richard67
richard67 - comment - 8 Aug 2020

@alikon What do you think? Should this be a release blocker? I think it could be one, but I am not sure.

avatar richard67
richard67 - comment - 8 Aug 2020

Related framework issue see joomla-framework/database#214 . Thanks @Fedik .

avatar Fedik
Fedik - comment - 8 Aug 2020

I would set it "release blocker", because if we not fix QueryMonitor before the release, later it will be harder to fix because a backward compatibility problems.

avatar richard67 richard67 - change - 8 Aug 2020
Labels Added: ?
avatar richard67 richard67 - labeled - 8 Aug 2020
avatar richard67 richard67 - change - 8 Aug 2020
Labels Added: J4 Issue
avatar richard67 richard67 - labeled - 8 Aug 2020
avatar alikon
alikon - comment - 9 Aug 2020

yes for me release blocker

avatar HLeithner
HLeithner - comment - 9 Aug 2020

How can a debug function be a release blocker?

avatar richard67
richard67 - comment - 9 Aug 2020

A debug function is something essential for core and extension and whatever else on J4 developers.

Debugging database queries should also be possible when using prepared statements.

avatar wilsonge
wilsonge - comment - 10 Aug 2020

Agreed

avatar Fedik
Fedik - comment - 6 Sep 2020

please test #30580

avatar Fedik Fedik - change - 6 Sep 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-09-06 09:32:31
Closed_By Fedik
Labels Added: ?
Removed: ?
avatar Fedik Fedik - close - 6 Sep 2020
avatar wilsonge wilsonge - change - 16 Sep 2020
Labels Removed: ?
avatar wilsonge wilsonge - unlabeled - 16 Sep 2020

Add a Comment

Login with GitHub to post a comment