Log message #4051215

# At Username Text
# Jul 12th 2017, 15:48 jeremyharris I wonder what FB’s definition of active is here
# Jul 12th 2017, 15:47 jeremyharris it’s active, you checked it in the controller
# Jul 12th 2017, 15:47 jeremyharris @ericadeefox interesting. can you give me a link to the SDK, specifically where that exception is thrown?
# Jul 12th 2017, 15:46 jeremyharris you need to use the “on” key
# Jul 12th 2017, 15:46 jeremyharris jarard01 conditional validation here: https://book.cakephp.org/3.0/en/core-libraries/validation.html#conditional-validation
# Jul 12th 2017, 15:46 ericadeefox means my session isn't active during these integration tests, which I knew, but I'm not sure what to do about it.
# Jul 12th 2017, 15:46 jeremyharris jarard01 sorry the link is this: https://book.cakephp.org/3.0/en/core-libraries/validation.html#custom-validation-rules
# Jul 12th 2017, 15:46 jarard01 but it still is
# Jul 12th 2017, 15:45 jarard01 i tried retuning 'false' so that to test, the validation shouldn't ever be called
# Jul 12th 2017, 15:45 ericadeefox oh, forgive me, it's a FacebookSDKException thrown: `Session not active, could not store state.`
# Jul 12th 2017, 15:45 jeremyharris or you can always debug($context) to see exactly what it’s getting
# Jul 12th 2017, 15:45 jeremyharris jarard01 then it’s probably not right :P have you checked the docs? they show what is in $context: https://book.cakephp.org/3.0/en/core-libraries/validation.html
# Jul 12th 2017, 15:45 ericadeefox FacebookSDKException, it is.
# Jul 12th 2017, 15:44 jarard01 jeremy no
# Jul 12th 2017, 15:44 ericadeefox `Session not active, could not load state.`
# Jul 12th 2017, 15:44 jeremyharris jarard01 does it work?
# Jul 12th 2017, 15:44 ericadeefox let me go grab it for you...
# Jul 12th 2017, 15:43 jeremyharris @ericadeefox I wonder if we’re looking at the right thing. do you know exactly what exception is being thrown by FB
# Jul 12th 2017, 15:43 jarard01 does this look like a correct conditional validation rule: https://gist.github.com/spacebiscuit/ad07583634b8d732ad532e7f429477f3
# Jul 12th 2017, 15:43 ericadeefox returns `true`
# Jul 12th 2017, 15:42 ericadeefox uhhhh
# Jul 12th 2017, 15:41 ericadeefox oh, in the _controller_? my bad lol
# Jul 12th 2017, 15:41 jeremyharris in the controller?
# Jul 12th 2017, 15:41 ericadeefox it's gonna throw me an error saying that `$request` doesn't exist.
# Jul 12th 2017, 15:41 jlroberts i dont understand what debug() has to do with it at this time... I just want to be able to use cake shells from the Installer.php, it makes sense, you load up a project with composer, and then immediately get into plugin migrations
# Jul 12th 2017, 15:41 jeremyharris @ericadeefox if you throw a dd($this->request->session()->started())` on the top of one of your get actions, what does it show?
# Jul 12th 2017, 15:40 jeremyharris maybe, but would you want to always use Cake\Functions\debug() to call global functions ?
# Jul 12th 2017, 15:40 jlroberts ive read about autoloaders, there is specifically a spot for functions.php
# Jul 12th 2017, 15:39 jeremyharris since the functions don’t exist within a namespace, the autoloader wouldn’t be able to find and thus require the file for you
# Jul 12th 2017, 15:39 jlroberts heh
# Jul 12th 2017, 15:39 jlroberts perfect, thats awesome, i think its supposed to autoload the functions.php file too though
# Jul 12th 2017, 15:39 ericadeefox so. ok. doing a `$this->get()` or `$this->post()` request doesn't start a session, seemingly. I started each test with a `$this->get()` request and each of them still threw me 500s. hmm.
# Jul 12th 2017, 15:38 jeremyharris that is loaded with composer’s autoloader. underneath the hood, it simply reads the namespace and discovers where the file is (based on conventions agreed upon by the PSR), and require’s the file for you
# Jul 12th 2017, 15:38 jlroberts if it doesnt bootstrap cake, then how does 'use Cake\Utility\Security;' get autoloaded? im just curious...
# Jul 12th 2017, 15:37 jlroberts ok
# Jul 12th 2017, 15:36 jeremyharris the installer doesn’t “bootstrap” cake for you. that bootstrap process is what require’s the file in question
# Jul 12th 2017, 15:36 jlroberts but why is it not global in Installer.php is the question
# Jul 12th 2017, 15:35 jeremyharris if they were in a namespace, we’d need to do something like Cake\debug($var) everytime. they’re global for convenience
# Jul 12th 2017, 15:35 jeremyharris remove the function_exist calls and you’ll see everything works just fine in a typical request (it is not loaded multiple times)
# Jul 12th 2017, 15:35 slackebot ~ Ferrero Roche
# Jul 12th 2017, 15:35 slackebot Command sent from Slack by neon1024: