Did you check the access permissions for the underlying node type (the one being referenced) to ensure that Anonymous users have view permissions?
I have created a CCK content type that contains a field defined as a
node reference. The value in this field is available to logged in users
but not to anonymous users. I'm defining a variable thus:
$coupon = $node->field_coupon[0][view];
then later testing for a value, thus:
<?php if ($coupon): ?>
<div id="coupon" class="field field-type-nodereference
field-field-coupon">
<?php print "Print ". $node->field_coupon[0][view] . " for " .
$node->field_coupon_terms[0][value]; ?></div>
<?php endif; ?>
$coupon has a value for logged in users but not for anonymous users. I
do have the nid value available ($node->field_coupon[0][nid]) so it is
possible to select the referred to node by selecting from the database
but I'd rather not if I don't have to.
Thanks, Scott
--
[ Drupal support list | http://lists.drupal.org/ ]