Topic-icon json error javascript loading Facebook - maybe conflict?

Active Subscriptions:

None
I am getting the following error in a javascript when loading pages of my new website. it's caused by facebook code and I would suggest its from JCBConnect because I do not have any other Facebook connect applications, modules or plugins. Can someone check out the attached file or has someone encountered this before? I recently encountered the error on the homepage of the development site.

Error : JSON.parse: bad control character in string literal
You can disable/enable break notifications in panel's tab menu.
The topic has been locked.
Support Specialist
Elisabeth,
If you look at the HTML code from your page using the View Source option in Firefox, or any other extension, you can see that the Facebook Javascript library is being loaded twice. Search for "all.js" and you'll see 2 blocks of code one above the other. The first block is from JFBConnect. The 2nd block is from something else. You'll need to remove that extra block as it's causing your issue.

I don't know what's inserting that, or I'd help more. It could be included by a plugin, component, or something in your template directly.

Hope that helps get you started, and good luck,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #28856 by eliber
Hi there,
I suppose it is in the template as this one came including many social tools that I basically got rid of as none of them worked.
thanks,
Eliber
PS. Is that the file ext-all.js?
The topic has been locked.
Support Specialist
The full file that we load is:
connect.facebook.net/en_GB/all.js

I believe that's the same name of the 'other' file that was being loaded, but the language may be different. The site looks to be down now, so I can't check again.

As for removing the code, you won't remove ours. The code we include is from the /components/com_jfbconnect/libraries/facebook.php file and it's inserted dynamically as the page is generated. It's not hard-coded in your template or somewhere else. So, if you see that block of code in your template, you'll want to remove it all (or find the setting that will remove it). Again, some other plugin or component could be automatically inserting it as well, but it's not something we can help you locate unfortunately.

Hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #28935 by eliber
Hi there and thanks for the prompt answer.
I have managed to extract Facebook code from the website. there was quite a bit of it actually.
Anyway I reloaded and oddly I sometimes still get this error but I've checked again and I currently only see your code.
Maybe you could just check again. I'd be much obliged. :-)
Elisabeth
The topic has been locked.
Support Specialist
Elisabeth,
Testing on your live site, I'm not able to see any errors and everything looks good to me. I couldn't use the test domain you provided in your first post, as that looks down.

It's possible the code was still appearing on some pages if you have Caching enabled in Joomla. Until that cache is refreshed, the code would still be there on those pages.. and eventually would work it's way out.

So, keep an eye on things, but from what I can see, it seems right.

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

None
13 years 5 months ago #28966 by eliber
Hi there,

I did actually move the website to the live domain so that would be correct. Probably was my cache, I'm having a few issues with it of late.

Thanks a million,
Elisabeth
The topic has been locked.
Support Specialist
Elisabeth,
Glad it sounds like things are going better. If you switched domains, please make sure you re-run Autotune and hit the "Refresh" button in the FB App settings page to make sure you get updates for your new domain. That may help clear up some issues as well.

Best of luck,
Alex
The topic has been locked.