Did you check the access permissions for the underlying node type (the one being referenced) to ensure that Anonymous users have view permissions?<br><br><div class="gmail_quote">On Thu, May 14, 2009 at 11:34 AM, Scott <span dir="ltr">&lt;<a href="mailto:scott@bscottholmes.com">scott@bscottholmes.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I have created a CCK content type that contains a field defined as a<br>
node reference. The value in this field is available to logged in users<br>
but not to anonymous users. I&#39;m defining a variable thus:<br>
<br>
 $coupon = $node-&gt;field_coupon[0][view];<br>
<br>
then later testing for a value, thus:<br>
<br>
 &lt;?php if ($coupon): ?&gt;<br>
   &lt;div id=&quot;coupon&quot; class=&quot;field field-type-nodereference<br>
field-field-coupon&quot;&gt;<br>
 &lt;?php print &quot;Print &quot;. $node-&gt;field_coupon[0][view] . &quot; for &quot; .<br>
$node-&gt;field_coupon_terms[0][value]; ?&gt;&lt;/div&gt;<br>
 &lt;?php endif; ?&gt;<br>
<br>
$coupon has a value for logged in users but not for anonymous users.  I<br>
do have the nid value available ($node-&gt;field_coupon[0][nid]) so it is<br>
possible to select the referred to node by selecting from the database<br>
but I&#39;d rather not if I don&#39;t have to.<br>
<br>
Thanks, Scott<br>
<font color="#888888"><br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br>