do this in your view: pr($user)
What does that array look like? undefined index means you are trying to reference an array key that doesn't exist. the format of your $user array has likely changed when you added the model association. On Aug 19, 2:58 pm, Tomfox Wiranata <tomfox.wiran...@gmail.com> wrote: > hi, > > weird thing. i declare a hasOne relation: > > class User extends AppModel > { > var $name = 'User'; > > var $hasOne = array( > 'Link' => array( > 'className' => 'Link', > 'dependent' => true > ) > ); > > } > > suddenly i am having "undefined index" everywhere i use that model in > my views, like: > > <span class="profiledata"><?php echo $user['firstname']; ?></span> > > if i delete the hasOne part it works fine and the view shows the user > data...what the heck did i do wrong? looking forward to your > feedback.. > > big big thx Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en