Log message #4048866

# At Username Text
# 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
# Jul 6th 2017, 12:02 jeremyharris Make sure you are rendering the block "blcok_name" [sic] somewhere
# Jul 6th 2017, 12:00 jeremyharris postLink does that on purpose. The link has an onclick that submits the form it generates
# Jul 6th 2017, 11:45 rudy1976s $action is populated with correct data
# Jul 6th 2017, 11:44 rudy1976s what is wrong in this ? https://gist.github.com/rudy1976s/8690284ef26ff123b01332c674f3caa7 the link generated has always <a href=“#”
# Jul 6th 2017, 11:30 jarard01 it works :)
# Jul 6th 2017, 11:23 jarard01 preg_quote is what I need I think
# Jul 6th 2017, 11:22 jarard01 casmo, that's the issue just tested
# Jul 6th 2017, 11:19 casmo The variable probably contains characters that are unescaped
# Jul 6th 2017, 11:18 jarard01 I know the pattern is correct, the issue is the pattern contains a variable
# Jul 6th 2017, 11:15 jeremyharris jarard01 casmo is probably right. This is a helpful tool for debugging reg exp: https://regex101.com
# Jul 6th 2017, 11:15 casmo Might wanna look to preg_quote
# Jul 6th 2017, 11:14 casmo Guess your $string got unescaped regex characters
# Jul 6th 2017, 11:12 jarard01 that give me an other error: Unknown modifier 'd'
# Jul 6th 2017, 11:11 casmo Try " instead of '
# Jul 6th 2017, 11:09 jarard01 trying to match a string, the debug confirms the match but the if doesn't fire
# Jul 6th 2017, 11:09 jarard01 https://gist.github.com/spacebiscuit/b9bd0fa0e7d1226d6b7e2d4a36006dfc
# Jul 6th 2017, 11:09 jarard01 does anyone see anything wrong with this regex
# Jul 6th 2017, 10:45 juststeveking :slightly_smiling_face: thanks for helping me get my head straight
# Jul 6th 2017, 10:45 savant yep its singular in cake2 unfortunately.
# Jul 6th 2017, 10:44 juststeveking Sorted sorry! I was calling `$this->Audits->find('all)` when it is `$this->Audit->find('all)`
# Jul 6th 2017, 10:44 savant do you have a stacktrace?
# Jul 6th 2017, 10:44 juststeveking @savant I am getting this error: ` Call to a member function find() on a non-object`
# Jul 6th 2017, 10:43 savant yeah that works fine in cake2
# Jul 6th 2017, 10:43 juststeveking yes unfortunately