Hi,

after installing the latest 3.0 version I got the following fatal error, when I try to add an app!

PHP Fatal error: Call to undefined function fb_canvas_admin_form_alter() in /home/.../sites/mydomain/sites/all/modules/fb/fb_canvas.module on line 267

FB PHP-SDK v2.1.2 is also installed, and all includes are done to page.tpl.php and settings.php!

Regards,

Tobi

CommentFileSizeAuthor
#9 fb-init-fix.diff1.28 KBDave Cohen

Comments

Dave Cohen’s picture

Weird. Do you have the file modules/fb/fb_canvas.admin.inc?

DerTobi75’s picture

Yes, I have the file fb_canvas.admin.inc!

DerTobi75’s picture

I nearly tried everything, uninstalled all modules, installed them again, double checked the settings.php!

Do not know what else to do. I also cannot use the User Management, when following the link I got:

Call to undefined function fb_admin_get_app_options() in /home/dertobi/sites/mysite/sites/all/modules/fb/fb_user.admin.inc on line 19, referer: http://mydomain/admin/build/fb

Regards,

Tobi

paniolo’s picture

I am having the exact same problem! Doing a fresh install of dev 3.0, enabled the modules, edited settings.php, and installed FB PHP-SDK. When I try to add app i get: Fatal error: Call to undefined function fb_tab_admin_form_alter() in /home/sitename/public_html/sites/all/modules/fb/fb_tab.module on line 45

Actually all of the tabs in facebook applications produce a similar error - Fatal error: Call to undefined function....

Thanks for any help!

Dave Cohen’s picture

What are your drupal cache settings? Maybe refresh all caches?

th.sigit’s picture

Hello Dave and all:

below are the links that generates error and the error messages that appeared. I must revert back (from my local backup) to the older dev module (2010-Aug-04) to get the proper functionality. For a note, I have flushed the cache and even uninstall and update.php for the newer dev module, before revert back to the backup code.

Regards, and thanks for all the efforts!

admin/build/fb/fb_app_create
Fatal error: Call to undefined function fb_canvas_admin_form_alter() in /home/.../public_html/sites/all/modules/fb/fb_canvas.module  on line 267

admin/build/fb/fb_connect
Fatal error: Call to undefined function fb_admin_get_app_options() in /home/.../public_html/sites/all/modules/fb/fb_connect.admin.inc  on line 30

admin/build/fb/fb_user
Fatal error: Call to undefined function fb_admin_get_app_options() in /home/.../public_html/sites/all/modules/fb/fb_user.admin.inc  on line 19
paniolo’s picture

Cache is disabled on my site, tried refreshing as well. Same errors as listed above.

Dave Cohen’s picture

Assigned: Unassigned » Dave Cohen
Category: support » bug

I see where the problem is now. Working on a fix.

Dave Cohen’s picture

Status: Active » Fixed
StatusFileSize
new1.28 KB

Just checked in this fix.

paniolo’s picture

That worked, thanks so much Dave!

th.sigit’s picture

thank you, and regards,,

DerTobi75’s picture

Great, will check this out, when I am back at the office next monday, regards, Tobi

Status: Fixed » Closed (fixed)

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

D.H.’s picture

Status: Closed (fixed) » Needs review

We had the same errors on our installation and fixed the issues with "fb_admin_get_app_options()" in fb_connect.admin.inc and fb_user.admin.inc by using module_load_include to get the content of fb_admin.inc. Somehow the "sync props" menu callback was failing too and generated the following output:

call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'fb_admin_set_properties_form' was given

There was a missing file attribute for FB_PATH_ADMIN_APPS . '/%fb/fb/set_props:

OLD:

$items[FB_PATH_ADMIN_APPS . '/%fb/fb/set_props'] = array(
    'title' => 'Set Properties',
    'description' => 'Set Facebook Application Properties',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('fb_admin_set_properties_form', FB_PATH_ADMIN_APPS_ARGS),
    'access arguments' => array(FB_PERM_ADMINISTER),
    'type' => MENU_CALLBACK,
  );

NEW:

$items[FB_PATH_ADMIN_APPS . '/%fb/fb/set_props'] = array(
    'title' => 'Set Properties',
    'description' => 'Set Facebook Application Properties',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('fb_admin_set_properties_form', FB_PATH_ADMIN_APPS_ARGS),
    'access arguments' => array(FB_PERM_ADMINISTER),
    'file' => 'fb.admin.inc', // NEW added
    'type' => MENU_CALLBACK,
  );
Dave Cohen’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +fb3-blocker

Thanks that looks correct.

Dave Cohen’s picture

Status: Reviewed & tested by the community » Fixed

Somewhere along the lines, I checked in this fix. neglected to update this issue.

Status: Fixed » Closed (fixed)
Issue tags: -fb3-blocker

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