Log message #4141602

# At Username Text
# May 16th 2018, 23:45 rightscoreanalysis if i want to display the full month, what do I use: $podcast->created->i18nFormat('M')
# May 16th 2018, 21:18 itamer Hi, cakephp2, I have a controller that uses 3 models. All of a sudden it isn't loading those models. Possibly a server upgrade, all other functionality on the big site is working normally. Any ideas?
# May 16th 2018, 20:48 itmpls $this->loadComponent('Auth', ['authenticate' => ['Custom' => [ 'refreshCallback' => [$this, 'refreshCallback'] . ] ] ] ); how come in refreshCallback, $this->getRequest()->getData() is blank when in chrome, the request payload is token: a093930a039a and the method type is POST?
# May 16th 2018, 19:33 pekka_slack @jeremyharris Awesome! Thanks!
# May 16th 2018, 19:32 jeremyharris Henrik: https://api.cakephp.org/3.5/class-Cake.Validation.Validation.html#_email
# May 16th 2018, 19:29 pekka_slack Is there a way to validate e-mail without having a field for it in an entity? In other words, I just want to check if the e-mail looks alright, and then act accordingly and not save it. I know PHP has its validator for this but wanted to check if CakePHP has something like that built-in?
# May 16th 2018, 19:14 nk-sonu Thanks @phantomwatson..
# May 16th 2018, 19:13 nk-sonu @phantomwatson English is just a language, Language only used to express your words to another person. I agreed it was my typo mistake. But when you able to understand the words and situation then language ends
# May 16th 2018, 19:07 nk-sonu Ok. I checked on GitHub now..
# May 16th 2018, 19:06 admad Yes, the plan is to have 4.0 out before/by end of the year.
# May 16th 2018, 19:06 nk-sonu https://github.com/cakephp/cakephp/wiki/4.0-Roadmap
# May 16th 2018, 19:05 nk-sonu Ah. sorry. I was just confirming.
# May 16th 2018, 19:05 phantomwatson Maybe that's how they punctuate rhetorical questions. :)
# May 16th 2018, 19:05 admad So not sure whether you are asking me or telling me.
# May 16th 2018, 19:04 admad nk-sonu: having a period as well as question mark at end of a statement doesn't make much sense in English.
# May 16th 2018, 19:01 phantomwatson I think people would dig that.
# May 16th 2018, 19:01 nk-sonu Admad hi. .I got news from a blog that CakePHP 4 will release in this year.
# May 16th 2018, 19:01 admad @phantomwatson I'll look into this later and if there isn't a simpler way will add an option to the behaviour to prevent deletion of nodes with children
# May 16th 2018, 19:00 phantomwatson Cool. Thanks for confirming that for me.
# May 16th 2018, 18:59 admad So overriding table's delete would be easiest option for now
# May 16th 2018, 18:58 admad Hmm right, while the transaction is still running it's not possible to check if a node has children since the behaviour has deleted them
# May 16th 2018, 18:58 phantomwatson It prints out the content of the view block named "script".
# May 16th 2018, 18:58 rightscoreanalysis the book's explanation isn't clear to me
# May 16th 2018, 18:58 rightscoreanalysis can anyone tell me what this does: <?= $this->fetch('script') ?>
# May 16th 2018, 18:53 phantomwatson I'm not sure if I'm looking at it wrong, or if the behavior isn't behaving (heh) as intended, or what. Thought it was worth bringing up in here and getting the support channel's insight.
# May 16th 2018, 18:53 saeideng :+1:
# May 16th 2018, 18:53 saeideng >the issue is with my docker container lol :|
# May 16th 2018, 18:52 phantomwatson In my testing, I'm calling `$event->stopPropagation();` and returning `false`, and it appears to not be working. By the time `FooTable::beforeDelete()` is called, the child records have already been deleted.
# May 16th 2018, 18:52 pmoraes the issue is with my docker container lol
# May 16th 2018, 18:52 pmoraes I found the issue
# May 16th 2018, 18:51 saeideng @pmoraes gist your code if you have problem with flash
# May 16th 2018, 18:51 admad @phantomwatson either that or returning false, don't remember exactly right noe
# May 16th 2018, 18:50 phantomwatson You mean with `$event->stopPropagation();`?
# May 16th 2018, 18:50 admad @phantomwatson doesn't matter if the behaviour deletes them first. The transaction is still open so just stop the event from table and cause a revert
# May 16th 2018, 18:43 rightscoreanalysis can i use the css and script helper to include an entire folder rather than individual files
# May 16th 2018, 18:40 slackebot new behavior that extends TreeBehavior and overloads `TreeBehavior::beforeDelete()` to handle this logic?
# May 16th 2018, 18:40 phantomwatson I'd like to set up a `beforeDelete()` callback for a tree-structured table that prevents the deleting of a record if it has children. But `TreeBehavior::beforeDelete()` is invoked and deletes all of a record's children _before_ the table's `beforeDelete()` is invoked. Is my instinct right that I'd need to overload `FooTable::delete()` and put the "has children" check in _there_ to accomplish this instead of using a callback? Or make a
# May 16th 2018, 17:04 Diego_ $saved = $this->_associations->saveParents() return true :/
# May 16th 2018, 16:53 jeremyharris Also, you don't need the reference (and$pagamento) in the loop, and don't need the unset
# May 16th 2018, 16:52 jeremyharris You might have to add some temporary debug statements here to figure out what's going on: https://api.cakephp.org/3.5/source-class-Cake.ORM.Table.html#1773-1838
# May 16th 2018, 16:52 Diego_ there are a debug before save and after save