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.

halfer
  • 18,701
  • 13
  • 79
  • 158
Thomas Venturini
  • 3,100
  • 4
  • 29
  • 38
  • 3
    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. – Tamerlane May 08 '14 at 17:56
  • I also have the problem, did you solve it? – marimaf May 21 '14 at 03:48
  • nope ... did not try logging off because of Tamerlane's comment. Tell me if that works pls :) Have a nice day everybody! – Thomas Venturini May 22 '14 at 13:04
  • 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. https://developers.facebook.com/bugs/340363432777869/ – Fernando Silva Jul 26 '14 at 14:55

1 Answers1

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.