Log message #4204881

# At Username Text
# Sep 20th 2019, 14:37 jotpe No it's Talkstable and I'm doing `if ($this->Talks->save($talk)) {`
# Sep 20th 2019, 14:36 neon1024 Cake often kicks data off to the various tables, so if you’re in Posts but validating Tags, you should be in TagsTable
# Sep 20th 2019, 14:35 jotpe yes
# Sep 20th 2019, 14:35 neon1024 Are you in the right table?
# Sep 20th 2019, 14:35 neon1024 Erm with a param
# Sep 20th 2019, 14:35 jotpe hm. beforeRules isn't even triggered
# Sep 20th 2019, 14:34 neon1024 Create a `protected function _setStatus () { return 1; }`
# Sep 20th 2019, 14:34 neon1024 If you want to set a default, use a function in the entity
# Sep 20th 2019, 14:33 jotpe o.O
# Sep 20th 2019, 14:33 jotpe When I debug the entity in the controller, the status is not set
# Sep 20th 2019, 14:32 daniel.upshaw We could reach out to them? I don't mind trying that myself and looping you in
# Sep 20th 2019, 14:32 ricksaccous you're setting status
# Sep 20th 2019, 14:32 luizcmarin =>composer require --update-with-dependencies "cakephp/cakephp:4.0.*" result = Installation failed, reverting ./composer.json to its original content.
# Sep 20th 2019, 14:32 ricksaccous you aren't setting status_id in beforeRules
# Sep 20th 2019, 14:31 jotpe it's a int
# Sep 20th 2019, 14:31 jotpe status_id
# Sep 20th 2019, 14:31 daniel.upshaw It looks like dereuromark, markstory, and admad have done some stuff with SecurityComponent.php recently
# Sep 20th 2019, 14:31 ricksaccous or is status just a string
# Sep 20th 2019, 14:31 ricksaccous @jotpe are you setting the status id or the status entity?
# Sep 20th 2019, 14:30 jotpe is beforeRules not the right way?
# Sep 20th 2019, 14:30 jotpe I want to set the status by default for new entities. Why does the validation fail?
# Sep 20th 2019, 14:30 jotpe When I create a new Entity i get a validation error, saying the status is not set.
# Sep 20th 2019, 14:29 slackebot <jotpe>
# Sep 20th 2019, 14:27 neon1024 Why do params default to false and queries to null?
# Sep 20th 2019, 14:27 neon1024 `public function getParam($name, $default = false)`
# Sep 20th 2019, 14:27 neon1024 `public function getQuery($name = null, $default = null)`
# Sep 20th 2019, 14:27 neon1024 Why is this?
# Sep 20th 2019, 14:22 spriz and I was WTF when doing a review of it
# Sep 20th 2019, 14:22 spriz that's what it does now
# Sep 20th 2019, 14:22 neon1024 Then you can have an implicit controller method to update the entity
# Sep 20th 2019, 14:21 spriz yeah exactly
# Sep 20th 2019, 14:21 neon1024 Maybe have the postlink to go to a new method?
# Sep 20th 2019, 14:20 spriz Oh welp, I'll hack it for now :shrug:
# Sep 20th 2019, 14:20 spriz but getting there with an `''` could mean lots of things
# Sep 20th 2019, 14:20 spriz so all it does is post with `'image' => ''`
# Sep 20th 2019, 14:20 spriz we have a postLink in our case to delete the image,
# Sep 20th 2019, 14:19 neon1024 An extra checkbox feels like an approach which confirms the users intention
# Sep 20th 2019, 14:19 spriz Exactly
# Sep 20th 2019, 14:19 neon1024 Indeed, as empty might mean “I don’t want to change this” instead of “Delete this property”
# Sep 20th 2019, 14:19 spriz Yeah, I'm just not too sure what the best approach would be
# Sep 20th 2019, 14:19 neon1024 Perhaps it’s worth a PR, it does feel like a missing feature