× Joomla Facebook Connect support forum

Topic-icon Facebook connect button not showing up in some module positions in IE

Active Subscriptions:

None
14 years 18 hours ago - 14 years 18 hours ago #3700 by albertyuen2000
Hi:

I have implemented your facebook login module and it is not appearing in the login position (top right hand corner) of my website. I have two login position where one is on the top right and the other one the 'left' position. When I place the module on the left, then the 'facebook connect' button shows up. But when I put it on 'login' (top right), then it doesn't show up.

Can someone shed some light on why this may happen?

Please go to my website to take a look ( Titlehttp://www.puxzycat.com ). I have looked at the code and I can't find anything wrong with it.

BTW, it works on Firefox and Safari. i haven't tested it on Chrome.

Thanks...

Albert
Last edit: 14 years 18 hours ago by albertyuen2000.
The topic has been locked.
Active Subscriptions:

None
Guys at JFBConnect:

Any updates?

Albert
The topic has been locked.
Support Specialist
There's a javascript error on your site. I can't quite figure out where it's coming from, so you may have to do some trial and error in disabling some modules to see what it starts working. However, in IE, if I go to the following page, you can see the login button appear:
www.puxzycat.com/?template=rhuk_solarflare

This is forcing the rhuk_solarflare template to load, which is much less intensive and does not do a ton of it's own javascript.

Please test and let us know what you find and we can help you debug further if necessary. IE is very finnicky with javascript where everything must be perfect, whereas Firefox and Chrome are much more forgiving to problematic code.
The topic has been locked.
Active Subscriptions:

None
Hi:

I have uninstalled a bunch of stuff and I still can't find the error. I can't find the Javascript error that you are talking about either. I have turned on the error reporting in IE and it's not reporting any errors.

There are two places in my website that will show the facebook connect. It's on the top right hand corner of the webpage that's not showing up.

Digging a little deeper, I found the following:

I put the your modules in two separate locations in my webpage. What I found is that only one of those modules will have the facebook connect button appear in the website (only happens in IE, not on firefox). Digging a little deeper, it seems like there are some javascript code missing.

<script type="text/javascript">
if(document.namespaces) {
// IE
document.namespaces.add("fb", "www.facebook.com/2008/fbml");
} else {
var htmlElement = document.getElementsByTagName('html')[0];
htmlElement.setAttribute('xmlns:fb', 'www.facebook.com/2008/fbml');
}
</script>
<script type="text/javascript" src="static.ak.connect.facebook.com/js/api_li...FeatureLoader.js.php">
<script type="text/javascript">
window.addEvent('domready', function()
{FB_RequireFeatures(["XFBML"],
function() {
FB.Facebook.init("78ba102cca86c1b6f6cda4dfe63a88ec", "/zh/jfbconnect");
});
})
;</script>


Basically, that code is missing from the first login and therefore the Facebook connect button is not showing. On the second login, the code is there, therefore it is showing the Facebook Connect icon. If I disable the second login module, then the first login module’s missing code appears again, hence the facebook connect icon appears again. I dug a little deeper and I commented the following lines from your facebookhelper.php.

self::$addNamespaceCalled = true;
self::$initFbApiCalled = true;

Then it worked again.

Am I breaking anything by doing this?


Any advice will help.

Albert
The topic has been locked.
Support Specialist
No, including the code twice shouldn't be a problem. It shouldn't also be necessary, so we'll investigate why that's the cause.

Basically, we try to make it only include once on the page as it may cause a slight delay on the first time that a user hits the page (after that, the javascript and code will be cached by the user). The code should only execute after the page has loaded, and then 'detect' any login buttons (or other FB code) and make it work. This is implemented according to FB's recommended guidelines. However, again, your current workaround should be fine.

We'll let you know if we figure out the cause and solution to your problem.
The topic has been locked.