# |
Nov 19th 2019, 11:05 |
ndm |
@k4t Your error log config probably catches all scopes, see https://book.cakephp.org/3/en/core-libraries/logging.html#logging-scopes |
# |
Nov 19th 2019, 11:02 |
maymeow |
one question |
# |
Nov 19th 2019, 11:01 |
k4t |
instead of only sso.log file |
# |
Nov 19th 2019, 11:01 |
k4t |
it will write to sso.log and error.log files |
# |
Nov 19th 2019, 11:01 |
k4t |
Log::warning('test', ['scope' => ['sso']]); |
# |
Nov 19th 2019, 11:01 |
k4t |
so both logs are written instead of only one (to sso.log file) |
# |
Nov 19th 2019, 11:00 |
k4t |
but when I write log to that scope than my log is also created in error.log not only in sso.log |
# |
Nov 19th 2019, 11:00 |
k4t |
I created following log config: Log::config('sso', ['className' => 'File', 'path' => LOGS, 'levels' => [], 'scopes' => ['sso'], 'file' => 'sso.log']); |
# |
Nov 19th 2019, 10:59 |
k4t |
Hi |
# |
Nov 19th 2019, 10:37 |
ndm |
Look at the stacktrace, the error might not stem from where you think it does. |
# |
Nov 19th 2019, 10:35 |
noel |
Seems that as soon as I add in a self-referencing association to my model the route breaks. Which doesn't make any sense. |
# |
Nov 19th 2019, 10:34 |
noel |
same error |
# |
Nov 19th 2019, 10:34 |
pieceof |
; |
# |
Nov 19th 2019, 10:34 |
noel |
how? |
# |
Nov 19th 2019, 10:34 |
pieceof |
bin/cake orm_cache clear |
# |
Nov 19th 2019, 10:33 |
pieceof |
delete orm cache from time to time |
# |
Nov 19th 2019, 10:33 |
noel |
My route hasn't changed. I'm using Postman to access: `/api/users` but when I add my association in then that same route gives me a 500 internal server error with the message I showed. |
# |
Nov 19th 2019, 10:32 |
pieceof |
that link looks bad formed :? |
# |
Nov 19th 2019, 10:32 |
pieceof |
what route ?, controller null, action, null ? |
# |
Nov 19th 2019, 10:31 |
noel |
Mysteriously that error vanished. Now instead I'm getting: ```"A route matching \"array (\n 'controller' => '',\n 'plugin' => '',\n 0 => 1,\n '_method' => 'GET',\n 'action' => 'view',\n 'prefix' => 'api',\n '_ext' => NULL,\n)\" could not be found."``` ... just by adding in an association.. why would my route suddenly not be found? |
# |
Nov 19th 2019, 10:29 |
kgb.acct.personal |
Thanks. I'll keep that in mind |
# |
Nov 19th 2019, 10:28 |
slackebot |
!kiss |
# |
Nov 19th 2019, 10:28 |
slackebot |
Command sent from Slack by challgren: |
# |
Nov 19th 2019, 10:28 |
pieceof |
php mvc ~ rubymvc |
# |
Nov 19th 2019, 10:28 |
challgren |
Remember KISS |
# |
Nov 19th 2019, 10:28 |
kgb.acct.personal |
Guess I'll use a design pattern that doesn't piss my coworkers off |
# |
Nov 19th 2019, 10:28 |
pieceof |
im sorry not updated to cake 3, but it should work with that definition, id look elsewhere |
# |
Nov 19th 2019, 10:27 |
narendravaghela |
thanks @kgb.acct.personal |
# |
Nov 19th 2019, 10:26 |
noel |
@pieceof actually I'm getting that error even if I delete the association!? |
# |
Nov 19th 2019, 10:26 |
kgb.acct.personal |
@narendravaghela Your plugin looks easy to use :+1: |
# |
Nov 19th 2019, 10:26 |
challgren |
Im a slacker! Sorry! |
# |
Nov 19th 2019, 10:25 |
narendravaghela |
Cool man! |
# |
Nov 19th 2019, 10:25 |
challgren |
I gotta work on 4.x soon |
# |
Nov 19th 2019, 10:25 |
challgren |
Got it, its been a bit of time since I looked at the codebase |
# |
Nov 19th 2019, 10:25 |
noel |
@pieceof no, it's Cake 3.8 |
# |
Nov 19th 2019, 10:25 |
narendravaghela |
Yes, not SDK |
# |
Nov 19th 2019, 10:25 |
challgren |
APIs but not SDK |
# |
Nov 19th 2019, 10:24 |
pieceof |
is it cake 2 maybe classname should be User ? |
# |
Nov 19th 2019, 10:24 |
challgren |
Ahh nope we dont use their SDK, but for QBO right now I use their SDK but its painful |
# |
Nov 19th 2019, 10:24 |
narendravaghela |
We use their APIs |
# |
Nov 19th 2019, 10:23 |
challgren |
Or it is SDKless |