# |
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 |
# |
Jun 28th 2018, 08:43 |
saeideng |
aha |
# |
Jun 28th 2018, 08:43 |
josbeir |
i configured it both ways |
# |
Jun 28th 2018, 08:43 |
saeideng |
I say other thing |
# |
Jun 28th 2018, 08:42 |
josbeir |
always returning status code 200 |
# |
Jun 28th 2018, 08:42 |
josbeir |
s |
# |
Jun 28th 2018, 08:42 |
josbeir |
the problem was just that it was executing too in integration test |
# |
Jun 28th 2018, 08:42 |
saeideng |
it needs to load again for `(new \CakephpWhoops\Error\WhoopsHandler(Configure::read('Error')))->register();` ? |
# |
Jun 28th 2018, 08:41 |
josbeir |
:P |
# |
Jun 28th 2018, 08:41 |
josbeir |
both |
# |
Jun 28th 2018, 08:41 |
saeideng |
or |
# |
Jun 28th 2018, 08:41 |
josbeir |
yes |
# |
Jun 28th 2018, 08:41 |
saeideng |
are you using `->add(new \CakephpWhoops\Error\Middleware\WhoopsHandlerMiddleware())` in application ? |
# |
Jun 28th 2018, 08:41 |
kunalspunjabi |
bear in mind, I am also very rusty, haven't coded in a long time.. |
# |
Jun 28th 2018, 08:41 |
saeideng |
@josbeir I did see your PR |
# |
Jun 28th 2018, 08:40 |
kunalspunjabi |
It doesn't seem that way after 8 hours of debugging this |
# |
Jun 28th 2018, 08:39 |
kunalspunjabi |
I hope so :slightly_smiling_face: |
# |
Jun 28th 2018, 08:39 |
josbeir |
its probably something real stupid |
# |
Jun 28th 2018, 08:39 |
kunalspunjabi |
I'm totally stumped |
# |
Jun 28th 2018, 08:39 |
josbeir |
hmm :slightly_smiling_face: |
# |
Jun 28th 2018, 08:39 |
josbeir |
thats a good thing |
# |
Jun 28th 2018, 08:38 |
kunalspunjabi |
@josbeir added a var_dump and die in beforeFilter...it prints and dies |