Starting with 2.0-alpha4, this module added a check to see if a Facebook plug in was used on the page and only add the footer script if this was the case. We have one page where the only buttons used are inside a quick tab (from the Quick Tabs module) and in this situation, the check returns FALSE.

I got around this by having the menu hook set this global variable explicitly.

global $_fb_script_init;
$_fb_script_init = TRUE;

I'm not sure exactly how the module works or if this edge scenario is even worth accounting for. We only use quick tabs and this module in a very limited way.

I wanted to leave this trail in case people ran into a similar issue and to bring it to attention in case someone has the time to work on it and felt it was important.

Thank you for the module!

End note: I have not tested the quick tabs / fb_social connection too thoroughly, but it makes sense that this was the cause since we aren't using any other system such as panels / panelizer.

Comments

ferdi’s picture

I can see how that use case would be an issue. I'm not sure how to best solve it though. have to look more closely at quicktabs module.

damontgomery’s picture

I think the best quick option, at least for the time being, is to provide a configuration option that says, "Only add Facebook code to pages where Facebook plug-ins are used. (note: this module may have issues with other modules such as Quick Tabs if this option is checked. If your buttons and other plug-ins are not displaying on a page, try unchecking this option.)"

There are likely only a few situations where this issue would occur. Most sites that use Facebook buttons (and I'm guessing here) also integrate the buttons in the header / footer, so at least one button would be on each page.

Thanks again.

samhassell’s picture

This issue seems to occur when the block is used within a panels variant. In my case, its the Panels Everywhere site template. I traced it back to the variable not getting set as well.

edit: duplicate at http://drupal.org/node/1441746

oskar_calvo’s picture

I have the same problem.

When I try to use the fb_social into a panel-page I get those error messages:

Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (line 152 of /home/oscar/webapps/www/drupal/drupal7/sites/all/modules/contrib/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (line 153 of /home/oscar/webapps/www/drupal/drupal7/sites/all/modules/contrib/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (line 162 of /home/oscar/webapps/www/drupal/drupal7/sites/all/modules/contrib/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_block_content_type_render() (line 166 of /home/oscar/webapps/www/drupal/drupal7/sites/all/modules/contrib/ctools/plugins/content_types/block/block.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (line 289 of /home/oscar/webapps/www/drupal/drupal7/sites/all/modules/contrib/ctools/includes/content.inc).
Warning: Attempt to assign property of non-object in ctools_content_render() (line 293 of /home/oscar/webapps/www/drupal/drupal7/sites/all/modules/contrib/ctools/includes/content.inc).

thanks

Oskar