× Joomla Facebook Connect support forum

Topic-icon Redirect to same page After FB Logout

Active Subscriptions:

None
I have problem whit my site and the module. I need logout and stay to the same page. Joomla module work perfect. Tnx for helpme!
The topic has been locked.
Active Subscriptions:

None
im edit facebook.php on com_jfbconnect/libraries

$logoutUrl = base64_encode('index.php');

to

$logoutUrl = base64_encode($return);

its correct? now work but NOT for JOOMLA LOGOUT!


How to FIX JOOMLA LOGOUT?
The topic has been locked.
Support Specialist
15 years 9 months ago #4758 by alzander
We're looking into a proper solution. We should have something for you by the end of the day, and include it in the next release.
The topic has been locked.
Support Specialist
15 years 9 months ago #4767 by alzander
That code you provided should work. We actually just implemented it on our site (and will have a better fix with true logout selection if desired) in the next release. Missed that when we moved some paramaters from the login module.

Anyways, the best we can guess is that it's an encoding problem. Since you're willing to tinker, can you try:
In the /components/com_jfbconnect/controller.php, in the logout() function, add the following bolded line to properly decode the return URL:
$return = JRequest::getVar('return');
$return = html_entity_decode($return);
$return = base64_decode(JRequest::getVar('return'));

We say this because if you look at the HTML on most of your pages, the return link ends in %3D%3D. That's common for encoded links as they a lot of the time end with == (no clue why). I'm hoping there's just something with your server not auto-decoding those, and the PHP call above will do it.

Please let us know. If that doesn't work, feel free to send us an admin login and we can debug it directly on your server. We'll be playing some more as well.

Thanks!
The topic has been locked.