# |
Jul 14th 2017, 15:14 |
jeremyharris |
or extend the component and do a bit of copy/paste for your own needs |
# |
Jul 14th 2017, 15:13 |
mikesmoniker |
Fork the plugin, make the PR, and in the mean time use your fork via Composer. |
# |
Jul 14th 2017, 15:13 |
jeremyharris |
this plugin makes me a bit sad panda |
# |
Jul 14th 2017, 15:12 |
jeremyharris |
if it’s in the component’s initialize, you can disable the session check directly on the property in your beforeFilter |
# |
Jul 14th 2017, 15:12 |
jeremyharris |
my suggestion would be to send a PR that instantiates this line: https://github.com/akkaweb/AKKA-CakePHP-Facebook-Plugin/blob/master/src/Controller/Component/GraphComponent.php#L229 in initialize() instead |
# |
Jul 14th 2017, 15:11 |
ericadeefox |
huh, so it _is_ the plugin that loads FBRLH quickly |
# |
Jul 14th 2017, 15:11 |
jeremyharris |
so there’s nowhere that you can disableSessionCheck on the helper, because the akka component doesn’t let you |
# |
Jul 14th 2017, 15:10 |
jeremyharris |
it does not have any DI or allow you to overwrite it at a useful point |
# |
Jul 14th 2017, 15:10 |
jeremyharris |
the akka component instantiates the redirect helper within its beforeFilter, and executes logic on it immediately |
# |
Jul 14th 2017, 15:09 |
jeremyharris |
here’s the unfortunate part |
# |
Jul 14th 2017, 15:09 |
jeremyharris |
ok |
# |
Jul 14th 2017, 15:09 |
ericadeefox |
it doesn't start a PHP session, but it requires a PHP session to be started in order to write the `FBRLH['state']` object, which stores this key used so that the app and FB can communicate. logins and account access and that sort of thing. |
# |
Jul 14th 2017, 15:08 |
jeremyharris |
I don’t remember why and don’t have the link handy |
# |
Jul 14th 2017, 15:08 |
mikesmoniker |
Or did I miss something? |
# |
Jul 14th 2017, 15:08 |
mikesmoniker |
I’m confused why the FB SDK would be starting a PHP session. |
# |
Jul 14th 2017, 15:07 |
jeremyharris |
omg that helper :( |
# |
Jul 14th 2017, 15:06 |
jeremyharris |
which fails in the cli context |
# |
Jul 14th 2017, 15:06 |
ericadeefox |
it's not the helper causing the problems, it's Facebook's SDK. nothing to do with Akkaweb: https://github.com/akkaweb/AKKA-CakePHP-Facebook-Plugin |
# |
Jul 14th 2017, 15:06 |
jeremyharris |
it does a session_check/start |
# |
Jul 14th 2017, 15:06 |
mikesmoniker |
It’s weird that the view helper is causing problems since all it seems to do is spit out properly formatted HTML. I don’t see it really doing anything related to FB or Cake’s session stuff. |
# |
Jul 14th 2017, 15:06 |
jeremyharris |
link to akkaweb might be helpful too |
# |
Jul 14th 2017, 15:05 |
ericadeefox |
so that action wouldn't exist, what you'd mentioned. I'm gonna throw a stacktrace now. |
# |
Jul 14th 2017, 15:05 |
ericadeefox |
I should probably clarify: it's the Facebook SDK itself throwing the exception, not the helper created by Akkaweb |
# |
Jul 14th 2017, 15:04 |
jeremyharris |
better yet, throw a `stackTrace()` into the vendor code that is causing the session error to see exactly where it’s being called from |
# |
Jul 14th 2017, 15:03 |
jeremyharris |
not creating a new one, using the one that exists on the template |
# |
Jul 14th 2017, 15:03 |
ericadeefox |
hmm. I added it to a controller and it did nothing, but I didn't try a template. |
# |
Jul 14th 2017, 15:03 |
jeremyharris |
ok, so as a test of a single action, if you add $this->Facebook->disableSessionCheck to the top of the template, does it work? |
# |
Jul 14th 2017, 15:03 |
ericadeefox |
`FBRLH['state']` refers to the object that sets the state to the session |
# |
Jul 14th 2017, 15:02 |
ericadeefox |
`$this->Facebook->whatever()` is how the helper works |
# |
Jul 14th 2017, 15:02 |
jeremyharris |
so it ajax loads some php script from somewhere? |
# |
Jul 14th 2017, 15:02 |
jeremyharris |
in your templates, do you do something like $this->FBRLH->whatever() ? |
# |
Jul 14th 2017, 15:02 |
ericadeefox |
rather, it's _why_ the helper is first used, I suppose--and why it makes an appearance on every page of the site, even tho I haven't begun building much features. |
# |
Jul 14th 2017, 15:01 |
ericadeefox |
it's where the helper is first used |
# |
Jul 14th 2017, 15:01 |
jeremyharris |
how does JS factor into injecting PHP? |
# |
Jul 14th 2017, 15:00 |
ericadeefox |
the component is first loaded in the app controller, after it's installed and all that. then the Javascript SDK is loaded onto the default layout, hence a FBRLH object is created on each page. |
# |
Jul 14th 2017, 14:59 |
jeremyharris |
or do you use new FBWhateverHelper in each template? |
# |
Jul 14th 2017, 14:59 |
jeremyharris |
how/where is the helper itself instantiated? that’s the first goal to find. is it created as a cake helper in a view? |
# |
Jul 14th 2017, 14:58 |
ericadeefox |
more frustrating than having to fish through hundreds of lines of HTML in the command line looking for the error messages I need? |
# |
Jul 14th 2017, 14:57 |
jeremyharris |
would just be more frustrating |
# |
Jul 14th 2017, 14:57 |
ericadeefox |
so how do I break em, is what I'm asking? |
# |
Jul 14th 2017, 14:57 |
jeremyharris |
it wouldn’t recreate in the browser because sessions work there ;) |