Facebook comments getting error Cannot read property 'handleServerJS' of undefined
Asked Answered
P

1

9

I try to include the Facebook comments in a page but I'm always getting the following error.

Uncaught TypeError: Cannot read property 'handleServerJS' of undefined

Here my codes.

Right after the opening <body/> tag I include this.

<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/de_DE/sdk.js#xfbml=1&appId=XXXXX&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

And somewhere on the page I include the comment box.

<div class="fb-comments" data-href="<?php echo get_permalink() ?>" data-numposts="5" data-colorscheme="light"></div>

Edit: I don't know what is causing this but it seems to work.

Prosciutto answered 7/5, 2014 at 9:51 Comment(4)
Do you have that message all the time or only when you are logged in with admin account. I am getting the same message, but I have noticed that it is only when I am logged in with an admin account.Mingmingche
I also have the problem, did you solve it?Orientalize
nope ... did not try logging off because of Tamerlane's comment. Tell me if that works pls :) Have a nice day everybody!Prosciutto
Seems there's some sort of bug, I've already added info to it, maybe having more people on the thread can help press it for a solution. developers.facebook.com/bugs/340363432777869Humic
A
4

I've also run into this error. Looked everywhere and found nothing apart from here. Following Tamerlane's suggestion, logging out of your Facebook account (Which I assume is the Admin) clears up the issue.

Comments seem to post fine, despite this error, as I tested it as Admin also.

I know this doesn't fix the issue, but the error doesn't seem to stop the functionality, its just annoying to have.

Allopath answered 9/5, 2014 at 0:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.