# |
Jul 14th 2017, 15:27 |
jeremyharris |
after the component is added to your controller, do $this->ComponentName->FacebookRedirect->disable |
# |
Jul 14th 2017, 15:27 |
ericadeefox |
I wonder if I can from my app controller now, hm. not like that's a long-term solution |
# |
Jul 14th 2017, 15:26 |
ericadeefox |
I'm just trying to figure out how to call `disableSessionStatusCheck()` now... |
# |
Jul 14th 2017, 15:25 |
iqu |
Jeremyharris: this->url->image in my case could do it. thanks |
# |
Jul 14th 2017, 15:24 |
jeremyharris |
correct |
# |
Jul 14th 2017, 15:24 |
ericadeefox |
nope, the object is up in initialize and nowhere else. now, I'm not supposed to create a new FBRLH object in the tests, right? because that would be meaningless |
# |
Jul 14th 2017, 15:22 |
jeremyharris |
iqu like $this->Url->build? |
# |
Jul 14th 2017, 15:22 |
jeremyharris |
yep, assuming you overwrote their beforeFilter to not re-create the object |
# |
Jul 14th 2017, 15:22 |
ericadeefox |
ok now I've got all that in initialize instead of beforeFilter, so I should be able to use `disableSessionStatusCheck()` now? |
# |
Jul 14th 2017, 15:21 |
iqu |
is there like routeHelper? i have tag like <video class="video-poster" poster='img/temp/intro2.jpg'> and i have not found any "beuatiful" way to to print route 'img/temp/intro2.jpg' |
# |
Jul 14th 2017, 15:17 |
ericadeefox |
^^very good point!!! four days of discomfort and mild sobbing is beans compared to what could've been experienced by several other devs |
# |
Jul 14th 2017, 15:17 |
jeremyharris |
np, happy to help |
# |
Jul 14th 2017, 15:16 |
mikesmoniker |
Remember: the next dev will appreciate the PR. |
# |
Jul 14th 2017, 15:16 |
ericadeefox |
thank you so much for holding my hand through that lol |
# |
Jul 14th 2017, 15:16 |
jeremyharris |
it was a multi-headed monster you had to deal with, fun fun |
# |
Jul 14th 2017, 15:15 |
jeremyharris |
for next time :) |
# |
Jul 14th 2017, 15:15 |
ericadeefox |
^^yes |
# |
Jul 14th 2017, 15:15 |
ericadeefox |
^^yes, yes it is. a stack trace would've been immensely helpful. |
# |
Jul 14th 2017, 15:15 |
jeremyharris |
if they had it in initialize, the problem would be solved in 2secs, though you still would have needed to see that it was created there |
# |
Jul 14th 2017, 15:15 |
ericadeefox |
but, yeah, no, y'all are right. I don't know why I didn't look in the plugin's vendor code rather than the SDK when I was trying to figure out how FBRLH gets built so quickly. |
# |
Jul 14th 2017, 15:15 |
jeremyharris |
they are throwing it, but following the code up through the process to see *where* is the important lesson here |
# |
Jul 14th 2017, 15:14 |
ericadeefox |
hell, I'd assumed since it was the FB SDK throwing me the exception, that I ought to be skulking around _there_ instead of the plugin |
# |
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 |