Topic-icon Error: Another Facebook extension is installed

Active Subscriptions:

None
5 years 7 months ago - 5 years 7 months ago #64577 by webdevtim
This comes from Auto Tune.

Fail: Another Facebook extension is installed, including the Facebook Javascript library, and may conflict.


Alex, what is the fastest way to troubleshoot this. I checked plugins and disabled all social media plugins except JFBConnect and I still get the Fail message.

Is this your code?
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Last edit: 5 years 7 months ago by webdevtim.
The topic has been locked.
Support Specialist
5 years 7 months ago #64581 by mel
Nope, the two scripts right above that one are ours.

I see the following in your source:
<div class="fb-quote"></div>

When we include the quotes widget with JFBConnect, we try to add a URL to that widget. Could you try checking out the social integration options in K2 one more time? I don't see any other obvious choices. Unless there are comments in the code from the other extension developers, we usually have to go extension by extension in the backend to see what else is adding it too.

-Melissa
The topic has been locked.
Active Subscriptions:

None
5 years 7 months ago #64582 by webdevtim
Thanks Melissa.

I have checked, and in K2 global options, "Enable Facebook meta tags" is set to "No" and in plugins Social-Profiles - K2 is disabled. In fact all social media plugins besides JFB Connect are disabled.

This leaves me with the unpleasant task of going from extension to extension looking for something that loads the Facebook JS.

I have written a new lightweight template for another organization that doesn't use K2. I use flex-box CSS properties extensively and Bootstrap where I have no other choice.

It has been so long since there has been an update to K2 that I have to wonder if there are now vulnerabilities that may have been exploited, that have gone unaddressed by the K2 team since the last update in August, 2017. I have been using a plugin from one of the original K2 team members and he is no longer with K2, though wishes them well. Makes me think that perhaps Fotis Evangelou has thrown in the towel; there never was a K2 3.0, though it had been advertised last 5 years ago. When I look to find if there has been any progress on K2 3.0, all I can find is: First beta of K2 version 3 is here - 21 July 2014, 22:51 by Fotis Evangelou.

Have you had any experience with FlexiContent. Does it provide useful standard Joomla interface tools without being overly heavy?
The topic has been locked.
Support Specialist
5 years 7 months ago #64586 by alzander
Yeah, K2 is an unfortunate situation. K2 v3.0 was abandoned. They discussed that in the v2.8.0 announcement blog post , though there's multiple notes about versions coming out quicker after 2.8 and, well, that didn't happen. Unsure what the plan is there.

In general, my feeling, is that Joomla content can do just about everything other extensions can do nowadays. There are some specifics that Flexicontent or K2 offered, but I'd really re-evaluate core Joomla content before you go down that route.

Sorry we can't help too much with the Facebook Javascript. If you have access to the terminal of the server, you could run the following command:
grep "xfbml=1" * -R
That will search all files for xfbml=1, which is in that other Facebook inclusion. It may help you narrow down what extensions to look at first.

All the best!
Alex
The topic has been locked.
Active Subscriptions:

None
5 years 7 months ago - 5 years 7 months ago #64592 by webdevtim
Yeh, I have terminal access to our account so I will try your solution.

My problem is that I have to make content creation as easy as using Facebook, or people won't bother. that is why I look to CCKs.

At the same time Joomla has come a long way. I have created a pure Joomla template with one addition, that Lefteris from the K2 project developed, called Econa image manager, that automatically sizes images on upload to pre designated sizes and allows me to assign those to media queries automatically as well. This way all the user has to do is upload the image to the article and the size of the image is handled by code so that it displays pleasingly across all devices. If I let people size their images the site ends up looking like a scrap book.

Here was the result:
-sh-4.1$ grep "xfbml=1" * -R

components/com_k2/templates/default/item.php:
<script>
  (function(d,s,id){
    var js,fjs=d.getElementsByTagName(s)[0];
    if(d.getElementById(id)) return;js=d.createElement(s);
    js.id=id;
    js.src="//connect.facebook.net/<?php echo $this->item->langTagForFB; ?>/sdk.js#xfbml=1&version=v2.5";
    fjs.parentNode.insertBefore(js,fjs);
  }
  (document,'script','facebook-jssdk'));
</script>
So it is K2 after all even with all the K2 social media turned off.
Last edit: 5 years 7 months ago by webdevtim.
The topic has been locked.
Active Subscriptions:

None
5 years 7 months ago - 5 years 7 months ago #64594 by webdevtim
OK, I got rid of the other Facebook SDK js.

I couldn't find a setting where I could disable that Facebook js script inclusion, so I just went to templates/my_template/html/com_k2/templates/default/item.php and components/com_k2/templates/default/item.php and deleted the Social Media button section in those files and that got rid of the
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.11';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
entry.

I went back to "Autotune" and it is now happy and gives a "pass" for everything.

Oh yes, after deleting the Social Media section in the first instance of item.php I ran grep again and it turned up the other instance of item.php. Thanks so much for suggesting grep, what a powerful tool.

And thank you too Melissa, you sent me in the right direction from the outset.
Last edit: 5 years 7 months ago by webdevtim.
The topic has been locked.
Support Specialist
5 years 7 months ago #64601 by alzander
I'm glad to hear you found the culprit! If you need anything else, as always, you know where to find us :)

Thanks,
Alex
The topic has been locked.