Log message #4214128

# At Username Text
# Nov 19th 2019, 13:20 mocelle I habe mi idea
# Nov 19th 2019, 13:19 mocelle If I use dump($this->access_token) in Postman is alles Ok.
# Nov 19th 2019, 13:18 slackebot $ex->getMessage()); }
# Nov 19th 2019, 13:18 mocelle $headers = [ 'headers' => [ 'Content-Type' => 'application/json', 'Cache-Control' => 'no-cache', 'Accept' => 'application/json', 'Authorization' => 'Bearer ' .$this->access_token, ], ]; $client = new Client(); $url = $this->host . $path; try { $response = $client->post($url, $data, $headers); } catch (\Exception $ex) { throw new Exception("Error" .
# Nov 19th 2019, 13:07 rsteenge How to change the date formats before saving in cakephp 3? In cakephp 2 it could be done in the appModel beforesave
# Nov 19th 2019, 13:06 mocelle :white_frowning_face:
# Nov 19th 2019, 13:06 mocelle I take api token from restapi and using cakephp 3.3
# Nov 19th 2019, 12:28 ndm 415 indicates that possibly the content that you're sending doesn't match the content type that you're indicating. But again, more details would help. Where is that code located? What are you doing with it? Where are you adding the data and what does it look like?
# Nov 19th 2019, 12:23 pieceof try 'Authorization' => 'Authorization: Bearer xfxfgxdfg'
# Nov 19th 2019, 12:19 mocelle And i retrive 415 status code
# Nov 19th 2019, 12:19 slackebot <mocelle>
# Nov 19th 2019, 12:18 pieceof curl --request POST --url https://xDxDxD:xDxD/api/users/new --header 'Accept: application/json' --header 'Content-Type: application/json' --header 'Authorization: Bearer 0xDxDxDbigsaussagexDxD' --data '{"username":"new_username", "password":"new_passwrod"}'
# Nov 19th 2019, 12:15 ndm @mocelle You need to add a little more detail, I really don't know what your actually asking for. Maybe add some code to illustrate the problem.
# Nov 19th 2019, 12:13 slackebot $this->hasMany('Clients', [ 'className' => 'Users', 'foreignKey' => 'customer_id', 'joinType' => 'LEFT' ]);``` I don't get errors but it also doesn't create any joins in the select statements?
# Nov 19th 2019, 12:13 noel So if I add a `user_id` field to my `users` table then bake adds the following associations (which don't cause an error): ```$this->belongsTo('Users', [ 'foreignKey' => 'user_id' ]); $this->hasMany('Users', [ 'foreignKey' => 'user_id' ]); ``` However it doesn't create any joins. I changed it to this: ```$this->belongsTo('Customers', [ 'className' => 'Users', 'foreignKey' => 'customer_id', 'joinType' => 'LEFT' ]);
# Nov 19th 2019, 12:13 mocelle I send Data too, with Post method
# Nov 19th 2019, 12:07 ndm What does one have to do with the other? That's two different headers, isn't it?
# Nov 19th 2019, 12:04 mocelle *how
# Nov 19th 2019, 12:03 mocelle Hier to add Authorisation to Header with content type
# Nov 19th 2019, 11:54 ndm Obviously, but what can you do... 5.6 would have been fine, the test suite was already using 5.6 because there was no 5.5 CLI version at the time, 5.5 was only available to Apache :)
# Nov 19th 2019, 11:47 dereuromark ideally through staging phase instead of testing stuff on prod^^
# Nov 19th 2019, 11:46 dereuromark ndm: sounds like screwups. taking it from 5.5 to 5.6 should be easy doable within config params.
# Nov 19th 2019, 11:45 pieceof wanted a project and for your sins they gave you one ;
# Nov 19th 2019, 11:42 ndm They should, but the then there's reality where people do all sorts of crazy stuff. I'm just upgrading an app that was running on PHP 5.5 and CakePHP 3.2 for some years. Their server environment was finally upgraded, and of course PHP went straight to 7.3 to introduce as many incompatibilities at once as possible - all while the app is used in production of course :)
# Nov 19th 2019, 11:25 dereuromark even that one is already EOL for some time.
# Nov 19th 2019, 11:25 dereuromark everyone should already be on php5.6+ for years now.
# Nov 19th 2019, 11:25 dereuromark oh, that dangerously outdated?
# Nov 19th 2019, 11:18 k4t bloeck by PHP ver
# Nov 19th 2019, 11:14 dereuromark always use latest minor
# Nov 19th 2019, 11:12 k4t thank you
# Nov 19th 2019, 11:11 k4t I use 3.1.14... you are probably right
# Nov 19th 2019, 11:10 dereuromark mine isnt anymore I think.
# Nov 19th 2019, 11:10 dereuromark well, yours might still be scope issue from early 3.x days ( https://sandbox.dereuromark.de/pages/best-practices#logging )
# Nov 19th 2019, 11:09 k4t not scopes
# Nov 19th 2019, 11:09 k4t it is logged twice becuase of levels
# Nov 19th 2019, 11:08 k4t yes...
# Nov 19th 2019, 11:06 dereuromark The part I find annoying is that certain levels, e.g. "info" gets always logged in twice ("debug" + "info" stream/file etc).. Not sure what i need to fix here.
# 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