When fb_social.module 1.x and fb.module are both enabled, fb.module is completely broken by fb_social. I had a client run into this and it was tricky to track down.

I'm experimenting with the attached patch. It seems to work OK so far.

The patch looks worse than it is, because my editor strips trailing spaces. Really I'm adding

if (typeof(window.fbAsyncInit) == 'undefined') {

around all the javascript added to the footer. Since fb.js defines that function and initializes facebook's JS, this effectively prevents fb_social from initializing it.

Members fund testing for the Drupal project. Drupal Association Learn more


Vote_Sizing_Steve’s picture

574 bytes

Attached is a cleaner patch, although I had to move some of the changes around to maintain php syntax rules.

Unfortunately, my d7 site still breaks when users log out and try to add nodes (http://ivotesize.com/en/node/add/ivotesize-survey).

tribe_of_dan’s picture

I couldn't get this patch to apply.

$ git apply fb_social.module.patch
fb_social.module.patch:7: trailing whitespace.
  if (typeof(window.fbAsyncInit) == 'undefined') {
fb_social.module.patch:15: trailing whitespace.
error: patch failed: fb_social.module:605
error: fb_social.module: patch does not apply
DamienMcKenna’s picture

Issue summary: View changes
Status: Needs review » Closed (duplicate)
Related issues: +#852582: Integrate with another fb* modules

Neither patch can be committed as is - the first patch includes a bunch of erroneous formatting changes, the second one wraps PHP code in JS code and will do nothing but throw errors. There are also two other issues that attempt to resolve the problem in other ways: #852582: Integrate with another fb* modules and #1293826: Add ability to not include fb-root settings for compatibility with other Facebook modules. I'm going to suggest combining efforts in #852582.