I get this error when ever i transfer the database to a different host. Which i do often so i can test the effects of updates and such without doing it on my live site.
Nothing displays just this.

Fatal error: Call to undefined function fb() in C:\xampp\htdocs\xxxx\sites\all\modules\fb\fb.module on line 667

Comments

Dave Cohen’s picture

Category: bug » support

On my copy line 667 is a comment. what is line 667 on your copy?

If you're hosting a facebook app, you can't expect it to work properly when you move the settings to a new host (because there are settings on the facebook side that refer to your drupal url). But that's not what's causing this fatal error.

theullrich’s picture

I disable the app before moving it. My version is a couple weeks old because i have not been able to test the effects of the new one. Here is the code from mine

if (fb(FB_SETTINGS_TYPE) == FB_SETTINGS_TYPE_PAGE_TAB) {

/**
 * Is the current page a profile tab.
 *
 * Only works when "Canvas Session Parameter" is disabled.
 */
function fb_is_tab() {
  global $_fb;

  if (fb(FB_SETTINGS_TYPE) == FB_SETTINGS_TYPE_PAGE_TAB) {
    return FALSE;
  }
  elseif (fb_settings(FB_SETTINGS_TYPE) == FB_SETTINGS_TYPE_PROFILE) { // deprecated FBML tab
    return TRUE;
  }
  elseif (isset($_REQUEST['fb_sig_in_profile_tab']) &&
          $_REQUEST['fb_sig_in_profile_tab']) { // deprecated ancient history
    // Old way, no migrations enabled.
    return TRUE;
  }
  return FALSE;
}

More then once updates have messed up my site royally so i always test them. This is stopping me.

Dave Cohen’s picture

Status: Active » Fixed

I have no idea why your copy is that way. Change fb(FB_SETTINGS_TYPE) to fb_settings(FB_SETTINGS_TYPE).

Even better just update all of modules/fb to make sure you don't have any other random changes.

theullrich’s picture

Right idk why I didnt think of that sooner. It fixed the problem. And the new update is not causing any problems so thanks.

theullrich’s picture

Title: Fatal error: Call to undefined function fb() in fb.module on line 667 » Fatal error: Call to undefined function fb_settings() in fb.module on line 673
Status: Fixed » Active

ok I updated. Worked fine. Updated the live site, which is working fine. Downloaded the database (without the cache of course) put it on my localhost. And i am getting the same error but now it is on line 673. So this is still a problem.