J4 Issue ?
avatar elkuku
elkuku
8 Aug 2018

Steps to reproduce the issue

Turn on debug

Expected result

Database profiling information displayed in the debug console.

Actual result

bildschirmfoto_2018-08-07_19-51-46

System information (as much as possible)

0d89117

Additional comments

https://docs.joomla.org/How_to_debug_your_code#Database_Queries
?

avatar elkuku elkuku - open - 8 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Aug 2018
avatar elkuku elkuku - change - 8 Aug 2018
Title
Query profiling broken
[4.0] Query profiling broken
avatar elkuku elkuku - edited - 8 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Aug 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Aug 2018
Category SQL
avatar csthomas
csthomas - comment - 8 Aug 2018

On J3 the query profiling does not work on mysql PDO. See #20322

avatar elkuku
elkuku - comment - 8 Aug 2018

@csthomas thanks for pointing to your PR. From the amount of feedback it received it seems that this is not something very popular...
Now, looking at the 4.0 branch, I can not find anything about profiling in any of the database driver classes. Has this been removed, not ported to the framework and - could we do something in the debug plugin (I'm currently playing with) to restore the functionality?
Thanks for your help ?

avatar dgrammatiko
dgrammatiko - comment - 8 Aug 2018

@elkuku
0d89117 points to a PR for content history scripts converted to ES6. I guess this is irrelevant here or...

avatar mbabker
mbabker - comment - 8 Aug 2018

Now, looking at the 4.0 branch, I can not find anything about profiling in any of the database driver classes. Has this been removed, not ported to the framework

The concept of a "debug mode" in the Framework's database drivers is gone, that would include the logic for #20322. There's a query monitor API in its place to deal with the behaviors related to logging queries, execution times, and whatnot, but there isn't really a "great" replacement for the specific "disable cache and enable profiling" logic (this should be implemented at the application level, hooking the DatabaseEvents::POST_CONNECT event, but in the context of the CMS that is going to fire before plugins are loaded so you can't really use that in the debug plugin; we really need to do something about the concept of debug mode and the debug plugin being reliant on not being able to set itself up until long after the database connection is opened, the session started, etc. etc.; basically everything before the onAfterInitialise event is missed).

avatar elkuku
elkuku - comment - 8 Aug 2018

@dgrammatiko I left the reference under "system information" to show at what point I did my check out. Has nothing to do with your PR ?

@mbabker Yes this basically confirms my findings so it's not gonna be an easy fix.

Database experts please ?

avatar brianteeman brianteeman - change - 8 Aug 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 8 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Aug 2018
Build staging 4.0-dev
avatar brianteeman
brianteeman - comment - 14 Oct 2018

I am going to close this as it refers to the old debug code. If it is still an issue (doesn't appear to be) then it can always be reopened

avatar brianteeman brianteeman - close - 14 Oct 2018
avatar brianteeman brianteeman - change - 14 Oct 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-10-14 20:07:05
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment