Fatal error when I activate comments plus

Hi guys,

OK I have installed comments plus and Im getting this error from my logs:

PHP Fatal error: Cannot redeclare class OAuthException in /home/sites/honeybeekeeping.co.uk/public_html/wp-content/plugins/comments-plus/lib/external/twitter/OAuth.php on line 8, referer: http://honeybeekeeping.co.uk/wp-admin/plugins.php?error=true&plugin=comments-plus%2Fcomments-plus.php&_error_nonce=b5698a8354

Resulting in of course in a "Plugin could not be activated because it triggered a fatal error." when I try to activate.

Now as the error seems to be twitter related and the only other plugin using twitter is floating social, Im guessing this is the problem?

If this is the case how do I get rid of all traces of floating social and get comments plus working. The only other social plugin I have installed is Ultimate FB (ive switched import FB comments off but they were on for a while).

Any help much appreciated. Ta

  • Timothy Bowers
    • Chief Pigeon

    Hey thepath.

    PHP Fatal error: Cannot redeclare class OAuthException in /home/sites/honeybeekeeping.co.uk/public_html/wp-content/plugins/comments-plus/lib/external/twitter/OAuth.php on line 8,

    Usually this happens because PHP does not allow a function to be declared twice.

    Could I ask which versions of those plugins are you on?

    Could I also request you deactivate other non-WPMU Dev plugins and switch to the default theme to ensure there are no other conflicts. If the conflict still exists then deactivate each WPMU Dev plugin, one at a time and test again until the issue happens. (except comment plus)

    I'll go and test with these three plugins as well to see if I can replicate the issue.

    Let me know how you get on.

    Take care.

  • ThePath
    • The Bug Hunter

    Hi Timothy, thanks for your replies.

    Sigh, I hate deactivating the reactivating everything. Guess I will have to find some time to go through them all, but there is quite a few plugins (most from here) installed.

    Hoped someone would know what this issue was from and offer a direct fix to save me time. I should know its never that easy though.

    Mmmm when you did your test did you select import facebook comments on Ultimate Facebook then turn them off like I did? not that I think that would make any difference but you never know.

    It is a strange site though as Ive updated and transferred and all sorts. So there may be some left over thing from the old site.....

    Cheers

  • Timothy Bowers
    • Chief Pigeon

    Hey again. :slight_smile:

    Sigh, I hate deactivating the reactivating everything. Guess I will have to find some time to go through them all, but there is quite a few plugins (most from here) installed.

    I know the feeling. I test a lot of plugins and provide developer feed, so I do it on a daily basis.

    A quick way for you. Rename the plugins directory. Create a new /plugins/ directory and move over only the relevant one. That deactivates the others for you. Then just move them back one at a time or all together. FTP will support drag and drop :slight_smile:

    Don't forget plugins in the MU folder also.

    Mmmm when you did your test did you select import facebook comments on Ultimate Facebook then turn them off like I did? not that I think that would make any difference but you never know.

    I did not, no.

    But I will go do it anyway, just to replicate. :slight_smile:

    Be back shortly.

  • ThePath
    • The Bug Hunter

    Mmmm deactivated everything and then tried to activate comments plus. Same error.

    I noted that the only other plugin to use twitter would be Social Marketing plugin. If I was to simply delete this OAuth.php would it stop the plugin from working properly? Or maybe just take out what appears to be the offending code?

    class OAuthException extends Exception {
      // pass
    }
  • Timothy Bowers
    • Chief Pigeon

    That was a class of functions, as I mentioned in my post above. You can't redeclare a function more than one.

    It might well work for you removing the function so it doesn't conflict with your other plugin. However if both functions were different, updated, changed then it could cause you issues in the future.

    Glad its work for you.

    Take care.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.