Only a notice, but still not that what drupal expected.
"Notice: Undefined index: theme path in theme() (line 627 ... )"
After some lookup, i found the error in the fb_connect Module in the fb_connect_theme_registry_alter function.
You create a new hook, but do not set the automatically derived 'theme path' and 'theme paths' from the theme function.
Either set these both array indexes or get it from original username hook.

Comments

Dave Cohen’s picture

do you have a patch?

himerus’s picture

Changing:

    $theme_registry['user_picture'] = array(
      'arguments' => array('account' => NULL),
      'function' => 'fbconnect_theme_user_picture_override',
      'preprocess functions' => array(),
    );

To:

    $theme_registry['user_picture']['arguments'] = array('account' => NULL);
    $theme_registry['user_picture']['function'] = 'fbconnect_theme_user_picture_override';
    $theme_registry['user_picture']['preprocess functions'] = array();

Seems to fix this up

miaoulafrite’s picture

hi
thanks
which file should be modified please?
thanks

himerus’s picture

this should go in fbconnect.module:

function fbconnect_theme_registry_alter(&$theme_registry) {
  // Only change image handling if user have the permission to use the image.
  $conf = fbconnect_get_config();
  if ($conf['user_pictures'] == 'allow') {
    // Re-register the original theme function under a new name.
    $theme_registry['fbconnect_user_picture_orig'] = $theme_registry['user_picture'];
    // Override theme username
    $theme_registry['user_picture']['arguments'] = array('account' => NULL);
    $theme_registry['user_picture']['function'] = 'fbconnect_theme_user_picture_override';
    $theme_registry['user_picture']['preprocess functions'] = array();
  }
}
Dave Cohen’s picture

Drupal for Facebook include a module called fb_connect.module. It looks like this fbconnect code belongs in a different project.

notluap’s picture

I am also receiving the error "Notice: Undefined index: theme path in theme() (line 627 of /var/www/includes/theme.inc)." after installing Drupal for Facebook on a fresh Pressflow installation.

I tried the change in #2, but it did not fix it.

notluap’s picture

I've also run into some other errors using Pressflow and D4F together.... probably not a good fit, for the time being.

Going back to normal Drupal for now. I have not had this error in normal Drupal 6.20.

jghyde’s picture

i am on pressflow and I cannot duplicate.

Dave, this is the DFF fb_connect.module file, starting at line 390. Another commit on 6--3-- branch added 'type' => 'module' to the array mentioned above. I don't know if that fixed this.

himerus, your suggested fix is the same thing as the original code, just written differently. Am I missing something?

Someone give me a use case on this bug and I'll try to duplicate and figure out a fix.

Narek’s picture

same issue!!! any idea?!

Narek’s picture

Pay attention to the basepath in this two code, first one is from regular drupal second one is from pressflow drupal ,,, that has "\/" instead of "/"
I think that must cause the problem, I don't know how we should fix this ? ani idea? maybe i am wrong? but if you know how to fix the basePath in pressflow let me know , thanks

This regular drupal java script :

<!--
jQuery.extend(Drupal.settings, { "basePath": "/", "admin_menu": { "margin_top": 1 }, "fbconnect": { "user_pictures": "allow", "language_code": "en_US", "app_id": "171685162868328", "debug": 0, "connect_js": "document.location.protocol + \'//connect.facebook.net/en_US/all.js\'", "loginout_mode": "manual", "invite_name": "Sky of Design", "fast_reg_mode": 1, "fbuid": "1234194380", "user": { "uid": "1", "fbuid": "1234194380" } } });
//-->

the same conde in pressflow drupal:

<!--
jQuery.extend(Drupal.settings,
{"basePath":"\/","admin_menu":
	{"margin_top":1},
	"fbconnect":{"user_pictures":"allow","language_code":"en_US","app_id":"208536029183869","debug":0		,"connect_js":"document.location.protocol + '\/\/connect.facebook.net\/en_US\/all.js'","loginout_mode":"manual","invite_name":"duff.skyofdesign.com","fast_reg_mode":1,"fbuid":"1234194380","user":{"uid":"1","fbuid":"1234194380"}
	}
});
//-->
lalit774’s picture

Title: fb_connect: Notice: Undefined index: theme path in theme() » Undefined property: stdClass::$fb_avatar in fbconnect_form_alter

Notice: Undefined property: stdClass::$fb_avatar in fbconnect_form_alter() (line 225 of /var/www/ifood/sites/all/modules/contrib/fbconnect/fbconnect.module).

<?php
 case 'user_profile_form':
      if (variable_get('user_pictures', 0) && isset($form['_account'])) {
        $account = $form['_account']['#value'];
        if ($account->fb_avatar && isset($form['picture'])) {
?>

changing to

<?php
 case 'user_profile_form':
      if (variable_get('user_pictures', 0) && isset($form['_account'])) {
        $account = $form['_account']['#value'];
        if (isset($account->fb_avatar) && isset($form['picture'])) {
?>
apanag’s picture

@narek,

for me it was that i had sandbox mode enabled on Facebook settings. After disabling it, pressflow + fb module work as expected.

Dave Cohen’s picture

Status: Active » Fixed

I'm closing this issue, since half the comments relate to modules/fb/fb_connect.module and half are about modules/fbconnect/fbconnect.module.

If there's still an unsolved problem here, please submit a new issue, and be sure to name the correct project.

Status: Fixed » Closed (fixed)

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

Narek’s picture

thx