really excited about realname in db and wanted to use the realname_widget and they mentioned upgrading to dev. having some issues, here's what I've found so far

The amounts I've encountered this is becoming amusing ... XD (3 or 4?) (
See http://drupal.org/node/521358 for further explanation)

  $fields = content_fields(NULL, $type);

=>

    $info = content_types($type);
  $fields = $info['fields'];

In nodeapi ~line 374 (yay for debug_backtrace for finding this).

     if (!user_access('use realname')) {
    return;
  }
   if ($node->uid) $account = user_load($node->uid);
   else return;

due to

        $realname->uid = $account->uid;

There was no $account so it was giving it 0 and acting reallllly wonky. reallly, reallly, realllly wonky.

~726

$stuff['%'. $i] =  $stuff['%'. $i] = isset($account->{$name}[0]['view'])?$account->{$name}[0]['view']:$account->{$name}[0]['value'];

for some reason they're coming back as values but not with a view sometimes; so added this until whatever that bug is fixed. Perhaps because they're a single field but in a seperate table due to being in two content types?

Comments

hefox’s picture

one of my snippits earleir was buggy for install


function realname_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  static $type;
  static $accounts = array();
  if (!user_access('use realname')) {
    return;
  }
  // NickSI: Yes, we will have another switch later but I would like to
  // separate table update with other processing.
  if (variable_get('realname_profile_module', NULL) == 'content_profile'  &&
      is_content_profile($node->type)) {
      
      // Do realnames table update if content_profile has been changed.
    switch ($op) {
      case 'update':
      case 'insert':
      case 'delete':
        if ($node->uid) $account = user_load($node->uid);
        else return;
        $realname->uid = $account->uid;
        $realname->realname = _realname_make_name($account);

realname was updating before the insert in the install script; oops

coderintherye’s picture

Based on your 2nd post, it's not really clear to me what your bug is, could you try rephrasing?

hefox’s picture

Status: Active » Closed (cannot reproduce)

I really have no memory of what the issues were, it's been a year, so my guess that it is fixed.

derhasi’s picture

Status: Closed (cannot reproduce) » Closed (duplicate)