Topic-icon Intermittent failure to load facebook buttons - Invalid App Id?

Active Subscriptions:

None
Hi there,

I have an intermittent issue with JFBConnect in that it will only load the Facebook button(s) on every third or forth page load (issue seems to appear randomly).

I note the Console error when the problem exists is:
Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
FB.getLoginStatus() called before calling FB.init(). all.js:56
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Yes, it would appear obvious that I haven't entered the correct App Id but that isn't the case and in fact the Facebook button(s) do load and work correctly every few page loads? I've checked the Facebook App Id and it is correct. Autotune is all green lights. When the buttons do load - they work exactly as they should.

The template is a Gavick template which does have built in Facebook integration, which I realise can cause problems. That function is disabled and no Facebook App Id is entered.

I also have OBSocialSubmit installed (different Facebook App ID) but I have also tried the site with that component disabled and the problem still exists?

There's no other Facebook connection on the site (that I'm aware of at least :-) )

It's not a browser issue as the problem exists over all browsers. I really can't think of anything else that may be causing the problem?

The site is still under development and ordinarily offline but I have made it temporarily available for you to access to take a look via the /index.php page.
Here: www.gamestrader.com.au/index.php (will default to temporary index.html landing page if you hit the home button). You can really see the issue clearly demonstrated if you visit this page: www.gamestrader.com.au/log-in (Facebook buttons everywhere!)

Any advice greatly appreciated. Thanks for your time.
The topic has been locked.
Support Specialist
The problem is definitely coming from your Gavick template. If you look at the HTML of your page, there's a block that starts with:
<div id="gkfb-root"></div>
In that block is another load of the Facebook Javascript library (connect.facebook.net/en_US/all.js). That load is re-initializing the Facebook Javascript without any API key. You'll need to disable the social integration in your Gavick template even further to make sure it's not re-including that library file.

I'm not sure of the specifics on how to do this. You may need to contact Gavick. I know in the past there has been a few settings in their templates for "Enable Social Integration", "Facebook API Key" and even some setting for Facebook Like buttons and such. They should all likely be disabled.

I hope that helps narrow things down.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Thank you Alex. You were perfectly correct. The Gavick template has a "Facebook Like buttons in Articles" option which had been overlooked and was still enabled. Disabled = problem gone. Your buttons of course take care of all that for me.

Thank you for your incredibly prompt response and moreso for providing the simple answer to an even simpler problem.

I'll head on over the to JED and deposit an appropriate rating for this incredible piece of coding. Very much appreciated. Thanks again.
The topic has been locked.
Support Specialist
Glad to hear we could help narrow things down and get you going quickly. As always, should you need anything else, just let us know.

As for the JED review, we'd really appreciate it and look forward to seeing it:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks, and good luck,
Alex
The topic has been locked.