Module fb_social uses the default cache setting for blocks: DRUPAL_CACHE_PER_ROLE "The block can change depending on the roles the user viewing the page belongs to." So when block is cached, different pages will have the same block content. For example, tag fb:comments includes attribute href that points to current page, so we should never cache block globally like this.

Instead we should use DRUPAL_CACHE_PER_PAGE "The block can change depending on the page being viewed.".

See related API documentation: http://api.drupal.org/api/drupal/modules!block!block.api.php/function/hook_block_info/7

This issue might also be related to http://drupal.org/node/1265224

UPDATE.
Using BLOCK_NO_CACHE is the only way it warranties that the hook page_alter is adding the scripts to the page.
See patch #2

Comments

paulihuhtiniemi’s picture

And here's a patch that adds DRUPAL_CACHE_PER_PAGE cache setting for all blocks.

paulihuhtiniemi’s picture

Issue summary:View changes

fixed link to API page

corbacho’s picture

Using BLOCK_NO_CACHE is the only way it warranties that the hook page_alter is adding the scripts to the page.

ferdi’s picture

Status:Needs review» Fixed

committed the patch from here https://drupal.org/node/1265224

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.