I just noticed the problem is not that the profiler doesn't see the queries. It does, as it as says "2 queries" in the tab. The problem is that these two queries are not displayed.
Just created a new 1.4 install, defined a DB connection using your config, and created a controller with a few ORM queries. Works fine, and the queries are displayed in the profiler.
The interface is between the query builder (DB classes) and the Profiler, so it doesn't matter what you use, DB calls, Model_Crud or DB should all log their queries.
Just tried some DB and DBUtil calls in the same 1.4 test install, and they show up in the profiler without problems.
I just created a new installation of 1.5/develop, changed the welcome controller to use Controller_Template, added a database config, enabled the profiler, and added a DB query to action_index.
Profiler pops up in the lower-right corner, and if I open it I see my 1 query. No problem.
Harro, please try to make that. [routes.php] '_root_' => 'main/index',
[Common.php] class Controller_Common extends Controller_Template { public $lang = null; public function before() { parent::before(); $this->lang = 'en'; } }
[Main.php] class Controller_Main extends Controller_Common{ public function action_index(){ DB::query('SELECT * FROM man'. $this->lang)->execute()->as_array(); } }
My Main controller extends two other Controllers.
Probably profiler do not correctly works with many "extending".
I tried to run it under 1.4 and it falls. Profiler works but do not shows all information.
Is is possible to zip your entire docroot (so including assets and fuel core), and post it somewhere (you can let me know via PM (inbox in the menu) if you don't want it public).
Then I can see if I can reproduce it here, and if so, if I can find the cause.
/** * Load the template and create the $this->template object */ public function before() { if ( ! empty($this->template) and is_string($this->template)) { // Load the template $this->template = \View::forge($this->template); }
return parent::before(); }
/** * After controller method has run output the template * * @param Response $response */ public function after($response) { // If nothing was returned default to the template if (empty($response)) { $response = $this->template; }