Hi
I'm getting this error whenever I try to access the /admin page:
Fatal error: Cannot redeclare class Facebook in /myweb/sites/all/modules/fb/facebook-platform/php/facebook.php on line 37
facebook connect and the rest of the pages work fine, even the inside of administration (i.e. admin/build/modules) but the "front admin" crashes with that error.
I have the facebook platform in sites/all/modules/fb/facebook-platform/php/facebook.php and I've even stated it in the settings.php with this: $conf['fb_api_file'] = 'sites/all/modules/fb/facebook-platform/php/facebook.php';
The problem only affects to fb connect, if I disable it, the error doesn't occur.
Any idea of what can be happening?
Thanks
Comments
Comment #1
Dave Cohen commentedI have a patch, will check in shortly.
Workaround #1 is to disable the facebook connect login block on your admin theme.
Workaround #2 is to apply this patch...
Comment #2
pcambraWith the patch all seems to work fine, thanks Dave!
Comment #3
rontec76 commentedHi Dave,
I've manually patched and tested. Your suggested code changes seem copacetic.
I tried using your patch pasted above but couldn't get it to work. So I manually made the edits and rerolled the two separate patches.
Thanks for your work on FB module it was great to meet you at the FB BoF session at Drupalcon. I'll probably be seeing you around the issue queues.
Comment #4
Dave Cohen commentedComment #5
romina commentedAlso I have had a 500 internal server error accessing the /admin page and the status report page. Bravenet, my provider, found that it was Fb Connect module. Now, with your patch, everithing works perfectly. Romina
Comment #6
suddenfire commentedHow do I install the patch I'm a newbie and the code is very confusing for me. I tried putting it at the end fb.module folder and fb.install with it not working of the file but it didn't work. Any advise or links would be greatly appreciated
Comment #7
suddenfire commentedChanging line 48 in fb.install from
if (include($fb_platform)) {
to
if (file_exists($fb_platform)) {
solves it.
or
(require_once($fb_platform)) {
Comment #8
rontec76 commentedHi Suddenfire,
You need to download the patch files into sites/all/modules/fb and apply them individually using a patch program.
This link should help...
http://drupal.org/patch/apply
Comment #9
Dave Cohen commentedfixed in rc2