Log message #4154413

# At Username Text
# Jun 28th 2018, 08:54 josbeir even better :slightly_smiling_face:
# Jun 28th 2018, 08:54 josbeir bad habbits
# Jun 28th 2018, 08:54 dereuromark how about debugger and stepping through? :slightly_smiling_face: I have only done it for cake3, but should also work fine for cake2
# Jun 28th 2018, 08:53 josbeir never use that :) 'debug' is my muscle memory since 1.x
# Jun 28th 2018, 08:53 saeideng `dd()` ;P
# Jun 28th 2018, 08:52 josbeir die() and debug() is your friend
# Jun 28th 2018, 08:52 josbeir of course it makes sense
# Jun 28th 2018, 08:52 kunalspunjabi does it make sense to go down into the cake lib directory? Because we know that is not the problem
# Jun 28th 2018, 08:51 josbeir you will become a better developer if you do it like that
# Jun 28th 2018, 08:51 josbeir cake code is readable enough
# Jun 28th 2018, 08:51 josbeir the best way to debug something is to understand what 'something' does
# Jun 28th 2018, 08:51 josbeir start with your controller class, see what everything does and how vars get passed to the view
# Jun 28th 2018, 08:50 saeideng :+1:
# Jun 28th 2018, 08:50 saeideng I mean was `requireing`
# Jun 28th 2018, 08:50 kunalspunjabi Right...any idea what I could try @josbeir? How does one systematically debug this, to see why the data doesn't get passed to the view? This is the came Cake "lib" folder as the skeleton cake2 app, where the data passing works fine :(
# Jun 28th 2018, 08:50 dereuromark dormant files lying around do not hurt. especially in vendor
# Jun 28th 2018, 08:50 josbeir was hesistant on including the cakephp-tools package but i guess i'll do it
# Jun 28th 2018, 08:50 saeideng :D
# Jun 28th 2018, 08:50 dereuromark loading the plugin is not necessary, only requireing it :slightly_smiling_face:
# Jun 28th 2018, 08:50 saeideng sorry I did not see @dereuromark post
# Jun 28th 2018, 08:49 josbeir yes i saw :slightly_smiling_face:
# Jun 28th 2018, 08:49 saeideng for using it you need to load this plugin too
# Jun 28th 2018, 08:49 saeideng https://github.com/dereuromark/cakephp-tools/blob/master/src/Error/ErrorHandlerTrait.php
# Jun 28th 2018, 08:49 josbeir your AppController is executed, but it doesn't pass vars to the view
# Jun 28th 2018, 08:48 josbeir then find out why that is @kunalspunjabi
# Jun 28th 2018, 08:48 kunalspunjabi I've tried it
# Jun 28th 2018, 08:48 dereuromark thats how it is done properly..^^
# Jun 28th 2018, 08:48 kunalspunjabi @josbeir I dont think they get set from any controllers :(
# Jun 28th 2018, 08:48 dereuromark Read https://github.com/dereuromark/cakephp-tools/blob/master/docs/Error/ErrorHandler.md
# Jun 28th 2018, 08:47 josbeir bye bye big error logs
# Jun 28th 2018, 08:47 josbeir ah lol thats ineed a big one :)
# Jun 28th 2018, 08:47 dereuromark it logs 404s to a non error one :slightly_smiling_face: as it should
# Jun 28th 2018, 08:47 josbeir do variables from other controllers get set?
# Jun 28th 2018, 08:46 josbeir @kunalspunjabi its a bit difficult to see whitout a bigger context ...
# Jun 28th 2018, 08:46 josbeir @dereuromark that just logs the 404 error or am i reading it wrong ?
# Jun 28th 2018, 08:45 kunalspunjabi @josbeir any thoughts on how to debug this problem
# Jun 28th 2018, 08:45 dereuromark josbeir, it is even cooler if you combine it with my other fixed 404 error handler^^ https://github.com/dereuromark/cakephp-sandbox/blob/3.0/src/Error/Middleware/ErrorHandlerMiddleware.php
# Jun 28th 2018, 08:44 josbeir find it superior to the cake exception message
# Jun 28th 2018, 08:44 josbeir i like whoops :P
# Jun 28th 2018, 08:44 josbeir its working pretty well
# Jun 28th 2018, 08:43 saeideng I did not use this plugin