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

Dave Cohen’s picture

Status: Active » Needs review

Sounds like a good idea to me. I'll add that to my local stuff and look for any side effects.

tahiticlic’s picture

Version: 6.x-3.1 » 7.x-3.x-dev

The 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.

Dave Cohen’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Needs review » Needs work

In 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)

Dave Cohen’s picture

Issue summary: View changes

typo