• This is a great plugin, worked perfectly on the previous version of WP.
    I just updated my WP installation to 3.1, but unfortunately this plugin will no longer activate. The following error is displayed when trying to activate…

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot redeclare class Facebook in wp-content/plugins/facebook-comments-for-wordpress/scripts/facebook.php on line 99

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi,

    It used to work well on the last WP version for me. But I’m facing another problem.

    I deactivated all my plugins at once (including Facebook Comments for WordPress) and now it seems impossible to reactivate this plugin…

    When I try so, it just crashes my site and my admin (but only on my computer – it’s good to go as soon as I erase cache). I just get a “The connection has been reinitialized” page at this adress: …/wp-admin/plugins.php?action=activate&plugin=facebook-comments-for-wordpress%2Ffacebook-comments.php&plugin_status=inactive&paged=1&s&_wpnonce=…

    I have no idea why it does so. I tried to update the plugin, to use an older version and even to re-update WP. Nothing works when it comes to reactivating the plugin. ??

    Any help would be greatly appreciated. ??

    I also received an email with that title: “[Facebook Comments for WordPress] Your current XID” to send me my XID to retrieve my comments if I “ever choose to activate this plugin again”. My choice is made: I will reactivate! But how?…

    Thread Starter jaypurcell

    (@jaypurcell)

    I think there is something in the plugin that’s not playing nice with the new version of WP. We may have to wait for the plugin developer to do an update.

    I found a different solution in order to use Facebook comments on posts. It’s called WP-Facebook Intergrate.
    This plugin add’s the FB comments into the loop, so it would appear right after the content. It doesn’t replace the default wp comment system. My workaround for that was to deactivate the comment’s feature in the plugin settings, and instead manually add the <fb:comments></fb:comments> code into my theme file, where I would like comments to appear. It works well!

    Hi Haypurcell,

    Thanks for the info but it doesn’t work for me. When I try to add the App IDs, the plugin causes an error page saying the header can’t be modified.

    I’ll just wait until I get FB Comments for WP to work again. Or find another plugin that does the job.

    Thread Starter jaypurcell

    (@jaypurcell)

    Yeah, I actually ended up running into that same problem as well.
    However, fingers crossed, looks like I’ve got it working without the plugin now. After deleting the plugin from the server I added the following code to the header.php file (immediately after <body>)

    <div id=”fb-root”></div>
    <script>
    window.fbAsyncInit = function() {
    FB.init({appId: ‘your app id’, status: true, cookie: true,
    xfbml: true});
    };
    (function() {
    var e = document.createElement(‘script’); e.async = true;
    e.src = document.location.protocol +
    ‘//connect.facebook.net/en_US/all.js’;
    document.getElementById(‘fb-root’).appendChild(e);
    }());
    </script>

    Obviously, add your app id into the code above.

    After that I pasted the following code into my template file where I wanted the comments to appear:

    <fb:comments width=”586″></fb:comments>

    As I said, this seems to be working for me now. With no plugin, just the fb code into the relevant template files.

    Thanks for theses informations.
    Though, it doesn’t work on my site…

    I am having the same problem on my site. Any help would be appreciated.

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected ‘{‘ in /nfs/c02/h07/mnt/26043/domains/blog.xxx.com/html/wp-content/plugins/facebook-comments-for-wordpress/facebook-comments-functions.php on line 202

    Yeah unfortunately got the same erroe as TREVZ on my site…

    Thread Starter jaypurcell

    (@jaypurcell)

    Hi Guys,

    As it currently stands, I don’t think there is a decent plugin that is supporting Facebook comments for WordPress 3.1
    I’ve dug deep, tried out a lot, and a lot of them seem to be broken.

    If you are comfortable editing your theme files, I would suggest initially following the Facebook developer resources to add FB comments to your site manually.

    Facebook just announced this week some improvements to the comment system. Try out the following links for more info on how to install it. I would load the javascript sdk in your header.php and put the fb comment markup in the single.php file, where you would like the comments to appear. Make sure you remove the php markup for the default wordpress comments though.
    https://developers.facebook.com/blog/post/472
    https://developers.facebook.com/docs/reference/plugins/comments/

    Any answer for the above error? I still get this issue with WP 3.1 and the current 3.1 version of this plugin. ??

    Thread Starter jaypurcell

    (@jaypurcell)

    I haven’t looked at the plugin any further.
    If you like to play with code and you really want/need Facebook comments I recommend you just hard-code them into your theme files.

    Plugin Author we8u

    (@we8u)

    Hi Allen. Are you referring to the first one posted by Jay?

    If so, it’s a conflict with some other plugin loading the facebook api.

    If not, please post more information and a link to your site.

    I am referring to this plugin, I have installed the curent version (3.1) and am using it on Wp 3.1 with the prophoto 3 theme.

    When I try to activate the plugin I get:
    Fatal error: Cannot redeclare class Facebook in /mypath/wp-content/plugins/facebook-comments-for-wordpress/scripts/facebook.php on line 99

    The prophoto theme does have a facebook ‘like’ component, it’s possible that’s where the issue is. I turned the like button in the theme off but it’s possible the theme still loads a facebook class.

    So there’s no conflict between components, it would be nice for plugins to name their classes something unique, then at least when an error is tossed we would be able to track it to the ‘facebook-wp-comment’ class or something. ??

    Plugin Author we8u

    (@we8u)

    facebook.php is developed by facebook, it’s their php api. I doubt most plugin authors edit it.

    One thing to try would be to search for any instances of ‘facebook.php’ in your theme’s files, and replace any ” require/include ‘facebook.php’ ” with ” include_once ‘facebook.php’ “

    cheers

    I understand, thank you for your time.

    I installed this on another blog not using the theme and it works fine (so the server software and etc are ok). So I’ll dig a bit and see about doing the replacements.

    Are there new issues with the facebook plug-in today? My comments are gone and I can’t seem to see where the problem is. It shows how many people “like” my article, but the facebook comments are gone, only word press comments remain.
    https://angel-stories.com/405/april-2011-name-the-angel-pin-contest/

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: Facebook Comments for WordPress] Plugin could not be activated because it triggered a fatal’ is closed to new replies.