Login Redirect not working

Login Redirect not working

I'm using the JFBCLogin module for user login to my site. In Basic Options it is set to redirect on Joomla login and on the line below it is set to redirect to a member menu/page viewable for "registered" users. But no one is redirected to that page but just keep standing on the same page. If I change the redirect page to a menu/page that have "public" access level then it works. But the idea for login is to get access to "registered" levels and pages and of course the redirect need to work for that - i guess. Is there any setup anywhere else I need to check or is this an error? Thanks.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

Not sure, we'll have to look into it a little further to understand why a registered page may not work. Can you let me know a few more things, just to make sure I have a good understanding of your configuration:
1) The redirect you're talking about is strictly for users logging in with Joomla accounts.. not using the Login With Facebook button, correct?
1a) If so, is the Login With Facebook process working as you'd expect?
2) Do you have the "Automatically Login Facebook Users" setting enabled? If so, please try disabling it and testing.

Beyond that, if you could, please post (or Private Message) a link to the front-end of your site. We can take a look at the HTML and see if we can determine where the redirect is trying to go, and figure out if that's right or not, which will help us narrow things down.

Thanks!
Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Online
24145 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

I also have this issue.. I want the login to redirect to a menu item for registered users only.. However it will not redirect to the page if the menu item is for registered users.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

alzander wrote:

1) The redirect you're talking about is strictly for users logging in with Joomla accounts.. not using the Login With Facebook button, correct?
1a) If so, is the Login With Facebook process working as you'd expect?
2) Do you have the "Automatically Login Facebook Users" setting enabled? If so, please try disabling it and testing.

Re 1) No. It's both logging in strictly using Joomla (your module) and logging in using FaceBook login (your module).
Re 1a) No. Logging in through FaceBook does not redirect either - just stays on the same page.
Re 2) No. I do not have "Automatically Login Facebook Users" setting enabled.

I noticed above that I'm not the only one having this problem so I'm just wondering does it work on your own computer? If yes, what version do you use? I'm on version 3.3.0.

Thanks.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

You've found a bug in our code. It's due to a subtlety of Joomla that I missed when I was updating JFBConnect to work with 1.6.  Below is a temporary code fix you can use until we put the next release out (which should be relatively soon).

In modules/mod_jfbclogin/helper.php around line 30, replace

Code:


$menu = JSite::getMenu();
$item = $menu->getItem($itemId);
if ($item)
   $url = $item->link . '&Itemid=' . $itemId;

with

Code:


$app = JFactory::getApplication();
$router = $app->getRouter();

$db = JFactory::getDbo();
//Derived from mod_login Joomla 1.6, but modified to be backwards compatible with 1.5
$query = "SELECT link FROM #__menu WHERE published=1 AND id=".$db->quote($itemId);
$db->setQuery($query);
if ($link = $db->loadResult())
{
    if ($router->getMode() == JROUTER_MODE_SEF)
    {
        $url = 'index.php?Itemid=' . $itemId;
    }
    else
    {
        $url = $link . '&Itemid=' . $itemId;
    }
}

This was tested on my localhost with Joomla 1.6.3

Want to stay up-to-date on new releases and development efforts?
Follow us on Twitter @sourcecoast and @mandreae

mel
Melissa
useravatar
Offline
3604 Posts
Website 
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

Just one note to add: The code above is only for the JFBCLogin module and only changes the behavior when a user is logging in using Joomla credentials (username/password fields). For Facebook user's that are logging in, the redirection settings can be found in the main JFBConnect component configuration area under the Login/Logout Redirections tab. These settings work as expected from our testing, but if you do find problems with registered pages or something similar when logging in with a Facebook account, just let us know!

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Online
24145 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

Works... Thanks heaps!

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

Yes, now it works. Thank you.

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Login Redirect not working

Fantastic! Thanks for the feedback and confirmation of the fix. Again, this will be in the next release of JFBConnect, due out in a few days, so you won't have to re-implement it.

Alex

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Online
24145 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11684
Total Polls:
0
Total Posts:
49054
Posts today:
6
User Info
 
Total Users:
47818
Newest User:
normastainfo
Members Online:
2
Guests Online:
724

Online: 
ganapati, alzander
Social Stream
SourceCoast Joomla Social Extensions
Friday, 25 May 2018
JFBConnect 8.0 Coming Soon! Stay tuned.
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program