Topic-icon Error 310 (net::ERR_TOO_MANY_REDIRECTS) with mod_sclogin + CB

Active Subscriptions:

None
Hi Alzander,

This one is really driving me crazy and I spent half of the day trying to figure out what's going on without success.
So here is the deal:

1. I am using Joomla 1.7 with CB 1.7 and mod_sclogin
2. User Creation: Facebook User Only
3. Facebook new user login redirection setting is set to NO (both in jfbc and CB)
4. SEO setting : SEF URL is on in Joomla Global configuration (Server is Apache over Linux)
5. Both login.php and logout.php files are overridden in templates/my_template/html/mod_sclogin/ folder. Overrides are only related to CSS changes, adding new class etc.
6. Also (not sure if this related or not) my index.php file contains a call to JFactory::getUser(); to determine the login state of the user (like $user =& JFactory::getUser(); if ($user->guest) {...})

Ok, given the above situation,

1. Whenever I try to login using "Login With Facebook" button, I get Error 310 too many redirects
2. I tested in all the browsers - Chrome/ IE/ FireFox/ Safari.
3. In the backend, however, I can see that the user is actually created in Joomla.
But for some reason it does not show up in front.

You can check the situation here:
www.dwbiconcepts.com/v1/ (login or register button is located at top right corner of the page)

Please help and let me know if you need Super User access.

Regards,
The topic has been locked.
Support Specialist
First off, for #6, I"m not sure what you're doing here, but if you're modifying the main index.php file, it's probably not the right way to do it. Generally, you shouldn't ever modify core Joomla files. There's always exceptions, but there's likely a better way to do whatever you're trying.. if you want a little advice on how.

As for your issue, not sure exactly why you're running into that problem, but check the following first:
1) The JFBConnect User and JFBConnect Authentication plugins are both enabled
2) Try turning of SEF (temporarily) to see if that fixes things.
3) Try disabling the Community Builder Profile plugin (temporarily) to see if that fixes things

If any of the above fixes it, let us know. If it's #2 or #3, we'll gladly help you figure out how to re-enable those settings.. just need to know the cause before we can find the solution.

Thanks,
Alex
The topic has been locked.
Support Specialist
Oh. Another thing to try:
4) Disable the "Automatically Login Facebook Users" setting.

Again, keep us posted, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
Ok, I did the above tests and here is the finding:

1. If "JFBConnect Authentication plugin" and "Automatically Login Facebook Users" both are enabled - the site gives a "Internal Server Error" and I can not even open any page.

2. If "JFBConnect Authentication plugin" is disabled and "Automatically Login Facebook Users" is set to yes ---> the site gives too many redirects.

3. If "JFBConnect Authentication plugin" is enabled but I disable the "Automatically Login Facebook Users" ----> the site works perfectly (but off course it can not auto login the facebook user).

So I guess - the issue is when we set "Automatically Login Facebook Users" to yes. (By the way I have temporarily deleted the code mentioned in #6 now).

So any idea?
The topic has been locked.
Active Subscriptions:

None
Also, the Internal Server Error mentioned in the #1 above - only appears if I have my facebook account open in my browser window (I guess then it tries to auto login). But if I am logged out of facebook then the error does not come
The topic has been locked.
Support Specialist
Both plugins definitely need to be enabled for things to work. Not sure why the Auto login functionality is causing issues, but does normal login and registration work with that setting DISabled? Just trying to localize it to definitely being the problem.

Also, have you tried disabling SEF Urls to see what happens?

Finally, can you let me know what other User and Authentication plugins you have enabled? That may help come up with some possible conflicts, if we know of any.

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

None
Normal logging and registration works just fine even if "Authentication - JFBConnect Facebook" is disabled.

Something is definitely there with SEF also.
- If I disable SEF, Internal Server Error does *NOT* come (but it can't auto login even though autologin setting is yes)
- If I enable SEF, and autologin and jfbc authentication both - Internal Server error.

Following User plugins are enabled:
User - JFBConnect Facebook
User - JLinked User
User - Joomla!

Following auth plugins are enabled:
Authentication - JFBConnect Facebook
Authentication - Joomla
The topic has been locked.
Support Specialist
Akashmitra,
Good progress, and I think you're good to go. We'll definitely have to do some more investigation as to the actual cause, but hopefully my notes below will help explain some things.

Basically, the problem came down the JLinked User plugin being enabled. When that was enabled, the login loop happened. We're not sure why, but fixing it was simply a matter of re-organizing the JFBConnect Authentication, User, and System plugins. The combination we used on the site seems to be working now with everything enabled, but obviously test and let us know if you run into any issues.

Finally, unrelated, but just so you know, when I enable Error Reporting in the Global Config area, there's multiple PHP notices that are being spit out. They all seem to be from your template, and can only be seen if you open up the HTML of the page. The notices are all related to trying to use some variable "baseurl". Not required to fix as they aren't PHP errors, but something in your template might not be getting the right value, and could cause you some other issues.

Really hope this gets you going, and we'll definitely be investigating further and hopefully have some fixes in the next JFBC or JLinked releases so that ordering isn't an issue.

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

None
Looks great upon initial testing. Let me play with this for some time, will confirm you again if I don't find any more issue.
The topic has been locked.
Support Specialist
No problem.. take your time, and I really hope you're good to go now. Of course, should you run into anything else, you know where to find us.

Thanks,
Alex
The topic has been locked.