I recently updated my project dependencies via composer on my local project (CakePHP 4.4.15), running on Windows/Xampp. Suddenly my debug kit toolbar (that has been working fine all the time) is missing and doesn’t show up.
I tried to figure out why this is happening and read many discussions concerning similar topics – all to no avail. Here is what I found out so far:
- DebugKit is properly installed via Composer
php composer.phar require --dev cakephp/debug_kit "~4.0"
- DebugKit is properly loaded via code snippet in Application.php
$this->addPlugin('DebugKit', ['bootstrap' => true, 'routes' => true, 'middleware' => true]);
- DebugKit JS for toolbar gets injected properly into project
<script id="__debug_kit_script" data-id="086faa9a-5d13-4377-a858-21fb3ea0e129" data-url="{project url}" type="module" src="/debug_kit/js/inject-iframe.js?1688573044"></script></body>
But here’s the thing: If I click on the JS source file, i get an Error:
Uncaught Cake\Http\Exception\MissingControllerException: Controller class Debug_kit could not be found.
Both browsers (Chrome and Firefox) complain about the mismatching file type of the JS, which is now obviously an HTML error page.
I already tried the following:
- Uninstalling and reinstalling DebugKit via composer
- Changing several DebugKit related config options (ignoreAuthorization = true, adding TLD to safeTLD list, etc)
- Looking into cake error and debug logs: Found nothing relevant
A thing that I stumbled upon, but don’t know if it is part of the problem:
If I try to load the plugin via “bin/cake plugin load DebugKit”, i get the following message:
Your Application class does not have a bootstrap() method. Please add one.
This seems strange, because I already have a working bootstrap() method in my application class.
Now I feel kinda stuck. Any ideas?