Topic-icon Conflict with EasyBlog

5 years 7 months ago - 5 years 7 months ago #64546 by chramb1
My site with JFBConnect and EasyBlog seems to have a conflict.

If I disable the JFBConnect system plugin (as an experiment), EasyBlog will show the Facebook like icon as well as use Facebook comments. If I enable the JFBConnect system plugin, these are not shown. The Javascript and such remains the same, they're just not shown on the page.

I note a post on their support forum from 2016 in which someone had this issue, and the EasyBlog guys said it was a conflict. The user said he came here and got it fixed, but I don't see anything more there, and nothing here in the fora.

I note also that even though I've turned on K2 integration, comments and like buttons aren't showing in my K2 articles, either, nor are they showing on standard Joomla articles. I'm baffled.

The site is www.nerdsmart.com (under construction right now).

Clearly, since I can't get standard articles and K2 to work, and it nukes EasyBlog's FB code, something's misconfigured or malfunctioning. Interestingly, login works fine.

Anything I can do to diagnose this?
Last edit: 5 years 7 months ago by chramb1.
The topic has been locked.
5 years 7 months ago - 5 years 7 months ago #64547 by chramb1
Replied by chramb1 on topic Conflict with EasyBlog
Okay, first issue found, but I'm honestly not sure what it means. Here's the output from onAfterRender() in the Facebook provider:
<script type="text/javascript">
  
  window.fbAsyncInit = function() {
    FB.init({version: 'v2.6',appId: '2274229785926312', status: false, cookie: true, xfbml: true});
FB.Event.subscribe('comment.create', jfbc.social.facebook.comment.create);
FB.Event.subscribe('comment.remove', jfbc.social.facebook.comment.remove);
  };
  (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/en_GB/sdk/debug.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>

Note that xfbml is true. This was not the case, and when it's not true, it causes EasyBlog to have issues. When I made it true, EasyBlog was happy. This can be done by flipping the "Always Parse Tags" switch on the back end. Now why this works, you've got me. Here's the code in EasyBlog that seems to react to it:
if (!/xfbml/.test(jssdk.src)) {
			var _fbAsyncInit = window.fbAsyncInit;
			window.fbAsyncInit = function(){
				if ($.isFunction(_fbAsyncInit)) _fbAsyncInit();
				parseXFBML();
			}
		}

I'm guessing that xfbml MUST be true to get EasyBlog to call the async init.

Seems, if I'm right, you might want a test to force it to true if EasyBlog is installed?

And like/comment content is working elsewhere, too... so what's xfbml? Extended Facebook Markup Language?
Last edit: 5 years 7 months ago by chramb1.
The topic has been locked.
Support Specialist
5 years 7 months ago #64549 by alzander
Replied by alzander on topic Conflict with EasyBlog
XFBML are the 'tags' that JFBConnect (or other extensions) add to your page to render some Facebook features. When you load the Facebook Javascript library, you can tell it to automatically scan the page for those tags and Facebook will replace them with the social widget you want (Like, Comment, etc). Alternatively, an extension could manually tell Facebook to render those widgets at specific points, like if they're loaded into the page dynamically at some point.

JFBConnect expects to have the Javascript library render the tags right when the library is loaded. We give the option to disable (set XFBML: false) to speed up load times (ever so slightly) if you're not loading any social widgets.

So, you should leave it set to 'true' so that the social widgets from Facebook will render.

I hope that helps explain,
Alex
The topic has been locked.
5 years 7 months ago #64552 by chramb1
Replied by chramb1 on topic Conflict with EasyBlog
That makes sense. So if JFBConnect has it set to off (for that speed), it kills any other component that might need it, too.

But that's my problem if I turn it off, I agree. I turned it on and all works well.

Thanks!
The topic has been locked.
Support Specialist
5 years 7 months ago #64554 by alzander
Replied by alzander on topic Conflict with EasyBlog

That makes sense. So if JFBConnect has it set to off (for that speed), it kills any other component that might need it, too.

Correct.. but to clarify, we're not 'killing' other components :) It's not an intentional conflict we're causing.. but there are other extensions out there that detect JFBConnect and rely on our inclusion of the Facebook (and other social network libraries) in order to avoid conflicts. We default the "Always Parse Tags" option to 'Yes' to minimize any issues as well.

Very glad to hear you got things going though, and should you need anything else, just let us know!

Thanks,
Alex
The topic has been locked.