Closed (fixed)
Project:
Facebook Connect
Version:
7.x-2.0-beta4
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2009 at 18:11 UTC
Updated:
5 Dec 2012 at 09:07 UTC
Jump to comment: Most recent file
Comments
Comment #1
Nigeria commentedI get this error to...initially all will be well the all of a sudden then page will trn to an Access Denied error...turn FBConnect off all is well turn it back on again and it goes haywire.
I also noticed that it seems as if it is looping trying to get some sort of authorisation from Facebook...it looks as if after doingthis a number of times it turns to the Access Denied situation.
Comment #2
gkapoor commentedI'm not having that problem. It works like a charm for the most part but in case of login through comment or blog for e.g.
http://www.siteexample.com/user/login?destination=node/152%2523comment-form
It gives "not authorized error".
Thanks,
=gk
Comment #3
greedy43 commentedI have a constant refreshing page after logging in, this is for any page visited after logging in.
Comment #4
mitchjaz commentedI have the same issue. If you log in through Drupal, and then connect, it takes you to http://www.example/user/1/fbconnect and the profile page is displayed.
If you log in through Facebook connect, it redirects you to: http://www.example/user/login after logging in and you receive an access denied error.
Comment #5
gilgabar commentedIt sounds like there might be multiple issues here, but the issue that mitchjaz describes above is the same one that I have encountered and I believe I have fixed.
The issue is that logging in via facebook connect will redirect you to the same page from which you logged in after you are logged in. So if you clicked the login button on the home page that is where you end up after logging in. And when you login via user/login that is where you end up after logging in, but a logged in user gets an access denied message if they try to visit user/login, since it doesn't make sense for a currently logged in user to be there. Ultimately there is probably a more useful message that page could give logged in users than 'access denied', but that's beyond the scope of this fix.
The attached patch just checks if the page is 'user/login', if it is it redirects to 'user', otherwise it behaves normally and redirects to the same page you were on.
Comment #6
gilgabar commentedThe same issue also occurs with 'user/register' and 'user/password'. The attached patch accounts for those as well.
Comment #7
gkapoor commentedThanks for the patch
I'm not a Drupal developer and not sure how to apply individual module patch. I couldn't find any information on how to, can you please point to instructions?
Thanks again,
=gk
Comment #8
gilgabar commentedThere are some instructions here: http://drupal.org/patch/apply. They may be more complicated than you need to make things in this case though. First make sure you are using the current version, 6.x-1.0-beta7. The patch is for a single line (line 182) of fbconnect.module. Open that in a text editor and replace the line:
with this line:
Save, refresh your browser, then log in and see if it fixes the problem for you. Your description sounds like it might be a separate issue, but hopefully this will resolve your problem too.
Comment #9
abraham commentedClosing this as beta8 uses $form_state['redirect'] to redirect.
Comment #10
Cheek commentedThis was fixed in beta8? I still get access Denied when logging in for the second time.
First time visit > click login > click facebook on login form > create new account facebook connect > homepage (logged in)
Logout
Second time visit > click login > click facebook on login form > access denied (logged in)
PS. is it possible to use template.php to replace the two options when creating a account and remove the list style from the login page?
Comment #11
maxelrod commentedThis does not seem to be fixed in beta8, However...
I just applied the patch offered up by gilgabar ( in item #8 above ) and it works just fine. The trick is there is a new location for where to place the line of code to fix this:
For Beta8 the drupal_goto function call has moved to line 409. (was 182) So on line 409 I just changed:
drupal_goto($_GET['q']);
to:
drupal_goto(($_GET['q'] == 'user/login' || $_GET['q'] == 'user/register' || $_GET['q'] == 'user/password') ? 'user' : $_GET['q']);
And it now works much better.
Cheers,
Mike
Comment #12
Cheek commentedJust want to mention I fixed this by using the '403 2 login' module, which I already had installed. And linking the 'login' button on my site to 'site.com/user'
So, someone clicks the login link 'site.com/user' > '403 2 login' shows login instead of access denied (403) > after logging in it redirects to the user's profile page because it's redirecting to the page you came from.
Comment #13
yrre7 commentedsubscribe
Comment #14
vectoroc commentedComment #16
chrisphotonic commentedI'm having a terrible time with this. I keep getting access denied on one site. Any ideas?
Comment #17
danieljulia commentedSame here, still having this problem. Don't close.
The problem appears using Drupal for facebook, and twitter,
so must be in core not in those modules.
Wouldn't it be possible to redirect from user/register automatically if user is already registered/logined?
Comment #18
suudy1 commentedI am facing this issue with Drupal 7 version of the module. I am using 7.x beta 4 version of FBConnect module.
Please advice.
Comment #19
jcisio commentedRevert the status. The last patch was for 6.x-1.x and was more than 3 years ago. If you have problem with 7.x-2.x please file a new issue, with detailed information of course.