Needs work
Project:
Drupal for Facebook
Version:
6.x-3.x-dev
Component:
Facebook Connect
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2011 at 19:41 UTC
Updated:
1 May 2012 at 15:43 UTC
I noticed some problems with the Facebook login block, the users profile picture was still visible, although the user was logged out.
If I emptied the cache table, the connect button would reappear. I think this has to do with the fact that the blocks output was being cached (using memcache as caching engine). Looking at the code I solved it by setting the cache parameter in hook_block (default is cache by role). This if from line 188
foreach (fb_get_all_apps() as $fb_app) {
$d = 'login_' . $fb_app->label;
$items[$d] = array(
'info' => t('Facebook Connect Login to !app',
array('!app' => $fb_app->title)),
'cache' => BLOCK_NO_CACHE,
);
}
Anyone else experiencing this problem, should this be patched?
Comments
Comment #1
Dave Cohen commentedSounds like a good idea to me. I'll add that to my local stuff and look for any side effects.
Comment #2
tahiticlic commentedThe problem occurs on D7 also.
When connected once upon FB, the FB Connect login block stays showing the user name, for the user (even if deconnected from FB) AND for other anonymous users.
This is a cache issue, but I can"t figure where.
On perf settings, blocks cache is enabled.
Comment #3
Dave Cohen commentedIn this module, for now, we're fixing things in 6.x first then 7.x.
Since that block markup was originally authored, I've made it easier to markup pages so that javascript displays the right things when user logs into/out of facebook. Rather than not cache the block, a better fix would be to tweak the markup to take advantage of that. (although not caching that block is a good workaround in the meantime)
Comment #3.0
Dave Cohen commentedtypo