Hey,

I had fbconnect running and it did work somewhat well, but I went into the admin panel and added my api secret, and now my site crashes on a fbconnect error:

Fatal error: Cannot redeclare class Facebook in ****/sites/all/modules/fbconnect/facebook-client/facebook.php on line 37

I don't know why it's doing this but it literally brings my site to a crashing halt. It's also completely impossible for me to update the info in the module settings administration, because I can't access it, or anything else on my site due to this error. I'm also unable to really de-activate the module for uninstallation either, without going into my database or replacing all module code with some junk code just so I can get into the modules page to uninstall it.

Steps to replicate:
Putting in your API key and Secret, and then submitting. No other information is required to cause this error.

Moreover, I had not yet modified my page.tpl.php file to include the fbml declaration either. However, I doubt this would affect the redeclaration of class issue.

I would really like to integrate facebook into my drupal site, but obviously I can not if this module brings my site to it's knees.

Any help would be appreciated.

Thanks!

Comments

abraham’s picture

Sounds like you are including the facebook files twice.

rc2020’s picture

In my dir:

/sites/all/modules/fbconnect:

[dir]facebook-client
LICENCE.txt
README.txt
fbconnect.admin.inc
fbconnect.info
fbconnect.install
fbconnect.module
fbconnect.pages.inc
xd_receiver.html

in [dir]facebook-client
/sites/all/modules/fbconnect/facebook-client
[dir]jsonwrapper
README.TXT
facebook.php
facebook_desktop.php
facebook_mobile.php
facebookapi_php5_restlib.php

The jsonwrapper directory has some php files and another dir with a licence and php file. There are no duplicate files being included. I have installed the module as provided by Install.txt.

abraham’s picture

Are you running any other modules that integrate with facebook?

rc2020’s picture

I was running drupal for facebook a while back. It had problems so I deleted it...the uninstall may not have gone smoothly, but the actual module code files have been deleted from my file system. I also went into my system table and deleted all the module entries as well.

Currently fbconnect is the only module running on the site that integrates with facebook as far as I know. (OpenID might)

rc2020’s picture

AHA!

I made a custom module and declared the class again, and this time the error threw me the module which originally declared the class!!!!! It's the openinviter engine for drupal contact list importer (DCL importer). Luckily I know the module maintainer, I'll bring it up with him.

Now don't I feel clever?? ; ).

abraham’s picture

Try doing a grep in your root Drupal directory searching for "class Facebook".

abraham’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.