Topic-icon Log out Redirect Not Working

Active Subscriptions:

None
11 years 4 months ago #50984 by eriglo
When logging out of my site redirect to home page is not working. Site remains on the same page. I have check all settings / modules and component.. Am I missing something?
The topic has been locked.
Support Specialist
11 years 4 months ago #50988 by mel
Replied by mel on topic Log out Redirect Not Working
On your site, I have tried multiple times to log in and log out with my Facebook credentials and it is redirecting me to the home page with all the pages I've tried. Please note, if you are running into this problem on a site other than droneographyhubnetwork.com/ please let me know.

1. Which URL are you on when you log in? I found that if I logged in via the 'Social network' tab on your site, if I went to any other tabs on your site like 'Hire' and 'Find Work', it didn't seem like I was logged in. Vice versa, if I logged in on something other than Social Network, I wasn't logged into the Social Network section. This seems like strange behavior for me, but I'm not sure if this is intended or not.
2. Are you logged in via a social network or with Joomla credentials?
3. Which URL are you on when you try to log out?
4. When you log out, are you logging out from the button at the very top right of the page, or something else?

I need to narrow down more reproducible steps, since it appears to be working for me.

-Melissa
The topic has been locked.
Active Subscriptions:

None
11 years 4 months ago #51040 by eriglo
Replied by eriglo on topic Log out Redirect Not Working
I know it seems strange but there are two diffident sites with shared menus to work as one site but no custom work. droneographyhub.com/ is the MASTER site and contains Joombri Freelance the other site is droneographyhubnetwork.com/ the SLAVE site and contains Joomsocial. When using master site login and log out things with JFB work properly. When using slave site JFB login is fine but during log out it will only return to the home page of SLAVE "'Jomsocial site".. I have settings in slave site JFB plug to redirect to Master site home page, however this is not whats happening.
The topic has been locked.
Support Specialist
11 years 4 months ago #51051 by alzander
What kind of link are you using for the logout menu link? My guess is that the menu item you created is an external URL type link and that may be what's causing the problem. Right now, I think our logout code only works for standard 'interior' Joomla menu items.

Let me know and we'll see what we can do to help.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 4 months ago #51062 by eriglo
Replied by eriglo on topic Log out Redirect Not Working
Your guess is correct, I'm using external URL type link in the slave site menu then selecting that menu item which contains the external URL link in JFB Plug. From there I test JFB plug and im getting redirected to the home URL of slave. Not the Home URL of master site as the per the settings.
The topic has been locked.
Support Specialist
11 years 4 months ago #51068 by alzander
Alright.. I just looked through our code and Joomla's code. I don't think what you want to do is possible. It's not SCLogin that is forcing the user to the home page, it's Joomla itself. When you click logout in the SCLogin module, we redirect to the Joomla user component and instruct it to log the user out. There is a check in the logout routine that verifies that the user will be redirected to an 'internal' URL. If not, it redirects the user to the home page.

I'd recommend checking this against the standard mod_login module to see if you can redirect to an external link using that module. If not, I think it may be a lost cause unless you want to edit Joomla core files. That's a solution, but you'd need to re-do the change every time you upgrade Joomla. The specific code is in the /components/com_users/controller/user.php file. In there, around line 107 is:

if (!JUri::isInternal($return))
{
$return = '';
}

// Redirect the user.
$app->redirect(JRoute::_($return, false));[/code]
You may be able to uncomment that check and/or force the redirect to whatever URL you want to there.

I hope that helps,
Alex

The topic has been locked.