CodeIgniter Forums
problem with debug bar - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: problem with debug bar (/thread-67555.html)



problem with debug bar - qury - 03-08-2017

i found the below issue:

While the environment is set to development the page is not rendered correctly using the below URLs:

- http://local.site/home
- http://local.site/home/index

The Debug Toolbar is opened up by default however i can't click on any of the buttons.
If i look at the page source the expected data is there in the source.

However, the below URL will work:

http://local.site/home/index/anything_here

When i switch the environment to production, without the debug bar, everything works fine.


PHP Code:
<?php namespace App\Controllers;

use 
CodeIgniter\Controller;

class 
Home extends Controller {

 
   public $db;

 
   public function __construct(...$params) {
 
       parent::__construct(...$params);
 
       $this->db = \Config\Database::connect();
 
       helper('url');
 
   }
 public function 
index($tbl NULL) {

 
       $tables $this->db->listTables();
 
       $data['content']['tables'] = $tables;


 
       if ($tbl !== NULL)
 
       {
 
           $fields $this->db->getFieldNames($tbl);
 
           $data['content'][$tbl] = $fields;
 
       } else
 
       {
 
           $fields $this->db->getFieldNames('zz_settings');
 
           $data['content']['zz_settings'] = $fields;
 
       }

 
        echo '<pre>';
 
        print_r($data);
 
        echo '</pre>';
 
   }