Posted by mattsson on January 23, 2013 at 10:02am
2 followers
Jump to:
| Project: | Drupal for Facebook |
| Version: | 7.x-3.3-beta5 |
| Component: | Facebook Connect |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
I have read README.txt and the official documentation, and found no mention of this.
I am logged in with a user who has his facebook account connected. I click the logout button (http://site.com/user/logout) and I get a breakpoint in Firefox's Script console:
// click handler
FB_Connect.logoutHandler = function (event) {
// If we need to reload, go to front page.
Drupal.settings.fb.reload_url = Drupal.settings.fb_connect.front_url;
if (typeof (FB) != 'undefined' && FB.getAuthResponse()) {
try {
FB.logout(function () {
// Logged out of facebook. Session change event will log us out of drupal and
});
// Facebook's invalid cookies persist if third-party cookies disabled.
// Let's try to clean up the mess.
// @TODO: is this still needed with newer oauth SDK???
//FB_JS.deleteCookie('fbs_' + Drupal.settings.fb.apikey, '/', ''); // apikey
if (FB.getUserID()) { // @TODO: still needed with newer oauth SDK???
// Facebook needs more time to log us out. (http://drupal.org/node/1164048)
return false;
}
} catch (e) {
return false;
}
} else {
debugger;
return true;
}
};The breakpoint is at debugger; near the end. If I disable the breakpoints then sometimes the site logs me out and sometimes nothing happens and I have to click the log out button several more times.
I am kind of at a loss as to what is causing this.
Comments
#1
I'm not sure what causes that. I don't remember whether I put debugger in there because it was happening to me, or if I was just trying to see if it was ever reached. I'd like to know how to reproduce that. Does it happen every time?
When stopped, is FB undefined?
When you continue from the debugger, does it log you out as expected?
Have you done something like log out of facebook in another tab before you log out of Drupal?
#2
Thanks for the response! It does not happen every time.
I am unable to reproduce the breakpoint right now, so I'm not sure about this. I just can't logout from the site when I click Logout, but I don't get the breakpoint.
Unsure, since I can't reproduce it right now.
Nope. I log in, browse the site a bit, and then try to log out.
#3
If it does happen again, please try to answer those questions. It might be mishandling a case where a token expires (they expire over time). I'm sure I put that debugger line in there to either see if it happens or try to figure out when it does. It would only affect users with a js debugger open (presumably, just you). But if you really don't like it you can comment out that line.
But if you ever reproduce please re-open this issue.