Warning: this comments plugin is operating in compatibility mode… With Facebook Comments

On all of our sites which are using Facebook comments we’re currently getting the following warning:

Warning: this comments plugin is operating in compatibility mode, but has no posts yet. Consider specifying an explicit ‘href’ as suggested in the comments plugin documentation to take advantage of all plugin features.

Facebook has (again) changed the code for displaying Facebook comments and wants it to look like this:

After the <body> tag:

<div id="fb-root"></div>
<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/en_US/all.js#xfbml=1&appId=xxxxxxxxxxxxx";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Where you want your comments to appear HTML5 OR XFBML:

HTML5:

<div data-width="470" data-num-posts="2" data-colorscheme="light"></div>

Rep:

<div data-href="http://www.w3networking.com/" data-num-posts="5" data-width="650" data-colorscheme="light"></div>

 

It’s fairly obvious that FB is moving away from having the XID as the post identifier in favor of “href” but if we move to the new code then all of our comments disappear.

I’ve tried replacing the “url” with “href” in the old code, and passing “href” alongside “url” in the old code to no avail. It did result in the warning disappearing but at the expense of all the comments disappearing as well.

I’ve also tried passing the XID to the new code, XID with the post ID, adding the XID with “migrate=’1′” and numerous variations there of.

It appears to me that the only way to make the warning disappear is to switch over to the newer code which uses “href” instead of “url” and lose our comments in the process.

Obviously we don’t want to the lose the thousands of comments we’ve built up since switching to FB comments and we don’t want to move away from FB comments as they’ve provided a massive increase in interactivity on our sites, but this is an annoying problem.

Add Comment