Topic-icon Logout Redirection BUG

Active Subscriptions:

None
12 years 4 months ago #40471 by joomleb
Hi to all,
on my Joomla 3.2.1 + JFBConnect 5.2.2 ...etc.

Setting:
SCLogin - Joomla Login Redirection URL: Same Page
SCLogin Joomla Logout Redirection URL: Same Page
JFBConnect - Configuration - New User Redirection: Same Page
JFBConnect - Configuration - Returning User Redirection: Same Page

When I Login (Indipendently if with Login Button/Facebook Button/Google+ Button...) I'm rightly redirected to the Same Page.
When I Logout (Indipendently if with Login Button/Facebook Button/Google+ Button...) I'm not redirected to the Same Page, but always to the Home Page.

Please, What am I missing ?
The topic has been locked.
Support Specialist
12 years 4 months ago #40479 by alzander
Replied by alzander on topic Logout Redirection BUG
When you logout, the SCLogin does some checks if the 'current page' is a Registered (or otherwise non-guest) page. If so, we redirect to the home page. Otherwise, the user would be automatically redirected to the Joomla login page because they'd be trying to view protected content.

That's my best guess as to what's happening. If not, I'd try setting the logout redirection to a specific menu item and see if that works. If not, it may be an indication of a bug or strange SEF routing issue.

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

None
12 years 4 months ago #40483 by joomleb
Replied by joomleb on topic Logout Redirection BUG
If I understood, setting all "Same Page" when you logout, the SCLogin does some checks:
- if the 'current page' is a Registered (or otherwise non-guest) page. If so, we redirect to the home page.
- if the "current page" is a Guest page it keep me on the Same Page.

Well,
1 - The page where I'm logging out is a normal Guest
2 - I'm not using any SEF component and/or strange settings, just turned on in Joomla > Global Configuration > Search Engine Friendly URLs

Is there anything I can do to help us on understanding ?
The topic has been locked.
Support Specialist
12 years 4 months ago #40490 by alzander
Replied by alzander on topic Logout Redirection BUG
We'd have to test. Can you:
* Create a test account we can login with on the front-end and let us know those credentials
* Let us know a few pages on your site that would be good to test on (ones that are public and others that are registered).
* We shouldn't need admin credentials yet.. just leave the settings as they are so we can test how it's currently configured.

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

None
12 years 4 months ago #40495 by joomleb
Replied by joomleb on topic Logout Redirection BUG
Hi Alex,
* Sent you credentials by PM
* All test site pages are "Public"
* You are a normal registered user, if you need something else, please, let me know!
The topic has been locked.
Support Specialist
12 years 4 months ago #40524 by alzander
Replied by alzander on topic Logout Redirection BUG
I received your PM. However, you didn't let me know what site I should be testing on. I went to the last site in Autotune that you performed a check from, but I couldn't find a login area anywhere.

Please let me know a lot more information about where and how to test.

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

None
12 years 4 months ago #40528 by joomleb
Replied by joomleb on topic Logout Redirection BUG
Hi Alex,
sorry but I don't understand what you mean.
What's happen is too simple: on my Joomla 3.2.1 + JFBConnect 5.2.2 ...etc. installation

Setting:
SCLogin - Joomla Login Redirection URL: Same Page
SCLogin Joomla Logout Redirection URL: Same Page
JFBConnect - Configuration - New User Redirection: Same Page
JFBConnect - Configuration - Returning User Redirection: Same Page

In front end, through the SCLogin module:
- When I Login (Indipendently if with Login Button/Facebook Button/Google+ Button...) I'm rightly redirected to the Same Page.
- When I Logout (Indipendently if with Login Button/Facebook Button/Google+ Button...) I'm not redirected to the Same Page, but always to the Home Page.
PS with Registered User and All pages are "Public"

Do you understand me ?
The topic has been locked.
Support Specialist
12 years 4 months ago #40529 by alzander
Replied by alzander on topic Logout Redirection BUG
I understand the problem. You have never let me know which URL I should test on. In this thread, or your Private message, you never included the domain name for where I should be testing this issue.

Please provide the domain name that I can test on and we'll gladly look into it further.

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

None
12 years 4 months ago #40537 by joomleb
Replied by joomleb on topic Logout Redirection BUG
Alex, Yes, I wrote you in my PM !

Before the credentials I wrote: go to...
The topic has been locked.
Support Specialist
12 years 4 months ago #40555 by alzander
Replied by alzander on topic Logout Redirection BUG
Very sorry for the confusion. I'm not sure how I missed the URL in your Private Message. I know I looked multiple times, but obviously, I missed it.

The issue seems to be from the fact that you're using /index.php/ in your URLs, like /index.php/blah/123 I'm not sure why that's not working, but that's honestly not a common configuration of Joomla, so there may just be a bug we're not aware of in the SCLogin module. If you could please test a minor code change, it may fix you right up. To do so, please edit the /modules/mod_sclogin/helper.php file. Around line 112, you'll see:
if (!$url)
        {
            $uri = JURI::getInstance();
            $url = $uri->toString(array('scheme', 'host', 'port', 'path', 'query'));
        }
Please update that 2nd to last line so it looks like:
$url = $uri->toString(array('port', 'path', 'query'));
Please test and see if that works. If not, please update it to:
$url = '/' . $uri->toString(array('port', 'path', 'query'));
I can't tell if the leading / is necessary, but it may be.

Between one of those 2 changes, I think the logout redirection should start working. Please test and let us know you're results.

Thanks, and good luck,
Alex
The topic has been locked.