Log message #4048915

# At Username Text
# Jul 6th 2017, 13:56 obinoob Hi, I have a form text field that must be obligatory in case a checkbox is ticked I wonder how can I validate such? I Suppose I need to add some custom rule and return boolean based on checkbox value right?
# Jul 6th 2017, 13:48 Wodan__ Alright, thank you for all your help
# Jul 6th 2017, 13:48 dakota Yes, `composer update` (Assuming your composer.json version contraints allow you to), then have a quick look through https://book.cakephp.org/3.0/en/appendices/3-4-migration-guide.html
# Jul 6th 2017, 13:47 Wodan__ I did a composer update earlier
# Jul 6th 2017, 13:47 Wodan__ ^ Is there a fail safe way to update?
# Jul 6th 2017, 13:47 dakota Ah, then use ->config(
# Jul 6th 2017, 13:47 Wodan__ running 3.3.16
# Jul 6th 2017, 13:46 dakota And yes, that’s what you need to be using
# Jul 6th 2017, 13:46 dakota What version of cakephp are you using?
# Jul 6th 2017, 13:46 dakota It does if you are using cakephp 3.4
# Jul 6th 2017, 13:45 Wodan__ $this->Security->setConfig('unlockedActions', [...]); Does not exist
# Jul 6th 2017, 13:45 Wodan__ Scratch that, the document method
# Jul 6th 2017, 13:39 Wodan__ How would this work when I make a call to a specific action from a different controller to a URL?
# Jul 6th 2017, 13:39 Wodan__ https://book.cakephp.org/3.0/en/controllers/components/security.html#disabling-security-component-for-specific-actions
# Jul 6th 2017, 13:39 adriencs hey, do the Shell can handle a script interruption such as `CTRL-C` ?!?!?
# Jul 6th 2017, 13:39 Wodan__ Thank you for your help @dakota
# Jul 6th 2017, 13:36 Wodan__ Hmm...
# Jul 6th 2017, 13:35 dakota Wodan__, disable security component for ajax requests (There is a “unlocked” method). Security component aims to prevent form tampering, if you are building a post body in javascript, then things become a little bit tricky
# Jul 6th 2017, 13:31 jeremyharris Thanks @genellern :beers: a lot of people help more often then I, I've just been around recently :)
# Jul 6th 2017, 13:31 Wodan__ So you suggest disabling it for AJAX requests?
# Jul 6th 2017, 13:30 cleptric We should add HeyTaco :)
# Jul 6th 2017, 13:30 cleptric You can say: “Thanky you @jeremyharris” :slightly_smiling_face:
# Jul 6th 2017, 13:29 genellern Is there any way to give kudos here? I want to thank @jeremyharris for his continued help to others
# Jul 6th 2017, 13:17 cakephp693 how to hide errors eventually generated from $this->Model->query(SQL)
# Jul 6th 2017, 13:16 cakephp693 hi
# Jul 6th 2017, 13:14 jarard01 thanks yes I found the issue, db and username in wrong place!
# Jul 6th 2017, 13:14 rudy1976s @jarard01 it seems DB connection lost
# Jul 6th 2017, 12:47 juststeveking I am pretty sure I am loading that, I will have to look for the docs :slightly_smiling_face: thank you @dakota
# Jul 6th 2017, 12:46 dakota Wodan__, The security component doesn’t play nicely with ajax requests.
# Jul 6th 2017, 12:46 dakota juststeveking Yes, with the containable behaviour
# Jul 6th 2017, 12:44 juststeveking In cake2 is there a way to eager load relationships through the ORM?
# Jul 6th 2017, 12:42 jarard01 bad db credentials - :)
# Jul 6th 2017, 12:39 jarard01 anyone seen this before: Error: SQLSTATE[HY000] [2002] No such file or directory
# Jul 6th 2017, 12:31 Wodan__ Hence, this is for sending a AJAX POST request
# Jul 6th 2017, 12:31 Wodan__ It makes me suspect that I am supposed to pass an object in the POST request which seems highly unusual..
# Jul 6th 2017, 12:30 Wodan__ It considers this function: https://github.com/cakephp/cakephp/blob/master/src/Controller/Component/SecurityComponent.php#L341
# Jul 6th 2017, 12:29 Wodan__ I hope my question is clear enough..
# Jul 6th 2017, 12:29 Wodan__ Then however I get a missing fields error message, so I am to a loss as to what to do so correctly.
# Jul 6th 2017, 12:28 Wodan__ I use "$this->request->param('_csrfToken');" set the value for the Template and use that in my XHR request back to the server
# Jul 6th 2017, 12:28 Wodan__ Hey Everyone, I am having a slight issue with the security component. When I do a post request I get a 'missing _Token' error message. Is there anybody that has experience with this?
# Jul 6th 2017, 12:24 rudy1976s yes it is rendered where it is expected but the link generated point to # instead of the url provided