On 9/8/06, rnady <[EMAIL PROTECTED]> wrote:
>
>
> After adding the belongsTo in my importance model and
> $data['Importance']['importance'] in my view.thtml I get this error:
> Notice: Undefined index: importance in
> N:\www\cake\app\views\items\view.thtml on line 5
> What am I doing wrong?
>

(I think I'm getting as old and cranky as Sam DeVore)

Step #1:  make sure you have your app in SQL debugging mode by making
sure DEBUG is set to 2 in your core.php config file.
Step #2: Look at the SQL output it generates and make sure the queries
are actually pulling the information you are expecting
Step #3: add a 'debug($data);' statment somewhere in your controller
so you can actually see how the data array is structured.

I know it looks like I'm picking on Mr. Dustin here, but this is
*basic* debugging technique.  You can't even begin to build anything
bigger than "Hello world" if you don't learn how to debug your code
effectively.  I don't mind helping people out, but it gets harder and
harder to supress my inner cranky developer when basic debugging rules
aren't being followed.

Perhaps there should be a chapter in the manual (or someplace else) on
how to effectively debug CakePHP applications.

I have donned my flame-proof suit and await your responses. ;)

--
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to