[support] Anonymous user does not have access to view

William Smith william.darren at gmail.com
Thu May 14 17:02:35 UTC 2009


Did you check the access permissions for the underlying node type (the one
being referenced) to ensure that Anonymous users have view permissions?

On Thu, May 14, 2009 at 11:34 AM, Scott <scott at bscottholmes.com> wrote:

>
> 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/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090514/0962ab18/attachment-0001.htm>


More information about the support mailing list