Log message #4213281

# At Username Text
# Nov 14th 2019, 10:44 dereuromark dd() the result and you will see
# Nov 14th 2019, 10:43 dereuromark and yes, you can directly modify fields
# Nov 14th 2019, 10:43 dereuromark $student (singular)
# Nov 14th 2019, 10:42 javier.villanueva ``` $students = $this->Students->newEntity(); $students->courses = $courses; ¿and days_attended? ```
# Nov 14th 2019, 10:41 javier.villanueva if I have a belongsToMany (with through option cause I have metadata in this relation https://book.cakephp.org/3/en/orm/associations.html#using-the-through-option). Could I save this metadata infomation directly when I save one of the models? for instance In the doc example how to save days_attended
# Nov 14th 2019, 10:39 javier.villanueva morning all
# Nov 14th 2019, 10:34 challgren Im not sure, I never use deliver I always do ->send()
# Nov 14th 2019, 10:32 mehov you mean it should use the *default transport*, not the whatever transport defined for the *default profile*, correct? i.e. this is the intended behaviour, and if i want `deliver()` to use my custom transport configuration, i should overwrite the default transport with it, instead of putting it into a separate transport and choosing it for the default profile
# Nov 14th 2019, 10:29 challgren But it should use the default
# Nov 14th 2019, 10:28 challgren Source code
# Nov 14th 2019, 10:28 challgren https://api.cakephp.org/3.4/source-class-Cake.Mailer.Email.html#2092-2130
# Nov 14th 2019, 10:27 mehov https://cakesf.slack.com/archives/C053DPNGT/p1573727141287500 > Sounds like deliver specifies you must define the config does it say that in the doc or source code somewhere?
# Nov 14th 2019, 10:26 slackebot1 breaks the whole point
# Nov 14th 2019, 10:26 mehov I sat down to read the Email doc page and found it there: https://book.cakephp.org/3/en/core-libraries/email.html#sending-messages-quickly The logic made sense: > Sometimes you need a quick way to fire off an email, and you don’t necessarily want do setup a bunch of configuration ahead of time. Cake\Mailer\Email::deliver() is intended for that purpose It's just having to setup configuration for the method that's supposed to work quickly
# Nov 14th 2019, 10:25 challgren Sounds like deliver specifies you must define the config
# Nov 14th 2019, 10:24 challgren @mehov I’ve never seen Email::deliver() used. Most of the time it should be Email->send()
# Nov 14th 2019, 10:23 slackebot1 time (thinking that's what the config files are for, right?)
# Nov 14th 2019, 10:23 slackebot1 'default' => [ 'transport' => 'my-transport-name', 'from' => 'support@example.com', ], ], ``` If I explicitly define the from and transport inside `deliver()`, it works just fine. ``` \Cake\Mailer\Email::deliver($to, $subject, $message, [ 'from' => 'support@example.com', 'transport' => 'aws-ses', ]); ``` But I'd want to avoid having to specify the configuration every
# Nov 14th 2019, 10:23 mehov hi everyone, `\Cake\Mailer\Email::deliver($to, $subject, $message)` ignores the from and transport settings defined in `config/app.php` under the `default` profile. Is that the intended behaviour? When I call the basic way, the settings get picked up just fine ``` $email = new \Cake\Mailer\Email(); $email ->setTo($to) ->setSubject($subject) ->send($message); ``` Here are the settings under `config/app.php`: ``` 'Email' => [
# Nov 14th 2019, 10:20 jotpe Then check the encoding: https://superuser.com/questions/1187374/check-the-character-encoding-of-a-given-page-in-chrome
# Nov 14th 2019, 10:18 BOSS75 it shows box in some version of chrome
# Nov 14th 2019, 10:18 BOSS75 it works in updated browser
# Nov 14th 2019, 10:18 challgren Funny thing in slack they show up as boxes
# Nov 14th 2019, 10:18 jotpe Which browser do you use?
# Nov 14th 2019, 10:17 jotpe BOSS75: This works for me in Chrome 78 and Firefox 70: $this->set('test', '⮂');
# Nov 14th 2019, 10:11 conehead yeh, quiet now before he starts raging again :)
# Nov 14th 2019, 10:08 BOSS75 no sent as ⮂ .
# Nov 14th 2019, 10:04 BOSS75 okay
# Nov 14th 2019, 10:04 challgren isnt sent as UTF8
# Nov 14th 2019, 10:04 challgren Sounds like the browser doesn’t support UTF8 or the page isn’
# Nov 14th 2019, 10:03 challgren No worries plus admad become a mad :P
# Nov 14th 2019, 10:03 jotpe sounds like an encoding error? Do you use UTF8 everywhere (PHP Files, Webserver, DB, HTML, Browser?)
# Nov 14th 2019, 10:02 jotpe thanks @challgren
# Nov 14th 2019, 10:02 challgren FYI IRC users can’t see threads
# Nov 14th 2019, 10:02 jotpe sounds like an encoding error? Do you use UTF8 everywhere (PHP Files, Webserver, DB, HTML, Browser?)
# Nov 14th 2019, 10:00 jotpe Morning
# Nov 14th 2019, 09:58 BOSS75 I am sending data ($symbol = '⮂';) from controller . in my view how show that . In some browser it shows rectangle and some browser shows perfectly.
# Nov 14th 2019, 09:40 angelxmoreno thanks for steering me in the right direction
# Nov 14th 2019, 09:40 angelxmoreno that is where the JWT construction should exist since once authenticated by any means, the JWT can be accessible via the getIdentity function in the Authentication component
# Nov 14th 2019, 09:39 angelxmoreno the Identity class is basically a decorator for whatever the resolvers produce
# Nov 14th 2019, 09:38 angelxmoreno @ndm fyi, the solution was to add the JWT encoding to a custom Identity class. I was confusing Identifiers with the Identity classes. I also got rid of the ApiAuthenticator that previously extended the FormAuthenticator to return a JWT. Now, any authenticator that produces an Identity has access to the JWT