PDA

View Full Version : Problem JS breaking Facebook Connect


nick-harper
03-22-2011, 11:54 AM
I have had a problem for a while on www.skybluestalk.co.uk that Facebook Connect doesnt want to work at all.

When looking at the source code the code at the bottom is incomplete

I have tried it with the default theme and turned all mods off but still no luck. I have re upgraded without any joy and re uploaded all of the clientscript files.

I have noticed that when a PM is received and there is added JS in the footer to alert me, the source code changes in the footer so the complete code is there and it works.

At the minute my code ends:

<script type="text/javascript">
<!--
YAHOO.util.Event.onDOMReady(
function()
{
vBfb = new vB_Facebook({
appid : "138910852808964",
connected : 0,
active : 0,
autoreg : 1,
feed_newthread : 1,
feed_postreply : 1,
feed_blogentry : 1,
feed_blogcomment : 1,
feed_newarticle : 1,
feed_articlecomment : 1
});
}
);
-->
</script>


When it should be:

<script type="text/javascript">
<!--
YAHOO.util.Event.onDOMReady(
function()
{
vBfb = new vB_Facebook({
appid : "138910852808964",
connected : 0,
active : 0,
autoreg : 1,
feed_newthread : 1,
feed_postreply : 1,
feed_blogentry : 1,
feed_blogcomment : 1,
feed_newarticle : 1,
feed_articlecomment : 1
});
}
);
-->
</script>
<div id="fb-root"></div>


--------------- Added 1300798830 at 1300798830 ---------------

I have just bodged it by removing the if statement in footer and adding <div id="fb-root"></div> manually.