Drupal version: 6.16

Not sure if this is a bug, or not, so I wanted to post it here and hope for a little guidance if I'm doing it wrong.

I have a field on the content profile node called "field_author_bio". It is a small bit of text that describes the user. I want to have this field appear on nodes that the user has created (but only for some content types).

I have created a computed field on the content types where I want this field to appear. The computed field is called "field_autho_bio_display". Inside this computed field is the following code:

$account = user_load(array('uid'=>$node->uid));
$node = content_profile_load('uprofile', $account->uid); 
$author_bio = $node->field_author_bio[0]['value'];
$node_field[0]['value'] = $author_bio;

It works... BUT... when any page is loaded that contains this field, the entire content profile node for the author is loaded into the page. This only happens once, and reloading the page will correctly display only that node's content along with the single field I want to display. But on the first load, the entire user profile node for the user is output to the page.

Is this a bug?
Is this something I am doing wrong?
I've looked at this conversation and don't quite understand if it applies to my issue: http://drupal.org/node/316009

Any help or guidance would be greatly appreciated. If this is not a bug, I will change the Category to "support request".

Comments

fago’s picture

Category: bug » support
916Designs’s picture

shot in the dark.. but is it because you are overwriting the $node variable?