Widgets don't display

Jun 14, 2012 at 4:38 PM

I'm having an issue trying to get any widgets to display. I have everything setup with the appid and secret and I've added the widget to several of the zones and layers and I don't see anything. I was able to debug and everything looks like it's getting wired up. The one thing I don't understand is that there aren't any stylesheets in the module and many references to "fb-" styles. I figured this was by design but still strange. Any idea what could be going on (tried running on default theme with same result)? I also added text to one widget and it does display fine so I think it maybe a stylesheet problem or something.

Coordinator
Jun 14, 2012 at 5:59 PM

Facebook Suite displays social widgets with Facebook's JS SDK. That's why you don't see any CSS: social widgets really are divs that get replaced by the SDK. Those "fb-" classes are also needed by the SDK to find the divs.

My best guess is that somehow the FB SDK is not loading for you. Do you see FacebookSuite.js referenced in the html output? Is a $.facebookSuite.initialize(... line there?

Jun 14, 2012 at 7:44 PM

Yeah, it appears that is the case Piedone. I'm not getting FacebookSuite.js to show up in the html. Any idea why it wouldn't register?

Jun 14, 2012 at 7:58 PM

It looks like the OnResultExecuting method is not being called where the resourceManager wires up the FacebookSuite.js. It gets into the constructor during debug but for some reason it doesn't get into OnResultExecuting or OnResultExecuted.

I'm running on Orchard 1.4.2 by the way.

Coordinator
Jun 14, 2012 at 8:19 PM

Thanks for debugging. Could you check whether any exceptions are thrown? (I mean, set VS to show every thrown exception. Otherwise Orchard swallows non-fatal ones.)

Jun 15, 2012 at 3:13 AM

Piedone, I finally got this working today after hacking on it for a bit. I proved the module worked on a fresh Orchard code base so I had to clean up my dev environment and I was able to get the OnResultExecuting to work. However, the widgets still wouldn't display due to another jQuery file that was apparently conflicting in our theme. Thanks for the pointers and nice module by the way.

Coordinator
Jun 15, 2012 at 1:38 PM

Awesome, glad it finally worked for you. Also take a look at Facebook Suite Connect for FB-enabled login.