Re: about "Notice (8): Undefined index:"

2013-06-23 Thread wen ger0606
Hi,

You can measure it by a new PDO driver.

2013年4月26日金曜日 18時45分40秒 UTC+9 Khánh Vương:
>
> Hi, I have same error. Please let me know way to solve this problem. 
> Thanks!
>
> On Tuesday, April 2, 2013 11:26:14 PM UTC+7, wen ger0606 wrote:
>>
>> I'm using 2.3.1 cakephp.
>> When you run the following simple code, "Notice (8): Undefined index: 
>> User [APP / View / Users / index.ctp, line 6]" occurs.
>> If you run in cakephp 2.3.1 on another server the same code, the error 
>> does not occur.
>>
>> - UsersController.php ---
>> class UsersController extends AppController {
>> public $ uses = array ('User');
>> public $ layout = 'default';
>> public function index () {
>>   $ userData = $ this-> User-> find ('all');
>>   $ this-> set ('userData', $ userData);
>> }
>> }
>>
>> - User.php ---
>> class User extends AppModel {
>> public $ name = 'User';
>> }
>>
>> - Index.ctp ---
>> 
>> 
>> 
>>  
>> 
>> 
>> 
>>
>> - Debug ($ userData) ---
>> $ userData = array (
>>(int) 0 => array (
>>  (int) 0 => array (
>>  'id' => '1 ',
>>  'name' => 'suzuki'
>>  )
>>)
>> )
>>
>> Set so the server, I think that there is such a phenomenon occur?
>> If there is a point that I noticed something, please advice.
>> *best regards*
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: about "Notice (8): Undefined index:"

2013-04-28 Thread Khánh Vương
Hi, I have same error. Please let me know way to solve this problem. Thanks!

On Tuesday, April 2, 2013 11:26:14 PM UTC+7, wen ger0606 wrote:
>
> I'm using 2.3.1 cakephp.
> When you run the following simple code, "Notice (8): Undefined index: 
> User [APP / View / Users / index.ctp, line 6]" occurs.
> If you run in cakephp 2.3.1 on another server the same code, the error 
> does not occur.
>
> - UsersController.php ---
> class UsersController extends AppController {
> public $ uses = array ('User');
> public $ layout = 'default';
> public function index () {
>   $ userData = $ this-> User-> find ('all');
>   $ this-> set ('userData', $ userData);
> }
> }
>
> - User.php ---
> class User extends AppModel {
> public $ name = 'User';
> }
>
> - Index.ctp ---
> 
> 
> 
>  
> 
> 
> 
>
> - Debug ($ userData) ---
> $ userData = array (
>(int) 0 => array (
>  (int) 0 => array (
>  'id' => '1 ',
>  'name' => 'suzuki'
>  )
>)
> )
>
> Set so the server, I think that there is such a phenomenon occur?
> If there is a point that I noticed something, please advice.
> *best regards*
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: about "Notice (8): Undefined index:"

2013-04-03 Thread wen ger0606
Hi Jerome


Place who have pointed out, it was my mistake of copy and paste.

By the way, earlier, was found to cause.


Was v5.0.33 version of PDO Driver for MySQL on the server I'm using.
For this purpose,
lib \ Cake \ Model \ Datasource \ Database \ Mysql.php
was due getColumnMeta function that will be used in the resultSet function can 
not get the table name.

Thank you to answer me.




2013年4月3日水曜日 16時28分03秒 UTC+9 Jerome Walitzek:
>
> hi there,
> i think your "index.ctp" file not correct.
> you write
>
> 
> 
> 
>  
> 
> 
> 
>
> please write  and not 
>
> try this one
>
> 
> 
> 
> 
> 
> 
> 
>
> i hope it helps you
>
>
> Am Dienstag, 2. April 2013 18:26:14 UTC+2 schrieb wen ger0606:
>>
>> I'm using 2.3.1 cakephp.
>> When you run the following simple code, "Notice (8): Undefined index: 
>> User [APP / View / Users / index.ctp, line 6]" occurs.
>> If you run in cakephp 2.3.1 on another server the same code, the error 
>> does not occur.
>>
>> - UsersController.php ---
>> class UsersController extends AppController {
>> public $ uses = array ('User');
>> public $ layout = 'default';
>> public function index () {
>>   $ userData = $ this-> User-> find ('all');
>>   $ this-> set ('userData', $ userData);
>> }
>> }
>>
>> - User.php ---
>> class User extends AppModel {
>> public $ name = 'User';
>> }
>>
>> - Index.ctp ---
>> 
>> 
>> 
>>  
>> 
>> 
>> 
>>
>> - Debug ($ userData) ---
>> $ userData = array (
>>(int) 0 => array (
>>  (int) 0 => array (
>>  'id' => '1 ',
>>  'name' => 'suzuki'
>>  )
>>)
>> )
>>
>> Set so the server, I think that there is such a phenomenon occur?
>> If there is a point that I noticed something, please advice.
>> *best regards*
>>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: about "Notice (8): Undefined index:"

2013-04-03 Thread Jerome Walitzek
hi there,
i think your "index.ctp" file not correct.
you write




 




please write  and not 

try this one









i hope it helps you


Am Dienstag, 2. April 2013 18:26:14 UTC+2 schrieb wen ger0606:
>
> I'm using 2.3.1 cakephp.
> When you run the following simple code, "Notice (8): Undefined index: 
> User [APP / View / Users / index.ctp, line 6]" occurs.
> If you run in cakephp 2.3.1 on another server the same code, the error 
> does not occur.
>
> - UsersController.php ---
> class UsersController extends AppController {
> public $ uses = array ('User');
> public $ layout = 'default';
> public function index () {
>   $ userData = $ this-> User-> find ('all');
>   $ this-> set ('userData', $ userData);
> }
> }
>
> - User.php ---
> class User extends AppModel {
> public $ name = 'User';
> }
>
> - Index.ctp ---
> 
> 
> 
>  
> 
> 
> 
>
> - Debug ($ userData) ---
> $ userData = array (
>(int) 0 => array (
>  (int) 0 => array (
>  'id' => '1 ',
>  'name' => 'suzuki'
>  )
>)
> )
>
> Set so the server, I think that there is such a phenomenon occur?
> If there is a point that I noticed something, please advice.
> *best regards*
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




about "Notice (8): Undefined index:"

2013-04-02 Thread wen ger0606
I'm using 2.3.1 cakephp.
When you run the following simple code, "Notice (8): Undefined index: User 
[APP / View / Users / index.ctp, line 6]" occurs.
If you run in cakephp 2.3.1 on another server the same code, the error does 
not occur.

- UsersController.php ---
class UsersController extends AppController {
public $ uses = array ('User');
public $ layout = 'default';
public function index () {
  $ userData = $ this-> User-> find ('all');
  $ this-> set ('userData', $ userData);
}
}

- User.php ---
class User extends AppModel {
public $ name = 'User';
}

- Index.ctp ---



 




- Debug ($ userData) ---
$ userData = array (
   (int) 0 => array (
 (int) 0 => array (
 'id' => '1 ',
 'name' => 'suzuki'
 )
   )
)

Set so the server, I think that there is such a phenomenon occur?
If there is a point that I noticed something, please advice.
*best regards*

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: undefined index error

2012-08-20 Thread mohit kumar
yeah the problem got solved. I was making a basic error.

Thanks for support  :)

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Mon, Aug 20, 2012 at 10:08 AM, Bharat Maheshwari <
bharat.maheshw...@logicspice.com> wrote:

> As you use all in $current_roster = $this->Weeklyroster->find('**all',
> array('conditions' => array('Weeklyroster.week' => $id))); so it is
> creating following structure :-
>
> array(
> [0]
>  array(
>   ['Weeklyroster']
> array(
>  ['field_name1']
>  ['field_name2']
>  )
>   )
> )
>
> You have to use foreach loop to print data or if you have only one row
> from database please use first besides all
>
>
> On Monday, August 13, 2012 9:09:37 PM UTC+5:30, mohit wrote:
>>
>> Hi Folks,
>>
>> I am having a strange error. I don't know what I am doing wrong.
>> I am using following code in my weeklyrostercontroller.php file
>>
>> var $uses = array('Weeklyroster','Shift');
>>>
>>
>> I have created a function to generate the roster.
>>
>>
>> public function generate($id = null) {
>>> $this->Weeklyroster->week= $id;
>>> //if (!$this->Weeklyroster->exists(**)) {
>>> //throw new NotFoundException(__('Invalid weeklyroster'));
>>> //}
>>> //$this->set('weeklyroster', $this->Weeklyroster->read('**week',
>>> $id));
>>> $current_roster = $this->Weeklyroster->find('**all',
>>> array('conditions' => array('Weeklyroster.week' => $id)));
>>> foreach ($current_roster as $current_rosters) {
>>> $vid=$current_rosters['**Weeklyroster']['id'];
>>>
>>> $current_shifts = 
>>> $this->Weeklyroster->Shift->**find('all',array('conditions'
>>> => array('Shift.id' => $vid)));
>>>
>>>
>>> }
>>>
>>>
>>> $this->set('weeklyroster', $current_roster);
>>> $this->set('current_shifts',$**current_shifts);
>>>
>>> }
>>> }
>>
>>
>>   if a use following code ($weeklyroster['Weeklyroster']**['week'] in my
>> view file , I get the following error.
>>
>> *Notice* (8): Undefined index: Weeklyroster 
>> [*APP\View\Weeklyrosters\generate.ctp*, line *3*]
>>
>> Please suggest
>>
>>
>>
>> *With Best Regards,
>> Mohit Kumar <http://kumarmohit.com>*
>> *+91-9582894570*
>>
>>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: undefined index error

2012-08-19 Thread Bharat Maheshwari
As you use all in $current_roster = $this->Weeklyroster->find('all', 
array('conditions' => array('Weeklyroster.week' => $id))); so it is 
creating following structure :- 

array(
[0]
 array( 
  ['Weeklyroster']
array(  
 ['field_name1']
 ['field_name2']
 ) 
  )
)

You have to use foreach loop to print data or if you have only one row from 
database please use first besides all

On Monday, August 13, 2012 9:09:37 PM UTC+5:30, mohit wrote:
>
> Hi Folks,
>
> I am having a strange error. I don't know what I am doing wrong.
> I am using following code in my weeklyrostercontroller.php file
>
> var $uses = array('Weeklyroster','Shift');
>>
>
> I have created a function to generate the roster.
>
>
> public function generate($id = null) {
>> $this->Weeklyroster->week= $id;
>> //if (!$this->Weeklyroster->exists()) {
>> //throw new NotFoundException(__('Invalid weeklyroster'));
>> //}
>> //$this->set('weeklyroster', $this->Weeklyroster->read('week', 
>> $id));
>> $current_roster = $this->Weeklyroster->find('all', 
>> array('conditions' => array('Weeklyroster.week' => $id)));
>> foreach ($current_roster as $current_rosters) {
>> $vid=$current_rosters['Weeklyroster']['id'];
>> 
>> $current_shifts = 
>> $this->Weeklyroster->Shift->find('all',array('conditions' => 
>> array('Shift.id' => $vid)));
>> 
>> 
>> }
>> 
>> 
>> $this->set('weeklyroster', $current_roster);
>> $this->set('current_shifts',$current_shifts);
>> 
>> }
>> }
>
>
>   if a use following code ($weeklyroster['Weeklyroster']['week'] in my 
> view file , I get the following error.
>
> *Notice* (8): Undefined index: Weeklyroster 
> [*APP\View\Weeklyrosters\generate.ctp*, line *3*]
>
> Please suggest
>
>  
>
> *With Best Regards,
> Mohit Kumar <http://kumarmohit.com>*
> *+91-9582894570*
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: undefined index error

2012-08-16 Thread ivnrmc
I suppose you tried debugging your variable, but if you get undefined 
index, you should check if this array actually contains some data. 
Debugging inside controller, and debugging $this->data is a good way to 
find out what is going on...
If you still have problems, please provide more info and code so we can see 
where is the problem :-)

cheers

Dana utorak, 14. kolovoza 2012. 16:12:43 UTC+2, korisnik mohit napisao je:
>
> I tried that also using a for each. still having some problems with it.
>
> *With Best Regards,
> Mohit Kumar <http://kumarmohit.com>*
> *+91-9582894570*
>
>
>
> On Tue, Aug 14, 2012 at 7:39 PM, Dave M.  >wrote:
>
>> I suggest you throw a debug($weeklyroster) into your view to see how the 
>> array is actually structured. I would assume that you would want 
>> $weeklyroster[0]['Weeklyroster']**
>> ['week'], $weeklyroster[1]['Weeklyroster']**['week'], etc.
>>
>> On Monday, August 13, 2012 11:39:37 AM UTC-4, mohit wrote:
>>>
>>> Hi Folks,
>>>
>>> I am having a strange error. I don't know what I am doing wrong.
>>> I am using following code in my weeklyrostercontroller.php file
>>>
>>> var $uses = array('Weeklyroster','Shift');
>>>>
>>>
>>> I have created a function to generate the roster.
>>>
>>>
>>> public function generate($id = null) {
>>>> $this->Weeklyroster->week= $id;
>>>> //if (!$this->Weeklyroster->exists(**)) {
>>>> //throw new NotFoundException(__('Invalid weeklyroster'));
>>>> //}
>>>> //$this->set('weeklyroster', $this->Weeklyroster->read('**week', 
>>>> $id));
>>>> $current_roster = $this->Weeklyroster->find('**all', 
>>>> array('conditions' => array('Weeklyroster.week' => $id)));
>>>> foreach ($current_roster as $current_rosters) {
>>>> $vid=$current_rosters['**Weeklyroster']['id'];
>>>> 
>>>> $current_shifts = 
>>>> $this->Weeklyroster->Shift->**find('all',array('conditions' 
>>>> => array('Shift.id' => $vid)));
>>>> 
>>>> 
>>>> }
>>>> 
>>>> 
>>>> $this->set('weeklyroster', $current_roster);
>>>> $this->set('current_shifts',$**current_shifts);
>>>> 
>>>> }
>>>> }
>>>
>>>
>>>   if a use following code ($weeklyroster['Weeklyroster']**['week'] in 
>>> my view file , I get the following error.
>>>
>>> *Notice* (8): Undefined index: Weeklyroster 
>>> [*APP\View\Weeklyrosters\generate.ctp*, line *3*]
>>>
>>> Please suggest
>>>
>>>  
>>>
>>> *With Best Regards,
>>> Mohit Kumar <http://kumarmohit.com>*
>>> *+91-9582894570*
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> cake-php+u...@googlegroups.com .
>> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>>  
>>  
>>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: undefined index error

2012-08-14 Thread mohit kumar
I tried that also using a for each. still having some problems with it.

*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*



On Tue, Aug 14, 2012 at 7:39 PM, Dave M.  wrote:

> I suggest you throw a debug($weeklyroster) into your view to see how the
> array is actually structured. I would assume that you would want
> $weeklyroster[0]['Weeklyroster']**
> ['week'], $weeklyroster[1]['Weeklyroster']**['week'], etc.
>
> On Monday, August 13, 2012 11:39:37 AM UTC-4, mohit wrote:
>>
>> Hi Folks,
>>
>> I am having a strange error. I don't know what I am doing wrong.
>> I am using following code in my weeklyrostercontroller.php file
>>
>> var $uses = array('Weeklyroster','Shift');
>>>
>>
>> I have created a function to generate the roster.
>>
>>
>> public function generate($id = null) {
>>> $this->Weeklyroster->week= $id;
>>> //if (!$this->Weeklyroster->exists(**)) {
>>> //throw new NotFoundException(__('Invalid weeklyroster'));
>>> //}
>>> //$this->set('weeklyroster', $this->Weeklyroster->read('**week',
>>> $id));
>>> $current_roster = $this->Weeklyroster->find('**all',
>>> array('conditions' => array('Weeklyroster.week' => $id)));
>>> foreach ($current_roster as $current_rosters) {
>>> $vid=$current_rosters['**Weeklyroster']['id'];
>>>
>>> $current_shifts = 
>>> $this->Weeklyroster->Shift->**find('all',array('conditions'
>>> => array('Shift.id' => $vid)));
>>>
>>>
>>> }
>>>
>>>
>>> $this->set('weeklyroster', $current_roster);
>>> $this->set('current_shifts',$**current_shifts);
>>>
>>> }
>>> }
>>
>>
>>   if a use following code ($weeklyroster['Weeklyroster']**['week'] in my
>> view file , I get the following error.
>>
>> *Notice* (8): Undefined index: Weeklyroster 
>> [*APP\View\Weeklyrosters\generate.ctp*, line *3*]
>>
>> Please suggest
>>
>>
>>
>> *With Best Regards,
>> Mohit Kumar <http://kumarmohit.com>*
>> *+91-9582894570*
>>
>>  --
> 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.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: undefined index error

2012-08-14 Thread Dave M.
I suggest you throw a debug($weeklyroster) into your view to see how the 
array is actually structured. I would assume that you would want 
$weeklyroster[0]['Weeklyroster']['week'], 
$weeklyroster[1]['Weeklyroster']['week'], 
etc.

On Monday, August 13, 2012 11:39:37 AM UTC-4, mohit wrote:
>
> Hi Folks,
>
> I am having a strange error. I don't know what I am doing wrong.
> I am using following code in my weeklyrostercontroller.php file
>
> var $uses = array('Weeklyroster','Shift');
>>
>
> I have created a function to generate the roster.
>
>
> public function generate($id = null) {
>> $this->Weeklyroster->week= $id;
>> //if (!$this->Weeklyroster->exists()) {
>> //throw new NotFoundException(__('Invalid weeklyroster'));
>> //}
>> //$this->set('weeklyroster', $this->Weeklyroster->read('week', 
>> $id));
>> $current_roster = $this->Weeklyroster->find('all', 
>> array('conditions' => array('Weeklyroster.week' => $id)));
>> foreach ($current_roster as $current_rosters) {
>> $vid=$current_rosters['Weeklyroster']['id'];
>> 
>> $current_shifts = 
>> $this->Weeklyroster->Shift->find('all',array('conditions' => 
>> array('Shift.id' => $vid)));
>>     
>> 
>> }
>> 
>> 
>> $this->set('weeklyroster', $current_roster);
>> $this->set('current_shifts',$current_shifts);
>> 
>> }
>> }
>
>
>   if a use following code ($weeklyroster['Weeklyroster']['week'] in my 
> view file , I get the following error.
>
> *Notice* (8): Undefined index: Weeklyroster 
> [*APP\View\Weeklyrosters\generate.ctp*, line *3*]
>
> Please suggest
>
>  
>
> *With Best Regards,
> Mohit Kumar <http://kumarmohit.com>*
> *+91-9582894570*
>
>

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




undefined index error

2012-08-13 Thread mohit kumar
Hi Folks,

I am having a strange error. I don't know what I am doing wrong.
I am using following code in my weeklyrostercontroller.php file

var $uses = array('Weeklyroster','Shift');
>

I have created a function to generate the roster.


public function generate($id = null) {
> $this->Weeklyroster->week= $id;
> //if (!$this->Weeklyroster->exists()) {
> //throw new NotFoundException(__('Invalid weeklyroster'));
> //}
> //$this->set('weeklyroster', $this->Weeklyroster->read('week',
> $id));
> $current_roster = $this->Weeklyroster->find('all',
> array('conditions' => array('Weeklyroster.week' => $id)));
> foreach ($current_roster as $current_rosters) {
> $vid=$current_rosters['Weeklyroster']['id'];
>
> $current_shifts =
> $this->Weeklyroster->Shift->find('all',array('conditions' =>
> array('Shift.id' => $vid)));
>
>
> }
>
>
> $this->set('weeklyroster', $current_roster);
> $this->set('current_shifts',$current_shifts);
>
> }
> }


  if a use following code ($weeklyroster['Weeklyroster']['week'] in my view
file , I get the following error.

*Notice* (8): Undefined index: Weeklyroster
[*APP\View\Weeklyrosters\generate.ctp*, line *3*]

Please suggest



*With Best Regards,
Mohit Kumar <http://kumarmohit.com>*
*+91-9582894570*

-- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Undefined index after web host install.

2012-06-30 Thread Guti Grewal
Right I've done the info.php and file uploads are turned on and you 
are absolutely right, there is a max file size of 2mb for an upload. 
Thanks for helping me figure that one out :)
Much appreciated.

On Thursday, 28 June 2012 22:34:09 UTC+1, Guti Grewal wrote:
>
> Hi I've uploaded my website on a free hosting site called 000webhost, it 
> works fine on localhost but however when I try to upload a file to the 
> server using a form I get thrown this error.
>
> *Notice* (8): Undefined index:  Upload 
> [*APP/Controller/UploadsController.php*, line *32*]
> Code
>
> UploadsController::add() - APP/Controller/UploadsController.php, line 32
> ReflectionMethod::invokeArgs() - [internal], line ??
> Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 485
> Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 103
> Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 85
> [main] - APP/webroot/index.php, line 96
>
>
> I can't for the life of me figure out what is going wrong?
>
> I've set the permissions for the webroot/files/uploads folder to 777, so it 
> can't possibly be that. 
>
> Anyone have any ideas?
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index after web host install.

2012-06-29 Thread lowpass
On Fri, Jun 29, 2012 at 3:01 PM, Guti Grewal  wrote:
> Notice (8): Undefined index:  Upload [APP/Controller/UploadsController.php,
> line 32]
>
> /app/Controller/UploadsController.php (line 32)
>
> null
>
>
> This is what I get, when I do the debug, so Im guessing theres no errors
> with the coding. Where else could the error be.

Well, no, it doesn't mean there are no errors. It means that
$this->request->data is empty. Which is not what you want. Where did
you put this line? Normally, it would be something like:

public function add()
{
if (!empty($this->request->data))
{
// do save here
debug($this->request->data);


Which version are you running, btw? If less than 2.x you need to
debug($this->data) instead.

It's odd that both the notice and the debug are on line 32. What does
your controller action look like?

> It works fine in localhost but once I uploaded it to the online web host I
> get thrown this error.

Then maybe the problem is that you're trying to upload a file that's
too large. Or you may not even be able to upload at all. Add this in
your controller:

debug($_FILES);

If there's an upload error it'll be included there and you can compare
with the examples on the PHP site.

Also, you could check the server's config. Write a script, info.php,
and stick it in your webroot dir:

http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index after web host install.

2012-06-29 Thread Guti Grewal


*Notice* (8): Undefined index:  Upload [*APP/Controller/UploadsController.php*, 
line *32*]

*/app/Controller/UploadsController.php* (line *32*)

null


This is what I get, when I do the debug, so Im guessing theres no errors with 
the coding. Where else could the error be. 

It works fine in localhost but once I uploaded it to the online web host I get 
thrown this error. 


This is my form;

Form->create('Upload', 
array('controller'=>'uploads','action'=>'add','type' => 'file', 
'class'=>'uploadfrm'));?>

Upload a Video
.mp4 file format only.';
echo '';
echo '';
echo $this->Form->input('name', array('between'=>'', 
'class'=>'input'));
echo $this->Form->input('eventname', array('between'=>'', 
'class'=>'input'));
echo $this->Form->input('description', array('between'=>'', 'rows'=> '7', 'cols'=> '60', 'class'=>'input'));
echo  $this->Form->hidden('userid', array('id' => 
'user_id','value' => $auth['id']));
echo $this->Form->hidden('username', array('id' => 'username', 
'value' => $auth['username']));
echo $this->Form->input('file', array('type' => 'file'));

echo "";
?>
Form->end(__('Upload Video', true));?>



Any ideas?


On Thursday, 28 June 2012 22:34:09 UTC+1, Guti Grewal wrote:
>
> Hi I've uploaded my website on a free hosting site called 000webhost, it 
> works fine on localhost but however when I try to upload a file to the 
> server using a form I get thrown this error.
>
> *Notice* (8): Undefined index:  Upload 
> [*APP/Controller/UploadsController.php*, line *32*]
> Code
>
> UploadsController::add() - APP/Controller/UploadsController.php, line 32
> ReflectionMethod::invokeArgs() - [internal], line ??
> Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 485
> Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 103
> Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 85
> [main] - APP/webroot/index.php, line 96
>
>
> I can't for the life of me figure out what is going wrong?
>
> I've set the permissions for the webroot/files/uploads folder to 777, so it 
> can't possibly be that. 
>
> Anyone have any ideas?
>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index after web host install.

2012-06-29 Thread lowpass
It looks to me like your code is expecting a key, 'Upload' in the
request data. What does your form look like?

Also, debug($this->request-data)

On Thu, Jun 28, 2012 at 5:34 PM, Guti Grewal  wrote:
> Hi I've uploaded my website on a free hosting site called 000webhost, it
> works fine on localhost but however when I try to upload a file to the
> server using a form I get thrown this error.
>
> Notice (8): Undefined index:  Upload [APP/Controller/UploadsController.php,
> line 32]
> Code
>
> UploadsController::add() - APP/Controller/UploadsController.php, line 32
> ReflectionMethod::invokeArgs() - [internal], line ??
> Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 485
> Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 103
> Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 85
> [main] - APP/webroot/index.php, line 96
>
>
> I can't for the life of me figure out what is going wrong?
>
> I've set the permissions for the webroot/files/uploads folder to 777, so it
> can't possibly be that.
>
> Anyone have any ideas?
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Undefined index after web host install.

2012-06-28 Thread Guti Grewal
Hi I've uploaded my website on a free hosting site called 000webhost, it 
works fine on localhost but however when I try to upload a file to the 
server using a form I get thrown this error.

*Notice* (8): Undefined index:  Upload [*APP/Controller/UploadsController.php*, 
line *32*]
Code

UploadsController::add() - APP/Controller/UploadsController.php, line 32
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() - CORE/Cake/Controller/Controller.php, line 485
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.php, line 103
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.php, line 85
[main] - APP/webroot/index.php, line 96


I can't for the life of me figure out what is going wrong?

I've set the permissions for the webroot/files/uploads folder to 777, so it 
can't possibly be that. 

Anyone have any ideas?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index error in controller

2012-04-12 Thread Daniel
I found the problem, stupidly I had two copies of the ctp file in my
project, in different directories, and I was editing the wrong one.
After I deleted the extra file and edited the "right" file, no suprise
the problem went away.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index error in controller

2012-04-05 Thread Tilen Majerle
ur cake version is ?

and instead of this  Form->create('Image',
array('enctype' => 'multipart/
form-data')); ?>

use  Form->create('Image', array('type' => 'file')); ?>

and in your controller simply debug $this->request->data to see what data
you have posted
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2012/4/5 Daniel 

> Form->create('Image', array('enctype' => 'multipart/
> form-data')); ?>
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index error in controller

2012-04-05 Thread Jeremy Burns | Class Outfit
You are trying to access the 'Image' key of an array in line 31 of your 
images_controller, but the array key does not exist.

How do I know this? Because I read the error message.

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 5 Apr 2012, at 16:48:15, Daniel wrote:

> I get the following error in my ImagesController:
> Notice (8): Undefined index: Image [APP\Controller
> \ImagesController.php, line 31]
> 
> The controller code is as follows (ending on line 31) :
> 
> public function img_upload($person_id = null) {
>   if ($this->request->is('post')) {
>   $fileinfo = $this->request->data['Image']['filename'];
> ...
> 
> The ctp file is as follows:
> 
> 
> Form->create('Image', array('enctype' => 'multipart/
> form-data')); ?>
>   
>   
>   Form->input('filename', array('type' => 'file')); ?
>> 
>   
> Form->end(__('Submit'));?>
> 
> 
>   
>   
>   Html->link(__('Home Page', true),
> array('controller' => 'pages', 'action' => 'index')); ?> 
>   
> 
> 
> What am I missing?
> 
> Thanks.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Undefined index error in controller

2012-04-05 Thread Daniel
I get the following error in my ImagesController:
Notice (8): Undefined index: Image [APP\Controller
\ImagesController.php, line 31]

The controller code is as follows (ending on line 31) :

public function img_upload($person_id = null) {
if ($this->request->is('post')) {
$fileinfo = $this->request->data['Image']['filename'];
...

The ctp file is as follows:


Form->create('Image', array('enctype' => 'multipart/
form-data')); ?>


Form->input('filename', array('type' => 'file')); ?
>

Form->end(__('Submit'));?>




Html->link(__('Home Page', true),
array('controller' => 'pages', 'action' => 'index')); ?> 



What am I missing?

Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index with associated afterFind()

2012-02-21 Thread jeremyharris
Well for one you're calling a find twice, once in $this->Quote->find('all') 
and again in $this->paginate(). You only should be calling 
$this->paginate() which will perform the find for you, and limit the 
results to the pagination settings.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index with associated afterFind()

2012-02-21 Thread Ralph stokes
Well my associations are:

Rate - hasManyProducts
Product - belongsTo Material, belongsTo Rate, hasAndBelongsToMany
Quote
Quote - belongsTo Product
Material - hasManyProducts

In QuotesController index function I have:

$quotes = $this->Quote->recursive = 2;
if ($this->Session->read('Auth.User.role') == 'admin') {
$this->set('quotes', $this->Quote->find('all'), 
$this->paginate());
}

Now I've also noticed that the database is queried twice for every
quote.

On Feb 16, 3:24 pm, jeremyharris  wrote:
> Let's see your model associations set up, where the afterFind is, and what
> find call you are using. That will probably give me a better understanding
> of what's going on.
>
> Also have you looked at virtual fields? They might be an answer to your
> problem.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index with associated afterFind()

2012-02-16 Thread jeremyharris
Let's see your model associations set up, where the afterFind is, and what 
find call you are using. That will probably give me a better understanding 
of what's going on. 

Also have you looked at virtual fields? They might be an answer to your 
problem. 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index with associated afterFind()

2012-02-16 Thread Ralph stokes
Rodrigo:  Pre-calculation is not an option as all products in the
system would have to be recalculated when core values are changed.  I
tried doing that originally and it was very,, very messy.

Jeremy:  Thanks, i've tried the recursion and contain properties with
no luck.  Whatever I try the Product model does no include the
Material array (on which it depends) when called from the Quote
model.  The only other way i can think of is to associate the material
with the quote and perform the calculations again but this means
repeating code.  Surely the quote model should should load the
material model inside the product model through association?

On Feb 16, 12:42 pm, Rodrigo Rodrigues Moyle 
wrote:
> A better way is pre-calculate the values and save on database.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index with associated afterFind()

2012-02-16 Thread Rodrigo Rodrigues Moyle
A better way is pre-calculate the values and save on database.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index with associated afterFind()

2012-02-15 Thread jeremyharris
Maybe your original find didn't include that association. Check recursive 
or contain to make sure it should be included in the first place. Then 
debug the results in afterFind and the results where you originally called 
the find. 

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Undefined index with associated afterFind()

2012-02-15 Thread Ralph stokes
I'm using cakePHP 2.0 afterFind() callback to perform calculations on
database values before it is displayed.

I have three models - Materials, Products and Quotes.

Each product has a material and calculations are performed in the
Product afterFind callback using this association, specifically with
the line:

$results[$key]['Product']['material_cost'] = $results[$key]['Product']
['material_mass'] * $val['Material']['cost'];
with $val['Material']['cost'] referring to the associated material.

All fine so far.

Next I have an afterFind() callback in my Quote model. The quote is
associated with a product and the calculations in the quote model are
dependant on the calculations in the Product model taking place -
specifically the one which referances the material.

I can reference the Product model afterfind results in the Quote model
afterFind just fine like: $val['Product']['number_tools']

However, now the Product model cannot find the associated material and
I get the error: Undefined index: Material [APP/Model/Product.php,
line 126].
on line 126 of Product.php is

$val['Material']['cost']
How can I get around this problem, it's driving me nuts!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Undefined index Error

2011-09-25 Thread WebbedIT
As the error clearly states, on line 43 of your view code you are
trying to access an undefined index (variable or array).

Find line 43 (we're not going to do that for you as the block of code
is now poorly formatted due to Google Groups width restrictions) and
make sure you're setting the variable in the controller or remove the
varable if not needed.

HTH, Paul

On Sep 24, 12:02 pm, Adwait Karmarkar 
wrote:
> I am  are building a Hotel application
>
> When I try to list all hotels using Pages controller, and result.ctp
> (Viewing page) I am getting an error as:
>
> Undefined index:  id [APP/views/pages/result.ctp, line 43]
>
> I am using the same code that works in the baked hotels controller.
>
> Please check the code for Result.ctp:
>
> 
>         
>         
>         
>                         Paginator->sort('id');?>
>                         Paginator->sort('name');?>
> 
>                  $i = 0;
>         foreach ($hotels as $hotel):
>                 $class = null;
>                 if ($i++ % 2 == 0) {
>                         $class = ' class="altrow"';
>                 }
>         ?>
>         >
>                  
>                  
> 
>                          $this->Html->link($hotel['Template']['name'],
> array('controller' => 'templates', 'action' => 'view',
> $hotel['Template']['id'])); ?>
>                 
>                  ?> 
>                 
>                         Html->link(__('View', true), 
> array('action' =>
> 'view', $hotel['Hotel']['id'])); ?>
>                         Html->link(__('Edit', true), 
> array('action' =>
> 'edit', $hotel['Hotel']['id'])); ?>
>                         Html->link(__('Delete', true), 
> array('action' =>
> 'delete', $hotel['Hotel']['id']), null, sprintf(__('Are you sure you
> want to delete # %s?', true), $hotel['Hotel']['id'])); ?>
>                 
>         
> 
>         
>                  echo $this->Paginator->counter(array(
>         'format' => __('Page %page% of %pages%, showing %current% records out
> of %count% total, starting on record %start%, ending on %end%', true)
>         ));
>         ?>   
>
>         
>                 Paginator->prev('<< ' . __('previous', 
> true),
> array(), null, array('class'=>'disabled'));?>
>          |      Paginator->numbers();?>
>  |
>                 Paginator->next(__('next', true) . ' >>', 
> array(),
> null, array('class' => 'disabled'));?>
>         
> 
>
> pages_controller.php
>
>  Reference #4 -
> class PagesController extends AppController{
>  public $uses = array('City','Hotel');
>
>         function beforeFilter() {
>                 parent::beforeFilter();
>                 $this->Auth->allow(array('*'));
>         }
>
>     public function display() {
>
>    $this->Hotel->recursive = 0;
>                 $this->set('hotels', $this->paginate());
>
>    // $this->set('citynew', $this->data['City']['city_id']);
> //$h = array();
> //$h = $this->Hotel->find('list');
> //$this->set(compact('h'));
>    //    $this->set('h',$this->Hotel->query('Select * from hotels'));
>             // $this->set('citynew', $this->data['City']['city_id']);
>    // $this->set('hotels',$this->Hotel->query("Select a.name from
> hotels a where a.city_id='" . $citynew . "'"));
>
>       //$sql=("Select a.name from hotels a where a.city_id='" .
> $citynew . "'");
>       //$this->set('sql',$this->Hotel->query($this-
>
> >set(compact('cities'));$sql));
>
>   //   $sql=$this->Hotel->qury();
>    //  $this->set('sql',$sql);
>
>         $viewFilename = array_pop($this->params['pass']) . '.ctp';
>         $viewFilename = str_replace('-', '_', $viewFilename);
>         $cities = $this->City->find('list');
>
>         $viewPath =  DS . $viewFilename;
>         if ($this->params['pass']) {
>             $viewPath = DS . implode(DS, $this->params['pass']) .
> $viewPath;
>         }
>
>         if (file_exists(VIEWS.'pages'.$viewPath)) {
>             $this->render(null, null, VIEWS.'pages'.$viewPath);
>         } else {
>             $this->cakeError('error404');
>         }
>
>         }
>         function home() {
>                 $cities = $this->City->find('list');
>                 $this->set(compact('cities'));
>         }
>         function result(){
>
>    }
>
> }
>
> ?>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Undefined index Error

2011-09-24 Thread Adwait Karmarkar
I am  are building a Hotel application

When I try to list all hotels using Pages controller, and result.ctp
(Viewing page) I am getting an error as:

Undefined index:  id [APP/views/pages/result.ctp, line 43]

I am using the same code that works in the baked hotels controller.

Please check the code for Result.ctp:





Paginator->sort('id');?>
Paginator->sort('name');?>


>
 
 

Html->link($hotel['Template']['name'],
array('controller' => 'templates', 'action' => 'view',
$hotel['Template']['id'])); ?>

 

Html->link(__('View', true), 
array('action' =>
'view', $hotel['Hotel']['id'])); ?>
Html->link(__('Edit', true), 
array('action' =>
'edit', $hotel['Hotel']['id'])); ?>
Html->link(__('Delete', true), 
array('action' =>
'delete', $hotel['Hotel']['id']), null, sprintf(__('Are you sure you
want to delete # %s?', true), $hotel['Hotel']['id'])); ?>




Paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out
of %count% total, starting on record %start%, ending on %end%', true)
));
?>  


Paginator->prev('<< ' . __('previous', true),
array(), null, array('class'=>'disabled'));?>
 |  Paginator->numbers();?>
 |
Paginator->next(__('next', true) . ' >>', 
array(),
null, array('class' => 'disabled'));?>





pages_controller.php


Auth->allow(array('*'));
}

public function display() {

   $this->Hotel->recursive = 0;
$this->set('hotels', $this->paginate());

   // $this->set('citynew', $this->data['City']['city_id']);
//$h = array();
//$h = $this->Hotel->find('list');
//$this->set(compact('h'));
   //$this->set('h',$this->Hotel->query('Select * from hotels'));
// $this->set('citynew', $this->data['City']['city_id']);
   // $this->set('hotels',$this->Hotel->query("Select a.name from
hotels a where a.city_id='" . $citynew . "'"));


  //$sql=("Select a.name from hotels a where a.city_id='" .
$citynew . "'");
  //$this->set('sql',$this->Hotel->query($this-
>set(compact('cities'));$sql));

  //   $sql=$this->Hotel->qury();
   //  $this->set('sql',$sql);



$viewFilename = array_pop($this->params['pass']) . '.ctp';
$viewFilename = str_replace('-', '_', $viewFilename);
$cities = $this->City->find('list');

$viewPath =  DS . $viewFilename;
if ($this->params['pass']) {
$viewPath = DS . implode(DS, $this->params['pass']) .
$viewPath;
}

if (file_exists(VIEWS.'pages'.$viewPath)) {
$this->render(null, null, VIEWS.'pages'.$viewPath);
} else {
$this->cakeError('error404');
}

}
function home() {
$cities = $this->City->find('list');
$this->set(compact('cities'));
}
function result(){


   }

}
?>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Notice (8): Undefined index: id?

2011-07-26 Thread ianemv
Resolved mine by renaming the table. Instead of just detail, I named my child
table details :) my mistake

-
The best thing we can share in this world is knowledge
Shared Corner 
--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Notice-8-Undefined-index-id-tp1332361p4634126.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Override primarikey Undefined index: id Error

2011-06-09 Thread Jeremy Burns | Class Outfit
Your model looks wrong. My guess is that Cake can't find it and is therefore 
creating it's own version on the fly that doesn't therefore have the primaryKey 
definition. Make sure your file is called /app/models/amg_predio.php and the 
content is (note the lack of 's'):



Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 9 Jun 2011, at 15:34, MrMariscal wrote:

> I have a model definition where I override the primaryKey as follows:
> 
> 
>class Amg_Predios extends AppModel {
>   var $name = 'Amg_Predios';
>   var $primaryKey = 'gid';
>   }
> ?>
> 
> but when in my controller I use the:
> 
> 
>   $this->AmgPredio->save( $this->data );
> 
> I get this error:
>   Notice (8): Undefined index: id [CORE/cake/libs/model/model.php, line 
> 1329]
> 
> And after it, a message who says I'm trying to insert a duplicate record,
> because the primarykey already exists.
> 
> I have flushed the cache and it is still not working.
> 
> Any clues about what I'm doing wrong?
> 
> Thanks in advance.
> 
> --
> View this message in context: 
> http://cakephp.1045679.n5.nabble.com/Override-primarikey-Undefined-index-id-Error-tp4472931p4472931.html
> Sent from the CakePHP mailing list archive at Nabble.com.
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Override primarikey Undefined index: id Error

2011-06-09 Thread MrMariscal
I have a model definition where I override the primaryKey as follows:




but when in my controller I use the:


$this->AmgPredio->save( $this->data );

I get this error:
Notice (8): Undefined index: id [CORE/cake/libs/model/
model.php, line 1329]

And after it, a message who says I'm trying to insert a duplicate
record, because the primarykey already exists.

I have flushed the cache and it is still not working.

Any clues about what I'm doing wrong?

Thanks in advance.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Override primarikey Undefined index: id Error

2011-06-09 Thread MrMariscal
I have a model definition where I override the primaryKey as follows:




but when in my controller I use the:


$this->AmgPredio->save( $this->data );

I get this error:
Notice (8): Undefined index: id [CORE/cake/libs/model/model.php, line 
1329]

And after it, a message who says I'm trying to insert a duplicate record,
because the primarykey already exists.

I have flushed the cache and it is still not working.

Any clues about what I'm doing wrong?

Thanks in advance.

--
View this message in context: 
http://cakephp.1045679.n5.nabble.com/Override-primarikey-Undefined-index-id-Error-tp4472931p4472931.html
Sent from the CakePHP mailing list archive at Nabble.com.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Strange issue in Single View : Undefined index

2011-04-13 Thread Mr.Jayesh
Hae...

Thanks for the prompt advice.
The Recursive did the trick.

Thanks Again.

Regards,
Jayesh

On Apr 13, 2:15 am, euromark  wrote:
> http://book.cakephp.org/view/1063/recursive
>
> or containable behavior
>
> On 12 Apr., 22:10, "Mr.Jayesh"  wrote:
>
>
>
>
>
>
>
> > Hi Mates,
>
> > As currently I am working on a project of some directory. I am
> > frequently landing up into a strange problem.
> > Initially, when I set up the installation, and start working with
> > models, controllers and views. everything is ok. but the problem arise
> > when I run the single view function. Let me explain with an example:
>
> > I have tables like: Medicine, Manufacturer, Origin, etc.
> > Similarly I have models and controllers. The relations are.
> > manufacturers hasMany medicines; Origin hasMany medicines ; medicines
> > belongsTo manufacturers and origin.
>
> > now I have four functions in my medicine controller:
> > index (which is a search form)
> > search (search function and logic)
> > result (that renders the search result)
> > details (that displays individual details of each post.)
>
> > When I search using form there is no problem, I get the results
> > according with various joins. The results has a link to details view
> > like this:
>
> > function details($id = null) {
> >  //all logic here
>
> > }
>
> > The problem arises here. I am able to land up in correct page.but the
> > view is unable to show me join data. where ever the datas are from
> > other tables like manufacturers and origin and others, it shows a
> > Undefined index like this:
>
> > Notice (8): Undefined index:  Manufacturer [APP/views/medicines/
> > detail.ctp, line 10]
>
> > Notice (8): Undefined index:  Origin [APP/views/medicines/detail.ctp,
> > line 18]
>
> > All other data that is from same table of medicines show correctly.
>
> > May anyone point me in right direction, please. I am totally
> > frustrated in this and messed up. I cant find this solution anywhere
> > over internet. I am using CakePHP 1.3.6 installation.
>
> > I made 4 fresh installation but the results are same.
>
> > Please help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Strange issue in Single View : Undefined index

2011-04-12 Thread euromark
http://book.cakephp.org/view/1063/recursive

or containable behavior

On 12 Apr., 22:10, "Mr.Jayesh"  wrote:
> Hi Mates,
>
> As currently I am working on a project of some directory. I am
> frequently landing up into a strange problem.
> Initially, when I set up the installation, and start working with
> models, controllers and views. everything is ok. but the problem arise
> when I run the single view function. Let me explain with an example:
>
> I have tables like: Medicine, Manufacturer, Origin, etc.
> Similarly I have models and controllers. The relations are.
> manufacturers hasMany medicines; Origin hasMany medicines ; medicines
> belongsTo manufacturers and origin.
>
> now I have four functions in my medicine controller:
> index (which is a search form)
> search (search function and logic)
> result (that renders the search result)
> details (that displays individual details of each post.)
>
> When I search using form there is no problem, I get the results
> according with various joins. The results has a link to details view
> like this:
>
> function details($id = null) {
>  //all logic here
>
> }
>
> The problem arises here. I am able to land up in correct page.but the
> view is unable to show me join data. where ever the datas are from
> other tables like manufacturers and origin and others, it shows a
> Undefined index like this:
>
> Notice (8): Undefined index:  Manufacturer [APP/views/medicines/
> detail.ctp, line 10]
>
> Notice (8): Undefined index:  Origin [APP/views/medicines/detail.ctp,
> line 18]
>
> All other data that is from same table of medicines show correctly.
>
> May anyone point me in right direction, please. I am totally
> frustrated in this and messed up. I cant find this solution anywhere
> over internet. I am using CakePHP 1.3.6 installation.
>
> I made 4 fresh installation but the results are same.
>
> Please help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Strange issue in Single View : Undefined index

2011-04-12 Thread Mr.Jayesh
Hi Mates,

As currently I am working on a project of some directory. I am
frequently landing up into a strange problem.
Initially, when I set up the installation, and start working with
models, controllers and views. everything is ok. but the problem arise
when I run the single view function. Let me explain with an example:

I have tables like: Medicine, Manufacturer, Origin, etc.
Similarly I have models and controllers. The relations are.
manufacturers hasMany medicines; Origin hasMany medicines ; medicines
belongsTo manufacturers and origin.

now I have four functions in my medicine controller:
index (which is a search form)
search (search function and logic)
result (that renders the search result)
details (that displays individual details of each post.)

When I search using form there is no problem, I get the results
according with various joins. The results has a link to details view
like this:

function details($id = null) {
 //all logic here
}

The problem arises here. I am able to land up in correct page.but the
view is unable to show me join data. where ever the datas are from
other tables like manufacturers and origin and others, it shows a
Undefined index like this:

Notice (8): Undefined index:  Manufacturer [APP/views/medicines/
detail.ctp, line 10]

Notice (8): Undefined index:  Origin [APP/views/medicines/detail.ctp,
line 18]

All other data that is from same table of medicines show correctly.

May anyone point me in right direction, please. I am totally
frustrated in this and messed up. I cant find this solution anywhere
over internet. I am using CakePHP 1.3.6 installation.

I made 4 fresh installation but the results are same.

Please help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: problem with saving models..undefined index...

2010-09-15 Thread Andrei Mita
Tomfox, why do you constantly open 2-3 threads with the same question?


On Wed, Sep 15, 2010 at 9:20 PM, j.blotus  wrote:

> you may have to modify that a bit to fit your data structure, i did
> not fully analyze your example
>
> On Sep 15, 2:19 pm, "j.blotus"  wrote:
> > foreach ($tmp_attachment as $key => $value) {
> >  $this->data['LinkAttachment'][$key]['filetype'] = $value;
> >
> > }
> >
> > that should give you a numeric indexed array that conforms with the
> > spec in the api:http://book.cakephp.org/view/75/Saving-Your-Data
> > saveAll
> >
> > hope that helps
> >
> > That would give you a numeric indexed array for saving, but since I
> > dont'
> >
> > On Sep 15, 2:07 pm, Tomfox Wiranata  wrote:
> >
> >
> >
> > > huh, that makes sense :)
> >
> > > this is the array
> >
> > > Array (
> > >  [0] => Array ( [LinkTmp] => Array ( [id] => 695 [link_id] => 0 [eyed]
> > > => 111 [title] => [name] => Gehalt.xslsx [path] => ../link/111/
> > > Gehalt.xlsx [filetype] => xlsx [size] => 22528 [flyer_big] =>
> > > [flyer_thumb] => [qr] => [attachment] => 1 [created] => 2010-09-15
> > > 19:44:53 ) )
> >
> > >  [1] => Array ( [LinkTmp] => Array ( [id] => 699 [link_id] => 0 [eyed]
> > > => 111 [title] => [name] => Meeting 18082010.ppt [path] => ../link/
> > > 111/
> > > WITA Meeting 18082010.ppt [filetype] => ppt [size] => 152576
> > > [flyer_big] => [flyer_thumb] => [qr] => [attachment] => 1 [created] =>
> > > 2010-09-15 19:47:38 ) ) )
> > > x :)
> >
> > > any suggestions how to code related to this structure? i guess it has
> > > to look sth like this?
> >
> > >  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['0']
> > > ['LinkTmp']['filetype'];
> >
> > > except that I need a counter. If there are 4 results, I need 0-3 as
> > > index..
> >
> > > qucik ideas?
> >
> > > thx :)
> >
> > > On 15 Sep., 19:13, "j.blotus"  wrote:
> >
> > > > When you do find 'all', it returns the array in a numeric index, when
> > > > you do find 'first' it returns a single item with no numeric index.
> > > > When you omit parameters, I believe it defaults to 'first'.
> >
> > > > So the answer is you need to look at how the array you are trying to
> > > > work with is formatted.
> >
> > > > print_r($tmp_attachment);
> >
> > > > Missing index is the most basic of errors, it just tells you the
> index
> > > > you are looking for doesn't exist.
> >
> > > > On Sep 15, 12:55 pm, Tomfox Wiranata 
> > > > wrote:
> >
> > > > > as soon as I abandon the 'all' paramter in my find() function, cake
> > > > > stops throwing this error.
> >
> > > > > but i need 'all' because i am expecting multiple entries
> >
> > > > > On 15 Sep., 18:50, Tomfox Wiranata 
> wrote:
> >
> > > > > > hi.
> >
> > > > > > I have two Models LinkTmp and LinkAttachment, hence two tables.
> these
> > > > > > two models have no relation at all, since the LinkTmp is just for
> > > > > > temporary storing, till the User finally saves his product.
> >
> > > > > > I want to save data from LinkTmp in LinkAttachment. Its nothing
> else
> > > > > > than copying the data from the temp table to the real target. So
> first
> > > > > > i get all the data from LinkTmp I need:
> >
> > > > > > $tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc
> =' =>
> > > > > > $this -> Session -> read('Link.abc'), 'LinkTmp.attachment' =>
> '1'));
> >
> > > > > > the result is multiple results. I checked. now i need to save
> these
> > > > > > results in LinkAttachment:
> >
> > > > > >  $this->data['LinkAttachment']['filesize'] =
> $tmp_attachment['LinkTmp']
> > > > > > ['size'];
> > > > > >  $this->data['LinkAttachment']['filetype'] =
> $tmp_attachment['LinkTmp']
> > > > > > ['filetype'];
> > > > > >  $this->LinkAttachment->saveAll($this->data);
> >
> > > > > > now cake throws
> >
> > > > > > Notice (8): Undefined index: LinkTmp
> >
> > > > > > how is that possible? I used this model before in my view the
> same
> > > > > > way, just with pure find() and no 'all'...
> >
> > > > > > thanks !!
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: problem with saving models..undefined index...

2010-09-15 Thread j.blotus
you may have to modify that a bit to fit your data structure, i did
not fully analyze your example

On Sep 15, 2:19 pm, "j.blotus"  wrote:
> foreach ($tmp_attachment as $key => $value) {
>      $this->data['LinkAttachment'][$key]['filetype'] = $value;
>
> }
>
> that should give you a numeric indexed array that conforms with the
> spec in the api:http://book.cakephp.org/view/75/Saving-Your-Data
> saveAll
>
> hope that helps
>
> That would give you a numeric indexed array for saving, but since I
> dont'
>
> On Sep 15, 2:07 pm, Tomfox Wiranata  wrote:
>
>
>
> > huh, that makes sense :)
>
> > this is the array
>
> > Array (
> >  [0] => Array ( [LinkTmp] => Array ( [id] => 695 [link_id] => 0 [eyed]
> > => 111 [title] => [name] => Gehalt.xslsx [path] => ../link/111/
> > Gehalt.xlsx [filetype] => xlsx [size] => 22528 [flyer_big] =>
> > [flyer_thumb] => [qr] => [attachment] => 1 [created] => 2010-09-15
> > 19:44:53 ) )
>
> >  [1] => Array ( [LinkTmp] => Array ( [id] => 699 [link_id] => 0 [eyed]
> > => 111 [title] => [name] => Meeting 18082010.ppt [path] => ../link/
> > 111/
> > WITA Meeting 18082010.ppt [filetype] => ppt [size] => 152576
> > [flyer_big] => [flyer_thumb] => [qr] => [attachment] => 1 [created] =>
> > 2010-09-15 19:47:38 ) ) )
> > x :)
>
> > any suggestions how to code related to this structure? i guess it has
> > to look sth like this?
>
> >  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['0']
> > ['LinkTmp']['filetype'];
>
> > except that I need a counter. If there are 4 results, I need 0-3 as
> > index..
>
> > qucik ideas?
>
> > thx :)
>
> > On 15 Sep., 19:13, "j.blotus"  wrote:
>
> > > When you do find 'all', it returns the array in a numeric index, when
> > > you do find 'first' it returns a single item with no numeric index.
> > > When you omit parameters, I believe it defaults to 'first'.
>
> > > So the answer is you need to look at how the array you are trying to
> > > work with is formatted.
>
> > > print_r($tmp_attachment);
>
> > > Missing index is the most basic of errors, it just tells you the index
> > > you are looking for doesn't exist.
>
> > > On Sep 15, 12:55 pm, Tomfox Wiranata 
> > > wrote:
>
> > > > as soon as I abandon the 'all' paramter in my find() function, cake
> > > > stops throwing this error.
>
> > > > but i need 'all' because i am expecting multiple entries
>
> > > > On 15 Sep., 18:50, Tomfox Wiranata  wrote:
>
> > > > > hi.
>
> > > > > I have two Models LinkTmp and LinkAttachment, hence two tables. these
> > > > > two models have no relation at all, since the LinkTmp is just for
> > > > > temporary storing, till the User finally saves his product.
>
> > > > > I want to save data from LinkTmp in LinkAttachment. Its nothing else
> > > > > than copying the data from the temp table to the real target. So first
> > > > > i get all the data from LinkTmp I need:
>
> > > > > $tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc =' =>
> > > > > $this -> Session -> read('Link.abc'), 'LinkTmp.attachment' => '1'));
>
> > > > > the result is multiple results. I checked. now i need to save these
> > > > > results in LinkAttachment:
>
> > > > >  $this->data['LinkAttachment']['filesize'] = 
> > > > > $tmp_attachment['LinkTmp']
> > > > > ['size'];
> > > > >  $this->data['LinkAttachment']['filetype'] = 
> > > > > $tmp_attachment['LinkTmp']
> > > > > ['filetype'];
> > > > >  $this->LinkAttachment->saveAll($this->data);
>
> > > > > now cake throws
>
> > > > > Notice (8): Undefined index: LinkTmp
>
> > > > > how is that possible? I used this model before in my view the same
> > > > > way, just with pure find() and no 'all'...
>
> > > > > thanks !!

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


Re: problem with saving models..undefined index...

2010-09-15 Thread j.blotus
foreach ($tmp_attachment as $key => $value) {
 $this->data['LinkAttachment'][$key]['filetype'] = $value;
}

that should give you a numeric indexed array that conforms with the
spec in the api:
http://book.cakephp.org/view/75/Saving-Your-Data
saveAll

hope that helps

That would give you a numeric indexed array for saving, but since I
dont'

On Sep 15, 2:07 pm, Tomfox Wiranata  wrote:
> huh, that makes sense :)
>
> this is the array
>
> Array (
>  [0] => Array ( [LinkTmp] => Array ( [id] => 695 [link_id] => 0 [eyed]
> => 111 [title] => [name] => Gehalt.xslsx [path] => ../link/111/
> Gehalt.xlsx [filetype] => xlsx [size] => 22528 [flyer_big] =>
> [flyer_thumb] => [qr] => [attachment] => 1 [created] => 2010-09-15
> 19:44:53 ) )
>
>  [1] => Array ( [LinkTmp] => Array ( [id] => 699 [link_id] => 0 [eyed]
> => 111 [title] => [name] => Meeting 18082010.ppt [path] => ../link/
> 111/
> WITA Meeting 18082010.ppt [filetype] => ppt [size] => 152576
> [flyer_big] => [flyer_thumb] => [qr] => [attachment] => 1 [created] =>
> 2010-09-15 19:47:38 ) ) )
> x :)
>
> any suggestions how to code related to this structure? i guess it has
> to look sth like this?
>
>  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['0']
> ['LinkTmp']['filetype'];
>
> except that I need a counter. If there are 4 results, I need 0-3 as
> index..
>
> qucik ideas?
>
> thx :)
>
> On 15 Sep., 19:13, "j.blotus"  wrote:
>
>
>
> > When you do find 'all', it returns the array in a numeric index, when
> > you do find 'first' it returns a single item with no numeric index.
> > When you omit parameters, I believe it defaults to 'first'.
>
> > So the answer is you need to look at how the array you are trying to
> > work with is formatted.
>
> > print_r($tmp_attachment);
>
> > Missing index is the most basic of errors, it just tells you the index
> > you are looking for doesn't exist.
>
> > On Sep 15, 12:55 pm, Tomfox Wiranata 
> > wrote:
>
> > > as soon as I abandon the 'all' paramter in my find() function, cake
> > > stops throwing this error.
>
> > > but i need 'all' because i am expecting multiple entries
>
> > > On 15 Sep., 18:50, Tomfox Wiranata  wrote:
>
> > > > hi.
>
> > > > I have two Models LinkTmp and LinkAttachment, hence two tables. these
> > > > two models have no relation at all, since the LinkTmp is just for
> > > > temporary storing, till the User finally saves his product.
>
> > > > I want to save data from LinkTmp in LinkAttachment. Its nothing else
> > > > than copying the data from the temp table to the real target. So first
> > > > i get all the data from LinkTmp I need:
>
> > > > $tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc =' =>
> > > > $this -> Session -> read('Link.abc'), 'LinkTmp.attachment' => '1'));
>
> > > > the result is multiple results. I checked. now i need to save these
> > > > results in LinkAttachment:
>
> > > >  $this->data['LinkAttachment']['filesize'] = $tmp_attachment['LinkTmp']
> > > > ['size'];
> > > >  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['LinkTmp']
> > > > ['filetype'];
> > > >  $this->LinkAttachment->saveAll($this->data);
>
> > > > now cake throws
>
> > > > Notice (8): Undefined index: LinkTmp
>
> > > > how is that possible? I used this model before in my view the same
> > > > way, just with pure find() and no 'all'...
>
> > > > thanks !!

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


Re: problem with saving models..undefined index...

2010-09-15 Thread Tomfox Wiranata
huh, that makes sense :)

this is the array

Array (
 [0] => Array ( [LinkTmp] => Array ( [id] => 695 [link_id] => 0 [eyed]
=> 111 [title] => [name] => Gehalt.xslsx [path] => ../link/111/
Gehalt.xlsx [filetype] => xlsx [size] => 22528 [flyer_big] =>
[flyer_thumb] => [qr] => [attachment] => 1 [created] => 2010-09-15
19:44:53 ) )

 [1] => Array ( [LinkTmp] => Array ( [id] => 699 [link_id] => 0 [eyed]
=> 111 [title] => [name] => Meeting 18082010.ppt [path] => ../link/
111/
WITA Meeting 18082010.ppt [filetype] => ppt [size] => 152576
[flyer_big] => [flyer_thumb] => [qr] => [attachment] => 1 [created] =>
2010-09-15 19:47:38 ) ) )
x :)

any suggestions how to code related to this structure? i guess it has
to look sth like this?

 $this->data['LinkAttachment']['filetype'] = $tmp_attachment['0']
['LinkTmp']['filetype'];

except that I need a counter. If there are 4 results, I need 0-3 as
index..

qucik ideas?

thx :)

On 15 Sep., 19:13, "j.blotus"  wrote:
> When you do find 'all', it returns the array in a numeric index, when
> you do find 'first' it returns a single item with no numeric index.
> When you omit parameters, I believe it defaults to 'first'.
>
> So the answer is you need to look at how the array you are trying to
> work with is formatted.
>
> print_r($tmp_attachment);
>
> Missing index is the most basic of errors, it just tells you the index
> you are looking for doesn't exist.
>
> On Sep 15, 12:55 pm, Tomfox Wiranata 
> wrote:
>
> > as soon as I abandon the 'all' paramter in my find() function, cake
> > stops throwing this error.
>
> > but i need 'all' because i am expecting multiple entries
>
> > On 15 Sep., 18:50, Tomfox Wiranata  wrote:
>
> > > hi.
>
> > > I have two Models LinkTmp and LinkAttachment, hence two tables. these
> > > two models have no relation at all, since the LinkTmp is just for
> > > temporary storing, till the User finally saves his product.
>
> > > I want to save data from LinkTmp in LinkAttachment. Its nothing else
> > > than copying the data from the temp table to the real target. So first
> > > i get all the data from LinkTmp I need:
>
> > > $tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc =' =>
> > > $this -> Session -> read('Link.abc'), 'LinkTmp.attachment' => '1'));
>
> > > the result is multiple results. I checked. now i need to save these
> > > results in LinkAttachment:
>
> > >  $this->data['LinkAttachment']['filesize'] = $tmp_attachment['LinkTmp']
> > > ['size'];
> > >  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['LinkTmp']
> > > ['filetype'];
> > >  $this->LinkAttachment->saveAll($this->data);
>
> > > now cake throws
>
> > > Notice (8): Undefined index: LinkTmp
>
> > > how is that possible? I used this model before in my view the same
> > > way, just with pure find() and no 'all'...
>
> > > thanks !!

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


Re: problem with saving models..undefined index...

2010-09-15 Thread Tomfox Wiranata
huh, that makes sense :)

this is the array

Array (
 [0] => Array ( [LinkTmp] => Array ( [id] => 695 [link_id] => 0 [eyed]
=> 111 [title] => [name] => Gehalt.xslsx [path] => ../link/111/
Gehalt.xlsx [filetype] => xlsx [size] => 22528 [flyer_big] =>
[flyer_thumb] => [qr] => [attachment] => 1 [created] => 2010-09-15
19:44:53 ) )

 [1] => Array ( [LinkTmp] => Array ( [id] => 699 [link_id] => 0 [eyed]
=> 111 [title] => [name] => Meeting 18082010.ppt [path] => ../link/111/
WITA Meeting 18082010.ppt [filetype] => ppt [size] => 152576
[flyer_big] => [flyer_thumb] => [qr] => [attachment] => 1 [created] =>
2010-09-15 19:47:38 ) ) )
x :)
any suggestions how to code related to this structure?

th

On 15 Sep., 19:13, "j.blotus"  wrote:
> When you do find 'all', it returns the array in a numeric index, when
> you do find 'first' it returns a single item with no numeric index.
> When you omit parameters, I believe it defaults to 'first'.
>
> So the answer is you need to look at how the array you are trying to
> work with is formatted.
>
> print_r($tmp_attachment);
>
> Missing index is the most basic of errors, it just tells you the index
> you are looking for doesn't exist.
>
> On Sep 15, 12:55 pm, Tomfox Wiranata 
> wrote:
>
> > as soon as I abandon the 'all' paramter in my find() function, cake
> > stops throwing this error.
>
> > but i need 'all' because i am expecting multiple entries
>
> > On 15 Sep., 18:50, Tomfox Wiranata  wrote:
>
> > > hi.
>
> > > I have two Models LinkTmp and LinkAttachment, hence two tables. these
> > > two models have no relation at all, since the LinkTmp is just for
> > > temporary storing, till the User finally saves his product.
>
> > > I want to save data from LinkTmp in LinkAttachment. Its nothing else
> > > than copying the data from the temp table to the real target. So first
> > > i get all the data from LinkTmp I need:
>
> > > $tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc =' =>
> > > $this -> Session -> read('Link.abc'), 'LinkTmp.attachment' => '1'));
>
> > > the result is multiple results. I checked. now i need to save these
> > > results in LinkAttachment:
>
> > >  $this->data['LinkAttachment']['filesize'] = $tmp_attachment['LinkTmp']
> > > ['size'];
> > >  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['LinkTmp']
> > > ['filetype'];
> > >  $this->LinkAttachment->saveAll($this->data);
>
> > > now cake throws
>
> > > Notice (8): Undefined index: LinkTmp
>
> > > how is that possible? I used this model before in my view the same
> > > way, just with pure find() and no 'all'...
>
> > > thanks !!

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


Re: problem with saving models..undefined index...

2010-09-15 Thread j.blotus
When you do find 'all', it returns the array in a numeric index, when
you do find 'first' it returns a single item with no numeric index.
When you omit parameters, I believe it defaults to 'first'.

So the answer is you need to look at how the array you are trying to
work with is formatted.

print_r($tmp_attachment);

Missing index is the most basic of errors, it just tells you the index
you are looking for doesn't exist.

On Sep 15, 12:55 pm, Tomfox Wiranata 
wrote:
> as soon as I abandon the 'all' paramter in my find() function, cake
> stops throwing this error.
>
> but i need 'all' because i am expecting multiple entries
>
> On 15 Sep., 18:50, Tomfox Wiranata  wrote:
>
>
>
> > hi.
>
> > I have two Models LinkTmp and LinkAttachment, hence two tables. these
> > two models have no relation at all, since the LinkTmp is just for
> > temporary storing, till the User finally saves his product.
>
> > I want to save data from LinkTmp in LinkAttachment. Its nothing else
> > than copying the data from the temp table to the real target. So first
> > i get all the data from LinkTmp I need:
>
> > $tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc =' =>
> > $this -> Session -> read('Link.abc'), 'LinkTmp.attachment' => '1'));
>
> > the result is multiple results. I checked. now i need to save these
> > results in LinkAttachment:
>
> >  $this->data['LinkAttachment']['filesize'] = $tmp_attachment['LinkTmp']
> > ['size'];
> >  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['LinkTmp']
> > ['filetype'];
> >  $this->LinkAttachment->saveAll($this->data);
>
> > now cake throws
>
> > Notice (8): Undefined index: LinkTmp
>
> > how is that possible? I used this model before in my view the same
> > way, just with pure find() and no 'all'...
>
> > thanks !!

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


Re: problem with saving models..undefined index...

2010-09-15 Thread Tomfox Wiranata
as soon as I abandon the 'all' paramter in my find() function, cake
stops throwing this error.

but i need 'all' because i am expecting multiple entries

On 15 Sep., 18:50, Tomfox Wiranata  wrote:
> hi.
>
> I have two Models LinkTmp and LinkAttachment, hence two tables. these
> two models have no relation at all, since the LinkTmp is just for
> temporary storing, till the User finally saves his product.
>
> I want to save data from LinkTmp in LinkAttachment. Its nothing else
> than copying the data from the temp table to the real target. So first
> i get all the data from LinkTmp I need:
>
> $tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc =' =>
> $this -> Session -> read('Link.abc'), 'LinkTmp.attachment' => '1'));
>
> the result is multiple results. I checked. now i need to save these
> results in LinkAttachment:
>
>  $this->data['LinkAttachment']['filesize'] = $tmp_attachment['LinkTmp']
> ['size'];
>  $this->data['LinkAttachment']['filetype'] = $tmp_attachment['LinkTmp']
> ['filetype'];
>  $this->LinkAttachment->saveAll($this->data);
>
> now cake throws
>
> Notice (8): Undefined index: LinkTmp
>
> how is that possible? I used this model before in my view the same
> way, just with pure find() and no 'all'...
>
> thanks !!

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


problem with saving models..undefined index...

2010-09-15 Thread Tomfox Wiranata
hi.

I have two Models LinkTmp and LinkAttachment, hence two tables. these
two models have no relation at all, since the LinkTmp is just for
temporary storing, till the User finally saves his product.


I want to save data from LinkTmp in LinkAttachment. Its nothing else
than copying the data from the temp table to the real target. So first
i get all the data from LinkTmp I need:

$tmp_attachment = $this->LinkTmp->find('all', array('LinkTmp.abc =' =>
$this -> Session -> read('Link.abc'), 'LinkTmp.attachment' => '1'));

the result is multiple results. I checked. now i need to save these
results in LinkAttachment:

 $this->data['LinkAttachment']['filesize'] = $tmp_attachment['LinkTmp']
['size'];
 $this->data['LinkAttachment']['filetype'] = $tmp_attachment['LinkTmp']
['filetype'];
 $this->LinkAttachment->saveAll($this->data);

now cake throws


Notice (8): Undefined index: LinkTmp

how is that possible? I used this model before in my view the same
way, just with pure find() and no 'all'...

thanks !!

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Tomfox Wiranata
thx. all good now

thx a lot...

On 25 Jul., 20:28, cricket  wrote:
> On Sun, Jul 25, 2010 at 2:17 PM, Tomfox Wiranata
>
>  wrote:
> > well. thats it. the field names were wrongwhen i changed it to
> > firstname and lastname it workedi was close to jumoing out of the
> > window...thx a lot to all of you
>
> > but last questionhow can i name the label i want? cause lastname
> > and firstname is not the label i wanna have :)
>
> http://book.cakephp.org/view/196/options-labelhttp://book.cakephp.org/view/725/label

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread cricket
On Sun, Jul 25, 2010 at 2:17 PM, Tomfox Wiranata
 wrote:
> well. thats it. the field names were wrongwhen i changed it to
> firstname and lastname it workedi was close to jumoing out of the
> window...thx a lot to all of you
>
> but last questionhow can i name the label i want? cause lastname
> and firstname is not the label i wanna have :)

http://book.cakephp.org/view/196/options-label
http://book.cakephp.org/view/725/label

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Tomfox Wiranata
well. thats it. the field names were wrongwhen i changed it to
firstname and lastname it workedi was close to jumoing out of the
window...thx a lot to all of you

but last questionhow can i name the label i want? cause lastname
and firstname is not the label i wanna have :)

On 25 Jul., 20:07, AD7six  wrote:
> On Jul 25, 7:46 pm, Tomfox Wiranata  wrote:
>
> > cake inserts a new row WITHOUT inserting the entered data
>
> $form->input('Vorname',  <- your field names are wrong.
>
> try LOOKING at $this->data i.e. debug ($this->data); die;
>
> hth,
>
> AD

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread AD7six


On Jul 25, 7:46 pm, Tomfox Wiranata  wrote:
> cake inserts a new row WITHOUT inserting the entered data

$form->input('Vorname',  <- your field names are wrong.

try LOOKING at $this->data i.e. debug ($this->data); die;

hth,

AD

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread cricket
On Sun, Jul 25, 2010 at 1:44 PM, Tomfox Wiranata
 wrote:
> hey cricket, thx. it makes sense. but if i code
>
>        if (!empty($this->data))
>        {
>
>                if ($this->User->save($this->data))
>                        {
>                                $this->Session->setFlash('Profil 
> aktualisiert');
>                                $this->redirect(array('controller' => 'users', 
> 'action' =>
> 'profile'));
>                        }
>                        else{
>                                $this->Session->setFlash('Speichern 
> fehlgeschlagen');
>                                $this->redirect(array('controller' => 'users', 
> 'action' =>
> 'editprofile'));
>                        }
>        }
>
> cake inserts a complete new data in my table and does not update the
> on that is edited. the error occurs not though :)

You have to include a hidden form element with the record ID. See this
page in the tutorial:

http://book.cakephp.org/view/340/Editing-Posts

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Tomfox Wiranata
cake inserts a new row WITHOUT inserting the entered data

On 25 Jul., 19:44, Tomfox Wiranata  wrote:
> hey cricket, thx. it makes sense. but if i code
>
>         if (!empty($this->data))
>         {
>
>                 if ($this->User->save($this->data))
>                         {
>                                 $this->Session->setFlash('Profil 
> aktualisiert');
>                                 $this->redirect(array('controller' => 
> 'users', 'action' =>
> 'profile'));
>                         }
>                         else{
>                                 $this->Session->setFlash('Speichern 
> fehlgeschlagen');
>                                 $this->redirect(array('controller' => 
> 'users', 'action' =>
> 'editprofile'));
>                         }
>         }
>
> cake inserts a complete new data in my table and does not update the
> on that is edited. the error occurs not though :)
>
> but in case
>
> On 25 Jul., 19:21, cricket  wrote:
>
> > On Sun, Jul 25, 2010 at 12:39 PM, Tomfox Wiranata
>
> >  wrote:
> > > that is not correct?
>
> > > i try to access the information in the form with this->data and assign
> > > these to my database field with $updates:
>
> > > if i code:
> > >               $updates['User']['firstname']= "test";
> > >                $updates['User']['lastname']= "test_lastname";
>
> > > cake stores "test" in my database in "firstname" and "test_lastname"
> > > in "lastname" so you might be right, sth is wrong with this-
> > >>data..but what is correcT?
>
> > Oh, I just looked at that more carefully. It's a bit confusing because
> > you've got this $updates var that seems to be completely unnecessary.
> > Your controller method should look more like this:
>
> > function updateProfile()
> > {
> >         /* check if form was submitted
> >          */
> >         if (!empty($this->data))
> >         {
> >                 /* now save the submitted data
> >                  */
> >                 if ($this->User->save($this->data))
> >                 {
>
> > Without the test to see if $this->data is empty, that code would run
> > the first time you load the page. So, $this->data['User']['firstname']
> > does not exist. It's important to remember that, where forms are
> > involved, Cake runs the method/action twice.

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Tomfox Wiranata
hey cricket, thx. it makes sense. but if i code

if (!empty($this->data))
{

if ($this->User->save($this->data))
{
$this->Session->setFlash('Profil aktualisiert');
$this->redirect(array('controller' => 'users', 
'action' =>
'profile'));
}
else{
$this->Session->setFlash('Speichern 
fehlgeschlagen');
$this->redirect(array('controller' => 'users', 
'action' =>
'editprofile'));
}
}

cake inserts a complete new data in my table and does not update the
on that is edited. the error occurs not though :)

but in case

On 25 Jul., 19:21, cricket  wrote:
> On Sun, Jul 25, 2010 at 12:39 PM, Tomfox Wiranata
>
>  wrote:
> > that is not correct?
>
> > i try to access the information in the form with this->data and assign
> > these to my database field with $updates:
>
> > if i code:
> >               $updates['User']['firstname']= "test";
> >                $updates['User']['lastname']= "test_lastname";
>
> > cake stores "test" in my database in "firstname" and "test_lastname"
> > in "lastname" so you might be right, sth is wrong with this-
> >>data..but what is correcT?
>
> Oh, I just looked at that more carefully. It's a bit confusing because
> you've got this $updates var that seems to be completely unnecessary.
> Your controller method should look more like this:
>
> function updateProfile()
> {
>         /* check if form was submitted
>          */
>         if (!empty($this->data))
>         {
>                 /* now save the submitted data
>                  */
>                 if ($this->User->save($this->data))
>                 {
>
> Without the test to see if $this->data is empty, that code would run
> the first time you load the page. So, $this->data['User']['firstname']
> does not exist. It's important to remember that, where forms are
> involved, Cake runs the method/action twice.

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread cricket
On Sun, Jul 25, 2010 at 12:39 PM, Tomfox Wiranata
 wrote:
> that is not correct?
>
> i try to access the information in the form with this->data and assign
> these to my database field with $updates:
>
> if i code:
>               $updates['User']['firstname']= "test";
>                $updates['User']['lastname']= "test_lastname";
>
> cake stores "test" in my database in "firstname" and "test_lastname"
> in "lastname" so you might be right, sth is wrong with this-
>>data..but what is correcT?

Oh, I just looked at that more carefully. It's a bit confusing because
you've got this $updates var that seems to be completely unnecessary.
Your controller method should look more like this:

function updateProfile()
{
/* check if form was submitted
 */
if (!empty($this->data))
{
/* now save the submitted data
 */
if ($this->User->save($this->data))
{

Without the test to see if $this->data is empty, that code would run
the first time you load the page. So, $this->data['User']['firstname']
does not exist. It's important to remember that, where forms are
involved, Cake runs the method/action twice.

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Tomfox Wiranata
that is not correct?

i try to access the information in the form with this->data and assign
these to my database field with $updates:

if i code:
   $updates['User']['firstname']= "test";
$updates['User']['lastname']= "test_lastname";

cake stores "test" in my database in "firstname" and "test_lastname"
in "lastname" so you might be right, sth is wrong with this-
>data..but what is correcT?



On 25 Jul., 18:30, cricket  wrote:
> On Sun, Jul 25, 2010 at 8:30 AM, Tomfox Wiranata
>
>
>
>  wrote:
> > hi,
>
> > this error occurs when i enter the firstname and lastname in a form
> > and try to update my profile. it is supposed to write this information
> > in the database. why does this error pops up, although i do have these
> > two attributes in my table??
>
> > my controller:
>
> >     function updateProfile()
> >     {
>
> >                $updates = $this->User->findByUsername($this->Session-
> >>read('User.username'));
> >                $updates['User']['firstname']= 
> > $this->data['User']['firstname'];
> >                $updates['User']['lastname']= 
> > $this->data['User']['lastname'];
>
> You're assigning the result of the find to $updates but then trying to
> access it from $this->data.

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread cricket
On Sun, Jul 25, 2010 at 8:30 AM, Tomfox Wiranata
 wrote:
> hi,
>
> this error occurs when i enter the firstname and lastname in a form
> and try to update my profile. it is supposed to write this information
> in the database. why does this error pops up, although i do have these
> two attributes in my table??
>
>
> my controller:
>
>     function updateProfile()
>     {
>
>                $updates = $this->User->findByUsername($this->Session-
>>read('User.username'));
>                $updates['User']['firstname']= 
> $this->data['User']['firstname'];
>                $updates['User']['lastname']= $this->data['User']['lastname'];


You're assigning the result of the find to $updates but then trying to
access it from $this->data.

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Tomfox Wiranata
well i have a form with two fields. a field for users firstname and
lastname. when the user hits the "ok" button these information should
be saved into my databasebut instead, the error occurs

On 25 Jul., 17:54, Norman Paniagua  wrote:
> The information is not printed in your view? If there is so, it was because
> you need to call so
>
> $this->data = $this->Yourtable->findByAField($field_value);
>
> And whe you want to update
>
> $this->YourTable->read('null', $tableId);
> $this->YourTable->set('field_1', $field_1);
> $this->YourTable->set('field_2', $field_2);
>
> I hope its help you
> ---
>
> Norman Paniagua
>
> 2010/7/25 Tomfox Wiranata 
>
> > hi,
>
> > this error occurs when i enter the firstname and lastname in a form
> > and try to update my profile. it is supposed to write this information
> > in the database. why does this error pops up, although i do have these
> > two attributes in my table??
>
> > my controller:
>
> >     function updateProfile()
> >     {
>
> >                $updates = $this->User->findByUsername($this->Session-
> > >read('User.username'));
> >                                $updates['User']['firstname']=
> > $this->data['User']['firstname'];
> >                                $updates['User']['lastname']=
> > $this->data['User']['lastname'];
>
> > my view
>
> >                        create('User', array('action' =>
> > 'updateProfile')); ?>
>
> >                        
> >                                 > $form->input('Vorname',
> > array('value' => $user['firstname']));   ?>
> >                        
>
> >                        
> >                                 > $form->input('Nachname',
> > array('value' => $user['lastname']));   ?>
> >                        
>
> >                                 >                                echo $form->button('Sichern', array('type'
> > => 'submit'));
> >                                echo $form->end();
> >                                ?>
>
> > thx for your help :)
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

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


Re: Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Norman Paniagua
The information is not printed in your view? If there is so, it was because
you need to call so

$this->data = $this->Yourtable->findByAField($field_value);

And whe you want to update

$this->YourTable->read('null', $tableId);
$this->YourTable->set('field_1', $field_1);
$this->YourTable->set('field_2', $field_2);

I hope its help you
---

Norman Paniagua


2010/7/25 Tomfox Wiranata 

> hi,
>
> this error occurs when i enter the firstname and lastname in a form
> and try to update my profile. it is supposed to write this information
> in the database. why does this error pops up, although i do have these
> two attributes in my table??
>
>
> my controller:
>
> function updateProfile()
> {
>
>$updates = $this->User->findByUsername($this->Session-
> >read('User.username'));
>$updates['User']['firstname']=
> $this->data['User']['firstname'];
>$updates['User']['lastname']=
> $this->data['User']['lastname'];
>
>
> my view
>
>create('User', array('action' =>
> 'updateProfile')); ?>
>
>
> $form->input('Vorname',
> array('value' => $user['firstname']));   ?>
>
>
>
> $form->input('Nachname',
> array('value' => $user['lastname']));   ?>
>
>
>
>echo $form->button('Sichern', array('type'
> => 'submit'));
>echo $form->end();
>?>
>
>
> thx for your help :)
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Notice (8): Undefined index: firstname [APP\controllers\users_controller.php, line 45]

2010-07-25 Thread Tomfox Wiranata
hi,

this error occurs when i enter the firstname and lastname in a form
and try to update my profile. it is supposed to write this information
in the database. why does this error pops up, although i do have these
two attributes in my table??


my controller:

 function updateProfile()
 {

$updates = $this->User->findByUsername($this->Session-
>read('User.username'));
$updates['User']['firstname']= 
$this->data['User']['firstname'];
$updates['User']['lastname']= 
$this->data['User']['lastname'];


my view

create('User', array('action' =>
'updateProfile')); ?>


input('Vorname',
array('value' => $user['firstname']));   ?>



input('Nachname',
array('value' => $user['lastname']));   ?>



button('Sichern', array('type' => 
'submit'));
echo $form->end();
?>


thx for your help :)

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


Re: Notice (8): Undefined index: id [CORE\cake\libs\model\model.php, line 1325]

2010-07-18 Thread Graham Weldon
Did you have a question?

Cheers,
Graham / Predominant

On Mon, Jul 19, 2010 at 5:01 AM, دل  wrote:
> Notice (8): Undefined index: id [CORE\cake\libs\model\model.php, line
> 1325]
> Code | Context
>
>                $success = (bool)$db->update($this, $fields, $values);
>            } else {
>                $fInfo = $this->_schema[$this->primaryKey];
>
> $data   =       array(
>        "CountryName" => "Hello"
> )
> $validate       =       array(
>        "validate" => true,
>        "atomic" => true
> )
> $fieldList      =       array()
> $defaults       =       array(
>        "validate" => true,
>        "fieldList" => array(),
>        "callbacks" => true
> )
> $_whitelist     =       array()
> $fields =       array(
>        "CountryName"
> )
> $options        =       array(
>        "validate" => true,
>        "fieldList" => array(),
>        "callbacks" => true,
>        "atomic" => true
> )
> $field  =       "modified"
> $keyPresentAndEmpty     =       false
> $exists =       false
> $dateFields     =       array(
>        "modified",
>        "updated",
>        "created"
> )
> $this   =       Country
> Country::$name = "Country"
> Country::$useTable = "countries"
> Country::$useDbConfig = "default"
> Country::$displayField = false
> Country::$id = false
> Country::$data = array
> Country::$table = "countries"
> Country::$primaryKey = "id"
> Country::$_schema = array
> Country::$validate = array
> Country::$validationErrors = array
> Country::$tablePrefix = ""
> Country::$alias = "Country"
> Country::$tableToModel = array
> Country::$logTransactions = false
> Country::$cacheQueries = false
> Country::$belongsTo = array
> Country::$hasOne = array
> Country::$hasMany = array
> Country::$hasAndBelongsToMany = array
> Country::$actsAs = NULL
> Country::$Behaviors = BehaviorCollection object
> Country::$whitelist = array
> Country::$cacheSources = true
> Country::$findQueryType = NULL
> Country::$recursive = 1
> Country::$order = NULL
> Country::$virtualFields = array
> Country::$__associationKeys = array
> Country::$__associations = array
> Country::$__backAssociation = array
> Country::$__insertID = NULL
> Country::$__numRows = NULL
> Country::$__affectedRows = NULL
> Country::$_findMethods = array
> $db     =       DboMysql
> DboMysql::$description = "MySQL DBO Driver"
> DboMysql::$_baseConfig = array
> DboMysql::$startQuote = "`"
> DboMysql::$endQuote = "`"
> DboMysql::$_useAlias = true
> DboMysql::$_commands = array
> DboMysql::$fieldParameters = array
> DboMysql::$tableParameters = array
> DboMysql::$columns = array
> DboMysql::$index = array
> DboMysql::$alias = "AS "
> DboMysql::$methodCache = array
> DboMysql::$cacheMethods = true
> DboMysql::$__bypass = false
> DboMysql::$__sqlOps = array
> DboMysql::$virtualFieldSeparator = "__"
> DboMysql::$connected = true
> DboMysql::$fullDebug = false
> DboMysql::$error = NULL
> DboMysql::$affected = 0
> DboMysql::$numRows = NULL
> DboMysql::$took = 0
> DboMysql::$_result = true
> DboMysql::$_queriesCnt = 0
> DboMysql::$_queriesTime = NULL
> DboMysql::$_queriesLog = array
> DboMysql::$_queriesLogMax = 200
> DboMysql::$_queryCache = array
> DboMysql::$__descriptions = array
> DboMysql::$_sources = array
> DboMysql::$connection = resource
> DboMysql::$config = array
> DboMysql::$configKeyName = "default"
> DboMysql::$_transactionStarted = true
> DboMysql::$cacheSources = true
> DboMysql::$results = true
> DboMysql::$map = array
> $updateCol      =       "created"
> $result =       true
> $values =       array(
>        "Hello"
> )
> $v      =       array(
>        "CountryName" => "Hello"
> )
> $n      =       "Country"
> $y      =       "Hello"
> $x      =       "CountryName"
> $count  =       1
> $success        =       true
> $created        =       false
> $cache  =       array()
>
> Model::save() - CORE\cake\libs\model\model.php, line 1325
> Model::__save() - CORE\cake\libs\model\model.php, line 1759
> Model::saveAll() - CORE\cake\libs\model\model.php, line 1661
> HomeController::userregister() - APP\controllers\home_controller.php,
> line 9
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, 

Notice (8): Undefined index: id [CORE\cake\libs\model\model.php, line 1325]

2010-07-18 Thread دل
Notice (8): Undefined index: id [CORE\cake\libs\model\model.php, line
1325]
Code | Context

$success = (bool)$db->update($this, $fields, $values);
} else {
$fInfo = $this->_schema[$this->primaryKey];

$data   =   array(
"CountryName" => "Hello"
)
$validate   =   array(
"validate" => true,
"atomic" => true
)
$fieldList  =   array()
$defaults   =   array(
"validate" => true,
"fieldList" => array(),
"callbacks" => true
)
$_whitelist =   array()
$fields =   array(
"CountryName"
)
$options=   array(
"validate" => true,
"fieldList" => array(),
"callbacks" => true,
"atomic" => true
)
$field  =   "modified"
$keyPresentAndEmpty =   false
$exists =   false
$dateFields =   array(
"modified",
"updated",
"created"
)
$this   =   Country
Country::$name = "Country"
Country::$useTable = "countries"
Country::$useDbConfig = "default"
Country::$displayField = false
Country::$id = false
Country::$data = array
Country::$table = "countries"
Country::$primaryKey = "id"
Country::$_schema = array
Country::$validate = array
Country::$validationErrors = array
Country::$tablePrefix = ""
Country::$alias = "Country"
Country::$tableToModel = array
Country::$logTransactions = false
Country::$cacheQueries = false
Country::$belongsTo = array
Country::$hasOne = array
Country::$hasMany = array
Country::$hasAndBelongsToMany = array
Country::$actsAs = NULL
Country::$Behaviors = BehaviorCollection object
Country::$whitelist = array
Country::$cacheSources = true
Country::$findQueryType = NULL
Country::$recursive = 1
Country::$order = NULL
Country::$virtualFields = array
Country::$__associationKeys = array
Country::$__associations = array
Country::$__backAssociation = array
Country::$__insertID = NULL
Country::$__numRows = NULL
Country::$__affectedRows = NULL
Country::$_findMethods = array
$db =   DboMysql
DboMysql::$description = "MySQL DBO Driver"
DboMysql::$_baseConfig = array
DboMysql::$startQuote = "`"
DboMysql::$endQuote = "`"
DboMysql::$_useAlias = true
DboMysql::$_commands = array
DboMysql::$fieldParameters = array
DboMysql::$tableParameters = array
DboMysql::$columns = array
DboMysql::$index = array
DboMysql::$alias = "AS "
DboMysql::$methodCache = array
DboMysql::$cacheMethods = true
DboMysql::$__bypass = false
DboMysql::$__sqlOps = array
DboMysql::$virtualFieldSeparator = "__"
DboMysql::$connected = true
DboMysql::$fullDebug = false
DboMysql::$error = NULL
DboMysql::$affected = 0
DboMysql::$numRows = NULL
DboMysql::$took = 0
DboMysql::$_result = true
DboMysql::$_queriesCnt = 0
DboMysql::$_queriesTime = NULL
DboMysql::$_queriesLog = array
DboMysql::$_queriesLogMax = 200
DboMysql::$_queryCache = array
DboMysql::$__descriptions = array
DboMysql::$_sources = array
DboMysql::$connection = resource
DboMysql::$config = array
DboMysql::$configKeyName = "default"
DboMysql::$_transactionStarted = true
DboMysql::$cacheSources = true
DboMysql::$results = true
DboMysql::$map = array
$updateCol  =   "created"
$result =   true
$values =   array(
"Hello"
)
$v  =   array(
"CountryName" => "Hello"
)
$n  =   "Country"
$y  =   "Hello"
$x  =   "CountryName"
$count  =   1
$success=   true
$created=   false
$cache  =   array()

Model::save() - CORE\cake\libs\model\model.php, line 1325
Model::__save() - CORE\cake\libs\model\model.php, line 1759
Model::saveAll() - CORE\cake\libs\model\model.php, line 1661
HomeController::userregister() - APP\controllers\home_controller.php,
line 9
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83



company logo
Sign in/Create Account | Account Bookings
HomeDealsCustormers Service   Site Feedback

*
  Customer Registration
  Step 1
*
*
*
  Title:
  First Name:
  Last Name:
  Country
  Nature of Business:
  How did you hear about us?
*Please complete all fields in order to continue, and click
  Thank you, please click next Next

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


Re: ERROR: Notice (8): Undefined index: User [APP\views\users\profile.ctp, line 25]- can't find the problem

2010-07-04 Thread Jeremy Burns | Class Outfit
My advice with all of these sort of issues is to debug out the results of the 
array you are parsing. It then becomes really easy to see what syntax you need 
to get to the right data:

die(debug($your_variable));

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 4 Jul 2010, at 18:27, Tomfox Wiranata wrote:

> oki...i just embarrassed myself...
> 
> delete ['User'] and it works^^
> 
> On 4 Jul., 18:58, Tomfox Wiranata  wrote:
>> hi,
>> 
>> i try to retrieve user data and echo it in a view.
>> 
>> my view:
>> 
>> 
>> name
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> > 
>> 
>> 
>> 
>> 
>> controller:
>> function profile()
>> {
>> $this->set('users', 
>> $this->User->findByUsername($this->Session->read('User.username')));
>> 
>> }
>> 
>> its drivin me nutsi dont think i did sth different from the blog
>> example ??
>> 
>> thx so much
>> 
>> btw: the sql-statement is correct. it returns the value i need.
> 
> 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

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


Re: ERROR: Notice (8): Undefined index: User [APP\views\users\profile.ctp, line 25]- can't find the problem

2010-07-04 Thread cricket
On Sun, Jul 4, 2010 at 1:27 PM, Tomfox Wiranata
 wrote:
> oki...i just embarrassed myself...
>
> delete ['User'] and it works^^

Also, because you're fetching just one User, there shouldn't be any
need to create a loop in the view. Or do you have Users that share
usernames?

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


Re: ERROR: Notice (8): Undefined index: User [APP\views\users\profile.ctp, line 25]- can't find the problem

2010-07-04 Thread Tomfox Wiranata
oki...i just embarrassed myself...

delete ['User'] and it works^^

On 4 Jul., 18:58, Tomfox Wiranata  wrote:
> hi,
>
> i try to retrieve user data and echo it in a view.
>
> my view:
> 
> 
>         name
>
> 
>
> 
>
> 
>         
> <    line 25 
> 
> 
>
> 
>
> controller:
>     function profile()
>     {
>         $this->set('users', 
> $this->User->findByUsername($this->Session->read('User.username')));
>
>             }
>
> its drivin me nutsi dont think i did sth different from the blog
> example ??
>
> thx so much
>
> btw: the sql-statement is correct. it returns the value i need.

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


ERROR: Notice (8): Undefined index: User [APP\views\users\profile.ctp, line 25]- can't find the problem

2010-07-04 Thread Tomfox Wiranata
hi,

i try to retrieve user data and echo it in a view.

my view:


name







set('users', $this->User->findByUsername($this->Session-
>read('User.username')));
}

its drivin me nutsi dont think i did sth different from the blog
example ??

thx so much

btw: the sql-statement is correct. it returns the value i need.

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


Re: Notice (8): Undefined index: id?

2010-05-06 Thread tagnu

I had this error where I had set
var $primaryKey = 'ID'; 
in my model. Where as it was 'id' in the database. Setting it to
var $primaryKey = 'id';
resolved the issue.


Aurelius-2 wrote:
> 
> 
> It happens when Saving a Model!
> 
> I've no beforeX-Filters, I also had debug($this-data) right before
> saving,
> but each Model (Accept the hasAndbelongToMany) have an id!
> 
> thx
> Aurelius
> 
> On 31 Mrz., 02:32, mscdex  wrote:
>> On Mar 30, 6:11 pm, Marcelo Andrade  wrote:
>>
>>
>>
>> > On Mon, Mar 30, 2009 at 6:44 PM, Aurelius 
>> wrote:
>>
>> > > What does that mean, and where is the problem?
>> > > Notice (8): Undefined index: id [CORE/cake/libs/model/model.php, line
>> > > 1281...on line 77
>>
>> > > That's line 77:
>> > > if ($this->User->save ( $this->data, true , array ( 'firstname',
>> > > 'lastname', '' ))) {
>> > > ... }
>>
>> > > What's wrong?
> 

-- 
View this message in context: 
http://old.nabble.com/Notice-%288%29%3A-Undefined-index%3A-id--tp22793627p28470469.html
Sent from the CakePHP mailing list archive at Nabble.com.

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


Re: Undefined index

2010-04-02 Thread newbie
right!

when using findAllBy i had:

[audits] => Array
(
[0] => Array
(
[Audit] => Array


but with form and my owne query

 [audits] => Array
(
[0] => Array
(
[audits] => Array

and while comparing i didn't notice it. i'll know fr the next time.

it should be: 

thanks!!

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

To unsubscribe, reply using "remove me" as the subject.


Re: Undefined index

2010-04-02 Thread WebbedIT
This is because you are using Model::query and not declaring your
tables as cake would expect hence the arrays are returned with
different keys that you are used to when returning data with
Model::find (singular camelcased versions of your table names).

Now I can see you are running subqueries so you probably have a good
reason for using Model::query (I have not tried running sub-queries
using Model::find myself) but whenever reverting to using Model::query
you need to make the decision to define all of your tables as cake
expects or to change your controller/view logic to look for data in
your non cake-like data arrays.

HTH

Paul.

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

To unsubscribe, reply using "remove me" as the subject.


Re: Undefined index

2010-04-01 Thread kani
  // line 32  TO  

debuger result example:
[viewVars] => Array
(
[audits] => Array
(
[0] => Array
(
[audits] => Array  // "S"  Look this
line !!!

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

To unsubscribe, reply using "remove me" as the subject.


Re: Undefined index

2010-03-31 Thread John Andersen
Please look at the code at line 32 from the indexsln.ctp file. Compare
the index names with the expected structure. Do you really have an
index named "Endpoint"?
If you still can't see the error, then please show the code at line
32, so we also may be able to look at it :)
Enjoy,
   John

On Mar 31, 4:35 pm, newbie  wrote:
> Hi All,
>
> I'm getting error:
> Notice (8): Undefined index: Audit [APP\views\audits\indexsln.ctp,
> line 32]
> Notice (8): Undefined index: Endpoint
>
> the codes are
>
> index.ctp:
>
>          $options = array_combine ($a_eid, $a_sln);
>    //$form->create('audits'
>     echo $form->create('Audit', array( 'controller' => 'audits',
> 'type' => 'post', 'action' => 'indexsln'));
>     echo $form->select('endpoint_id',$options);//,null,null,false);
>     echo $form->submit('ok');
>     echo $form->end();     ?>
>
> audits_controllers :
>
>         function indexsln()    {
>                 $id = $this->data['Audit']['endpoint_id'];
>                 echo $id; //$sln;
>
>                 $this->set('audits',$this->Audit->query(
>                                 "SELECT * FROM audits,endpoints WHERE 
> endpoint_id
> in
>                                 (SELECT id FROM endpoints WHERE sln in
>                                 (SELECT sln FROM endpoints WHERE id = 
> ".$id."))
>                                 AND audits.endpoint_id = endpoints.id "));
>
>                                 $data=$this->paginate($this->Audit->read());
>     }
>
> indexsln.ctp :
>
> 
> 
> 
>  echo $paginator->counter(array(
> 'format' => __('Page %page% of %pages%, showing %current% records out
> of %count% total, starting on record %start%, ending on %end%', true)
> ));
> ?>
> 
> 
>         sort('id');?>
>         sort('endpoint_id');
>                 ?>
>         sort('day');
>                 echo $paginator->sort('date');?>
>         sort('author');?>
>         sort('description');?>
>         sort('action');?>
>         sort('visible');?>
>         
> 
>  $i = 0;
> foreach ($audits as $audit):
>         $class = null;
>         if ($i++ % 2 == 0) {
>                 $class = ' class="altrow"';
>         }
> ?>
>         >
>                 
>                           // line 32
>                 
>
> debuger result example:
>
>     [viewVars] => Array
>         (
>             [audits] => Array
>                 (
>                     [0] => Array
>                         (
>                             [audits] => Array
>                                 (
>                                     [id] => 6
>                                     [endpoint_id] => 12
>                                     [ton_id] =>
>                                     [day] => 2010-01-16
>                                     [created] => 2010-01-16 20:40:28
>                                     [author] => Ktos
>                                     [trid] => 123444
>                                     [description] => Did Something
>                                     [action] => Change
>                                     [visible] => 0
>                                 )
>
>                             [endpoints] => Array
>                                 (
>                                     [id] => 12
>                                     [ton_id] => 1
>                                     [name] => RU22005-RDFSWQ990099
>                                     [sln] => RU22005
>                                     [fga] =>
>                                     [date] => 2009-11-29 01:39:00
>                                     [push] => Success
>                                     [activation] => Success
>                                     [created] => 2009-11-29 01:43:00
>                                     [modified] => 2009-11-29 01:43:00
>                                     [col1] => k
>                                     [col2] => k
>                                     [col3] => k
>                                     [col4] =>
>                                     [col5] =>
>                                     [col6] =>
>                                     [col7] =>
>                               

Undefined index

2010-03-31 Thread newbie
Hi All,

I'm getting error:
Notice (8): Undefined index: Audit [APP\views\audits\indexsln.ctp,
line 32]
Notice (8): Undefined index: Endpoint

the codes are

index.ctp:

 create('audits'
echo $form->create('Audit', array( 'controller' => 'audits',
'type' => 'post', 'action' => 'indexsln'));
echo $form->select('endpoint_id',$options);//,null,null,false);
echo $form->submit('ok');
echo $form->end(); ?>

audits_controllers :

function indexsln(){
$id = $this->data['Audit']['endpoint_id'];
echo $id; //$sln;

$this->set('audits',$this->Audit->query(
"SELECT * FROM audits,endpoints WHERE 
endpoint_id
in
(SELECT id FROM endpoints WHERE sln in
(SELECT sln FROM endpoints WHERE id = ".$id."))
AND audits.endpoint_id = endpoints.id "));

$data=$this->paginate($this->Audit->read());
}



indexsln.ctp :




counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out
of %count% total, starting on record %start%, ending on %end%', true)
));
?>


sort('id');?>
sort('endpoint_id');
?>
sort('day');
echo $paginator->sort('date');?>
sort('author');?>
sort('description');?>
sort('action');?>
sort('visible');?>



>

  // line 32



debuger result example:

[viewVars] => Array
(
[audits] => Array
(
[0] => Array
(
[audits] => Array
(
[id] => 6
[endpoint_id] => 12
[ton_id] =>
[day] => 2010-01-16
[created] => 2010-01-16 20:40:28
[author] => Ktos
[trid] => 123444
[description] => Did Something
[action] => Change
[visible] => 0
)

[endpoints] => Array
(
[id] => 12
[ton_id] => 1
[name] => RU22005-RDFSWQ990099
[sln] => RU22005
[fga] =>
[date] => 2009-11-29 01:39:00
[push] => Success
[activation] => Success
[created] => 2009-11-29 01:43:00
[modified] => 2009-11-29 01:43:00
[col1] => k
[col2] => k
[col3] => k
[col4] =>
[col5] =>
[col6] =>
[col7] =>
[col8] =>
[col9] =>
)

)




i have the same code as indexsln.ctp in other function when i'm
sending data using fndAllBy - it's all ok then.
dubuger seems to be ok in both cases.


Can you please point out what i'm doing wrong?

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

To unsubscribe, reply using "remove me" as the subject.


Re: Undefined index

2010-03-30 Thread Ed Propsner
I appreciate you taking the time Paul but there won't be a need for a test
case. The idea of the Cake developers putting together such an intricate
framework and not allow you to perform the most basic functions with form
components is just ridiculous and highly unlikely. I too agree with
something Jeremy touched on ... it has been my experience over time that
when things seem to be "broken" for lack of a better word that 99% of the
time it's due to operator error of one sort or another whether it be coding
or what have you.

Anyhow, since I couldn't find where things went awry and what caused the
issue in the first place I just scrapped the whole thing and baked up a
fresh project. I threw together another form and lo and behold the problem
was gone ... go figure 8-). I guess for now it will have to remain a mystery
as to what in the world I may have done to cause the problem in the first
place.

I might have one or two other questions about something but I'll do my
homework first and cross that bridge when I get to it.

Thanks for the help,

- Ed

On Mon, Mar 29, 2010 at 4:47 AM, WebbedIT  wrote:

> I will set up a test case for a user form and observe field when I get
> the chance as I'm sure it should work. Will get back to you with my
> findings.
>
> And to strongly second something Jeremy touched on, if using cake
> simply go with the conventions as much as possible, they make life so
> much easier.
>
> HTH
>
> Paul.
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-29 Thread WebbedIT
I will set up a test case for a user form and observe field when I get
the chance as I'm sure it should work. Will get back to you with my
findings.

And to strongly second something Jeremy touched on, if using cake
simply go with the conventions as much as possible, they make life so
much easier.

HTH

Paul.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-28 Thread Ed Propsner
I had things a bit backwards. Username and Password fields are in fact
present in the array when the form submits to the add action (however the
password was plain text and not hashed when saved). The problem I was
encountering is pulling the data from the fields before the form is even
submitted. With fields named as "User.password" and "User.username"
$ajax->observeField completely disregarded those fields as if they weren't
even there. I took another approach with
JS Form.Element.getValue('UserPassword'); and that also returned an empty
value for both fields. Upon renaming the fields to anything other than
Username and Password I was able to extract the values from those fields. It
may have been a bit presumptuous of me to immediately point the finger at
Cake/Auth but upon a little digging it seemed to make the most sense at the
time. Ultimately I ended up extracting the values with JS and passing them
into the controller action to do what I needed. I added the User.username
and User.password to the form as hidden fields and used "beforeSave()" to
set their values to that of the renamed fields.

Don't get me wrong, within my first half hour of experimenting with Cake I
could see huge potential and how it could dramatically help. I was more than
excited to dive in. My questioning if Cake is worth it comes mainly from
ignorance and frustration. If you do something the same way for a long
enough time you become so accustomed to the process that it becomes second
nature and any type of problems that take more than 5 minutes to work out
are almost non-existent. I suppose there are moments when I think it's
easier and faster to just go with what you know and write the code yourself
rather than spending the day trying to figure out what's wrong this time ;).
If I really felt that Cake wasn't worth the time I would have abandoned it
by now. Also, the best functions library doesn't hold up at all to a good
framework. 90% of all those functions become obsolete with Cake. However
with a good framework behind the other 10% I could foresee making some
extremely functional and dare I say 'powerful' apps.

Anyhow, I still don't know why I couldn't access the values in those fields.
I hate to move on just because I got it to work, I'd like to know why it
didn't work.

- Ed

On Sun, Mar 28, 2010 at 4:15 AM, WebbedIT  wrote:

> Can you explain why you believe Cake/Auth is removing Username and
> Password?  Can you boil this down to a very simple code example where
> a non ajax form submits all fields and your ajax form submits all
> fields minus the username and password?
>
> I have designed many sites with Cake and never had such issues
> including using jQuery/AJAX to validate a form field by field
> including username and password (although you can't use the field
> password as Cake automatically hashes it - but that's no biggy).
>
> As for your argument that for an experienced developer who is very
> confident with PHP, MySQL, Flex etc, maybe using a framework is not
> the best option for you if you already have your own library of
> code ... it's a personal choice.
>
> For me who had taught myself PHP and a lot of bad habits CakePHP has
> been a steep learning curve that was well worth it.  My coding now
> follows the MVC design pattern and is so much more efficient and
> maintainable.  Other developers could instantly step into my shoes and
> support/develop my code.
>
> Don;t know if anyone can answer which of the many benefits cake
> offer's would suit you, you must have started looking at frameworks
> for a reason so your best placed to know if a framework has made your
> life any better.  Personally if I were you I would stick with it till
> you become more familiar with all of the features as I am yet to see
> one person in the community come out and say I have given Cake a good
> go and I'm going back to my own PHP and there are a lot of developers
> in the community.
>
> Those who do slate Cake tend to be favouring another framework from
> what I have seen.
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

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.c

Re: Undefined index

2010-03-28 Thread Jeremy Burns
I endorse what Paul says. I, too, had built up my own library of code, but it 
got so complex (and probably not very good!) and I always seemed to be building 
and improving the library each time I faced a new challenge rather than 
developing my apps. This slowed down my delivery rate, and led me to go hunting 
for a better solution. I looked at CodeIgniter, Zend, WaveMaker and a few 
others, but decided that Cake was as good as any. It seemed to offer good 
community support (which has proved true and been borne fruit), is in constant 
development/improvement and is fully rounded (you can do most things with it). 
One thing that helped me enormously was to stop fighting it, admit I only know 
how to use a fraction of it and ask for help. In 97.4% of all cases it is me 
making making a basic error, not the fault of Cake. Once you jump on board and 
go with the flow, it really pays dividends. I have also found that straying too 
far off the path and trying to do my own thing is bad - sticking to conventions 
is good in so many ways.

Jeremy Burns
jeremybu...@me.com


On 28 Mar 2010, at 09:15, WebbedIT wrote:

> Can you explain why you believe Cake/Auth is removing Username and
> Password?  Can you boil this down to a very simple code example where
> a non ajax form submits all fields and your ajax form submits all
> fields minus the username and password?
> 
> I have designed many sites with Cake and never had such issues
> including using jQuery/AJAX to validate a form field by field
> including username and password (although you can't use the field
> password as Cake automatically hashes it - but that's no biggy).
> 
> As for your argument that for an experienced developer who is very
> confident with PHP, MySQL, Flex etc, maybe using a framework is not
> the best option for you if you already have your own library of
> code ... it's a personal choice.
> 
> For me who had taught myself PHP and a lot of bad habits CakePHP has
> been a steep learning curve that was well worth it.  My coding now
> follows the MVC design pattern and is so much more efficient and
> maintainable.  Other developers could instantly step into my shoes and
> support/develop my code.
> 
> Don;t know if anyone can answer which of the many benefits cake
> offer's would suit you, you must have started looking at frameworks
> for a reason so your best placed to know if a framework has made your
> life any better.  Personally if I were you I would stick with it till
> you become more familiar with all of the features as I am yet to see
> one person in the community come out and say I have given Cake a good
> go and I'm going back to my own PHP and there are a lot of developers
> in the community.
> 
> Those who do slate Cake tend to be favouring another framework from
> what I have seen.
> 
> 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
> 
> To unsubscribe from this group, send email to 
> cake-php+unsubscribegooglegroups.com or reply to this email with the words 
> "REMOVE ME" as the subject.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-28 Thread WebbedIT
Can you explain why you believe Cake/Auth is removing Username and
Password?  Can you boil this down to a very simple code example where
a non ajax form submits all fields and your ajax form submits all
fields minus the username and password?

I have designed many sites with Cake and never had such issues
including using jQuery/AJAX to validate a form field by field
including username and password (although you can't use the field
password as Cake automatically hashes it - but that's no biggy).

As for your argument that for an experienced developer who is very
confident with PHP, MySQL, Flex etc, maybe using a framework is not
the best option for you if you already have your own library of
code ... it's a personal choice.

For me who had taught myself PHP and a lot of bad habits CakePHP has
been a steep learning curve that was well worth it.  My coding now
follows the MVC design pattern and is so much more efficient and
maintainable.  Other developers could instantly step into my shoes and
support/develop my code.

Don;t know if anyone can answer which of the many benefits cake
offer's would suit you, you must have started looking at frameworks
for a reason so your best placed to know if a framework has made your
life any better.  Personally if I were you I would stick with it till
you become more familiar with all of the features as I am yet to see
one person in the community come out and say I have given Cake a good
go and I'm going back to my own PHP and there are a lot of developers
in the community.

Those who do slate Cake tend to be favouring another framework from
what I have seen.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-27 Thread Ed Propsner
w inadvertently end
>>>> the form early but it's all good. The field before 'password' is 'username'
>>>> and i'm using $ajax->observeField to display changes to the 'username' 
>>>> field
>>>> but it's not doing anything and I'm guessing that it's' not seeing the 
>>>> field
>>>> for whatever reason. The are several more fields below username and 
>>>> password
>>>> and they are being recognized okay.
>>>>
>>>> On Sat, Mar 27, 2010 at 1:18 AM, Jeremy Burns wrote:
>>>>
>>>>> But are they inside the form in the view?
>>>>>
>>>>>
>>>>> Jeremy Burns
>>>>> jeremybu...@me.com 
>>>>>
>>>>> On 27 Mar 2010, at 05:15, Ed Propsner wrote:
>>>>>
>>>>> Yes, I'm expecting to see $this->data['User'][''password'] as well.
>>>>> Both fields exist and are displayed in the view.
>>>>>
>>>>> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns wrote:
>>>>>
>>>>>> So all you can get is $this->data['User']['confirm_password']...
>>>>>>
>>>>>> Are you expecting more fields to be in the array? Are the fields you
>>>>>> want inside the form in the view?
>>>>>>
>>>>>>
>>>>>> Jeremy Burns
>>>>>> jeremybu...@me.com 
>>>>>>
>>>>>>
>>>>>> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>>>>>>
>>>>>> The only thing showing in the array is the field for
>>>>>> 'confirm_password',
>>>>>>
>>>>>> [code]
>>>>>>
>>>>>> Array
>>>>>> (
>>>>>> [User] => Array
>>>>>> (
>>>>>> [confirm_password] => test
>>>>>> )
>>>>>>
>>>>>> )
>>>>>>
>>>>>> [/code]
>>>>>>
>>>>>> I'm having the same issue with the the username field. It's acting like 
>>>>>> the field doesn't exist.
>>>>>>
>>>>>>
>>>>>> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns wrote:
>>>>>>
>>>>>>> The reason I recommended that you examine the data array is that
>>>>>>> sometimes (and I often get confused with this myself) you need to double
>>>>>>> check exactly where the item you are looking for sits in the array. So 
>>>>>>> if
>>>>>>> you can see the field you want, build the path to it by walking back up 
>>>>>>> from
>>>>>>> it. If the path is not right, you get the undefined index error. Is it 
>>>>>>> worth
>>>>>>> pasting the output here?
>>>>>>>
>>>>>>>
>>>>>>> Jeremy Burns
>>>>>>> jeremybu...@me.com 
>>>>>>>
>>>>>>>
>>>>>>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>>>>>>>
>>>>>>> I'm not sure why but I'm relatively sure that it's not recognizing
>>>>>>> the form fields for username and password.
>>>>>>>
>>>>>>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Yes, I did try that. There is a field for confirm password as well
>>>>>>>> and that is all that is being presented to the controller.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Have you debugged the data that is being presented to the
>>>>>>>>> controller function? Set debug to 2 and type die(debug($this->data)); 
>>>>>>>>> as the
>>>>>>>>> first instruction, then take a look at what you see. Is password 
>>>>>>>>> there? You
>>>>>>>>> might need to do something like $this->data[0]['passwor

Re: Undefined index

2010-03-27 Thread Ed Propsner
Am I missing something here with the way Cake handles password fields ??

I ended up just writing my own js function to pull the values I wanted from
the form and pass them into the controller. Oddly enough it still wouldn't
recognize the password field ... well not so much that it wasn't being
recognized but the script was seeing the form field as empty. Out of
curiosity I changed the name of the password field from "User.password" to
just "pw" and the issue went away. I was then able to run the script with
both field values. Thinking maybe there was a typo in the original syntax I
scripted that form field again with it's original name of "User.password"
and the problem immediately came back.

On Sat, Mar 27, 2010 at 2:23 AM, Jeremy Burns  wrote:

> I'm no Ajax expert, but that sounds about right!
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
> On 27 Mar 2010, at 06:22, Ed Propsner wrote:
>
> I think part of the problem here is that $ajax->observeField is only is
> only focusing on a single form field and that is the element being passed to
> the controller. I just assumed Any/all of my form data was accessible in any
> one of the controllers.
>
>
>
> On Sat, Mar 27, 2010 at 1:48 AM, Ed Propsner  wrote:
>
>> Sorry, I'm new to Cake and was a bit confused. I was echoing the debug
>> inside the controller that the ajax call uses. The only two fields that are
>> being used in that controller are 'password' and 'confirm_password' ... only
>> 'confirm_password' is displayed with the debug.
>>
>> Up until now I never thought to try to run the debug in the add()
>> controller and when I did the entire form was in fact displayed in the
>> array.
>>
>> Now I'm just plain confused ;)
>>
>>
>> On Sat, Mar 27, 2010 at 1:32 AM, Jeremy Burns  wrote:
>>
>>> You say they are being recognised OK, but they weren't in the $this->data
>>> array?
>>>
>>> Have you checked the actuail page source to examine the form in the view?
>>> Only yesterday I debugged a similar problem where the browser was ending the
>>> form for me (I had embedded it incorrectly into a table).
>>>
>>>
>>> Jeremy Burns
>>> jeremybu...@me.com 
>>>
>>>
>>> On 27 Mar 2010, at 05:28, Ed Propsner wrote:
>>>
>>> Yup, I double checked to make sure I didn't somehow inadvertently end the
>>> form early but it's all good. The field before 'password' is 'username' and
>>> i'm using $ajax->observeField to display changes to the 'username' field but
>>> it's not doing anything and I'm guessing that it's' not seeing the field for
>>> whatever reason. The are several more fields below username and password and
>>> they are being recognized okay.
>>>
>>> On Sat, Mar 27, 2010 at 1:18 AM, Jeremy Burns wrote:
>>>
>>>> But are they inside the form in the view?
>>>>
>>>>
>>>> Jeremy Burns
>>>> jeremybu...@me.com 
>>>>
>>>> On 27 Mar 2010, at 05:15, Ed Propsner wrote:
>>>>
>>>> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both
>>>> fields exist and are displayed in the view.
>>>>
>>>> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns wrote:
>>>>
>>>>> So all you can get is $this->data['User']['confirm_password']...
>>>>>
>>>>> Are you expecting more fields to be in the array? Are the fields you
>>>>> want inside the form in the view?
>>>>>
>>>>>
>>>>> Jeremy Burns
>>>>> jeremybu...@me.com 
>>>>>
>>>>>
>>>>> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>>>>>
>>>>> The only thing showing in the array is the field for
>>>>> 'confirm_password',
>>>>>
>>>>> [code]
>>>>>
>>>>> Array
>>>>> (
>>>>> [User] => Array
>>>>> (
>>>>> [confirm_password] => test
>>>>> )
>>>>>
>>>>> )
>>>>>
>>>>> [/code]
>>>>>
>>>>> I'm having the same issue with the the username field. It's acting like 
>>>>> the field doesn't exist.
>>>>>
>>>>>

Re: Undefined index

2010-03-27 Thread WebbedIT
Your answer is in the cookbook :o)

http://book.cakephp.org/view/630/observeField

By default  observeField serialises the field you are observing only.
The last info box on the above page though states:

To send up the entire form when the field changes use $options['with']
= Form.serialize( $('Form ID') )

HTH

Paul

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-26 Thread Jeremy Burns
I'm no Ajax expert, but that sounds about right!

Jeremy Burns
jeremybu...@me.com

On 27 Mar 2010, at 06:22, Ed Propsner wrote:

> I think part of the problem here is that $ajax->observeField is only is only 
> focusing on a single form field and that is the element being passed to the 
> controller. I just assumed Any/all of my form data was accessible in any one 
> of the controllers. 
> 
> 
> 
> On Sat, Mar 27, 2010 at 1:48 AM, Ed Propsner  wrote:
> Sorry, I'm new to Cake and was a bit confused. I was echoing the debug inside 
> the controller that the ajax call uses. The only two fields that are being 
> used in that controller are 'password' and 'confirm_password' ... only 
> 'confirm_password' is displayed with the debug. 
> 
> Up until now I never thought to try to run the debug in the add() controller 
> and when I did the entire form was in fact displayed in the array. 
> 
> Now I'm just plain confused ;)
> 
> 
> On Sat, Mar 27, 2010 at 1:32 AM, Jeremy Burns  wrote:
> You say they are being recognised OK, but they weren't in the $this->data 
> array?
> 
> Have you checked the actuail page source to examine the form in the view? 
> Only yesterday I debugged a similar problem where the browser was ending the 
> form for me (I had embedded it incorrectly into a table).
> 
> 
> Jeremy Burns
> jeremybu...@me.com
> 
> 
> On 27 Mar 2010, at 05:28, Ed Propsner wrote:
> 
>> Yup, I double checked to make sure I didn't somehow inadvertently end the 
>> form early but it's all good. The field before 'password' is 'username' and 
>> i'm using $ajax->observeField to display changes to the 'username' field but 
>> it's not doing anything and I'm guessing that it's' not seeing the field for 
>> whatever reason. The are several more fields below username and password and 
>> they are being recognized okay. 
>> 
>> On Sat, Mar 27, 2010 at 1:18 AM, Jeremy Burns  wrote:
>> But are they inside the form in the view?
>> 
>> 
>> Jeremy Burns
>> jeremybu...@me.com
>> 
>> On 27 Mar 2010, at 05:15, Ed Propsner wrote:
>> 
>>> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both 
>>> fields exist and are displayed in the view. 
>>> 
>>> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns  wrote:
>>> So all you can get is $this->data['User']['confirm_password']...
>>> 
>>> Are you expecting more fields to be in the array? Are the fields you want 
>>> inside the form in the view?
>>> 
>>> 
>>> Jeremy Burns
>>> jeremybu...@me.com
>>> 
>>> 
>>> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>>> 
>>>> The only thing showing in the array is the field for 'confirm_password',
>>>> 
>>>> [code]
>>>> 
>>>> Array
>>>> (
>>>> [User] => Array
>>>> (
>>>> [confirm_password] => test
>>>> )
>>>> 
>>>> )
>>>> [/code]
>>>> I'm having the same issue with the the username field. It's acting like 
>>>> the field doesn't exist. 
>>>> 
>>>> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns  wrote:
>>>> The reason I recommended that you examine the data array is that sometimes 
>>>> (and I often get confused with this myself) you need to double check 
>>>> exactly where the item you are looking for sits in the array. So if you 
>>>> can see the field you want, build the path to it by walking back up from 
>>>> it. If the path is not right, you get the undefined index error. Is it 
>>>> worth pasting the output here?
>>>> 
>>>> 
>>>> Jeremy Burns
>>>> jeremybu...@me.com
>>>> 
>>>> 
>>>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>>>> 
>>>>> I'm not sure why but I'm relatively sure that it's not recognizing the 
>>>>> form fields for username and password. 
>>>>> 
>>>>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner  
>>>>> wrote:
>>>>> Yes, I did try that. There is a field for confirm password as well and 
>>>>> that is all that is being presented to the controller. 
>>>>> 
>>>>> 
>>>>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote

Re: Undefined index

2010-03-26 Thread Ed Propsner
I think part of the problem here is that $ajax->observeField is only is only
focusing on a single form field and that is the element being passed to the
controller. I just assumed Any/all of my form data was accessible in any one
of the controllers.



On Sat, Mar 27, 2010 at 1:48 AM, Ed Propsner  wrote:

> Sorry, I'm new to Cake and was a bit confused. I was echoing the debug
> inside the controller that the ajax call uses. The only two fields that are
> being used in that controller are 'password' and 'confirm_password' ... only
> 'confirm_password' is displayed with the debug.
>
> Up until now I never thought to try to run the debug in the add()
> controller and when I did the entire form was in fact displayed in the
> array.
>
> Now I'm just plain confused ;)
>
>
> On Sat, Mar 27, 2010 at 1:32 AM, Jeremy Burns  wrote:
>
>> You say they are being recognised OK, but they weren't in the $this->data
>> array?
>>
>> Have you checked the actuail page source to examine the form in the view?
>> Only yesterday I debugged a similar problem where the browser was ending the
>> form for me (I had embedded it incorrectly into a table).
>>
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>>
>> On 27 Mar 2010, at 05:28, Ed Propsner wrote:
>>
>> Yup, I double checked to make sure I didn't somehow inadvertently end the
>> form early but it's all good. The field before 'password' is 'username' and
>> i'm using $ajax->observeField to display changes to the 'username' field but
>> it's not doing anything and I'm guessing that it's' not seeing the field for
>> whatever reason. The are several more fields below username and password and
>> they are being recognized okay.
>>
>> On Sat, Mar 27, 2010 at 1:18 AM, Jeremy Burns  wrote:
>>
>>> But are they inside the form in the view?
>>>
>>>
>>> Jeremy Burns
>>> jeremybu...@me.com 
>>>
>>> On 27 Mar 2010, at 05:15, Ed Propsner wrote:
>>>
>>> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both
>>> fields exist and are displayed in the view.
>>>
>>> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns wrote:
>>>
>>>> So all you can get is $this->data['User']['confirm_password']...
>>>>
>>>> Are you expecting more fields to be in the array? Are the fields you
>>>> want inside the form in the view?
>>>>
>>>>
>>>> Jeremy Burns
>>>> jeremybu...@me.com 
>>>>
>>>>
>>>> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>>>>
>>>> The only thing showing in the array is the field for 'confirm_password',
>>>>
>>>> [code]
>>>>
>>>> Array
>>>> (
>>>> [User] => Array
>>>> (
>>>> [confirm_password] => test
>>>> )
>>>>
>>>> )
>>>>
>>>> [/code]
>>>>
>>>> I'm having the same issue with the the username field. It's acting like 
>>>> the field doesn't exist.
>>>>
>>>>
>>>> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns wrote:
>>>>
>>>>> The reason I recommended that you examine the data array is that
>>>>> sometimes (and I often get confused with this myself) you need to double
>>>>> check exactly where the item you are looking for sits in the array. So if
>>>>> you can see the field you want, build the path to it by walking back up 
>>>>> from
>>>>> it. If the path is not right, you get the undefined index error. Is it 
>>>>> worth
>>>>> pasting the output here?
>>>>>
>>>>>
>>>>> Jeremy Burns
>>>>> jeremybu...@me.com 
>>>>>
>>>>>
>>>>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>>>>>
>>>>> I'm not sure why but I'm relatively sure that it's not recognizing the
>>>>> form fields for username and password.
>>>>>
>>>>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner wrote:
>>>>>
>>>>>> Yes, I did try that. There is a field for confirm password as well and
>>>>>> that is all that is being presented to the controller.
>&g

Re: Undefined index

2010-03-26 Thread Ed Propsner
Sorry, I'm new to Cake and was a bit confused. I was echoing the debug
inside the controller that the ajax call uses. The only two fields that are
being used in that controller are 'password' and 'confirm_password' ... only
'confirm_password' is displayed with the debug.

Up until now I never thought to try to run the debug in the add() controller
and when I did the entire form was in fact displayed in the array.

Now I'm just plain confused ;)

On Sat, Mar 27, 2010 at 1:32 AM, Jeremy Burns  wrote:

> You say they are being recognised OK, but they weren't in the $this->data
> array?
>
> Have you checked the actual page source to examine the form in the view?
> Only yesterday I debugged a similar problem where the browser was ending the
> form for me (I had embedded it incorrectly into a table).
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
>
> On 27 Mar 2010, at 05:28, Ed Propsner wrote:
>
> Yup, I double checked to make sure I didn't somehow inadvertently end the
> form early but it's all good. The field before 'password' is 'username' and
> i'm using $ajax->observeField to display changes to the 'username' field but
> it's not doing anything and I'm guessing that it's' not seeing the field for
> whatever reason. The are several more fields below username and password and
> they are being recognized okay.
>
> On Sat, Mar 27, 2010 at 1:18 AM, Jeremy Burns  wrote:
>
>> But are they inside the form in the view?
>>
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>> On 27 Mar 2010, at 05:15, Ed Propsner wrote:
>>
>> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both
>> fields exist and are displayed in the view.
>>
>> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns  wrote:
>>
>>> So all you can get is $this->data['User']['confirm_password']...
>>>
>>> Are you expecting more fields to be in the array? Are the fields you want
>>> inside the form in the view?
>>>
>>>
>>> Jeremy Burns
>>> jeremybu...@me.com 
>>>
>>>
>>> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>>>
>>> The only thing showing in the array is the field for 'confirm_password',
>>>
>>> [code]
>>>
>>> Array
>>> (
>>> [User] => Array
>>> (
>>> [confirm_password] => test
>>> )
>>>
>>> )
>>>
>>> [/code]
>>>
>>> I'm having the same issue with the the username field. It's acting like the 
>>> field doesn't exist.
>>>
>>>
>>> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns wrote:
>>>
>>>> The reason I recommended that you examine the data array is that
>>>> sometimes (and I often get confused with this myself) you need to double
>>>> check exactly where the item you are looking for sits in the array. So if
>>>> you can see the field you want, build the path to it by walking back up 
>>>> from
>>>> it. If the path is not right, you get the undefined index error. Is it 
>>>> worth
>>>> pasting the output here?
>>>>
>>>>
>>>> Jeremy Burns
>>>> jeremybu...@me.com 
>>>>
>>>>
>>>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>>>>
>>>> I'm not sure why but I'm relatively sure that it's not recognizing the
>>>> form fields for username and password.
>>>>
>>>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner wrote:
>>>>
>>>>> Yes, I did try that. There is a field for confirm password as well and
>>>>> that is all that is being presented to the controller.
>>>>>
>>>>>
>>>>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns wrote:
>>>>>
>>>>>> Have you debugged the data that is being presented to the controller
>>>>>> function? Set debug to 2 and type die(debug($this->data)); as the first
>>>>>> instruction, then take a look at what you see. Is password there? You 
>>>>>> might
>>>>>> need to do something like $this->data[0]['password'], for example.
>>>>>>
>>>>>> Jeremy Burns
>>>>>> jeremybu...@me.com 
>>>>>>
>>>>>>
>>>>>&

Re: Undefined index

2010-03-26 Thread Jeremy Burns
You say they are being recognised OK, but they weren't in the $this->data array?

Have you checked the actual page source to examine the form in the view? Only 
yesterday I debugged a similar problem where the browser was ending the form 
for me (I had embedded it incorrectly into a table).

Jeremy Burns
jeremybu...@me.com


On 27 Mar 2010, at 05:28, Ed Propsner wrote:

> Yup, I double checked to make sure I didn't somehow inadvertently end the 
> form early but it's all good. The field before 'password' is 'username' and 
> i'm using $ajax->observeField to display changes to the 'username' field but 
> it's not doing anything and I'm guessing that it's' not seeing the field for 
> whatever reason. The are several more fields below username and password and 
> they are being recognized okay. 
> 
> On Sat, Mar 27, 2010 at 1:18 AM, Jeremy Burns  wrote:
> But are they inside the form in the view?
> 
> 
> Jeremy Burns
> jeremybu...@me.com
> 
> On 27 Mar 2010, at 05:15, Ed Propsner wrote:
> 
>> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both 
>> fields exist and are displayed in the view. 
>> 
>> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns  wrote:
>> So all you can get is $this->data['User']['confirm_password']...
>> 
>> Are you expecting more fields to be in the array? Are the fields you want 
>> inside the form in the view?
>> 
>> 
>> Jeremy Burns
>> jeremybu...@me.com
>> 
>> 
>> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>> 
>>> The only thing showing in the array is the field for 'confirm_password',
>>> 
>>> [code]
>>> 
>>> Array
>>> (
>>> [User] => Array
>>> (
>>> [confirm_password] => test
>>> )
>>> 
>>> )
>>> [/code]
>>> I'm having the same issue with the the username field. It's acting like the 
>>> field doesn't exist. 
>>> 
>>> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns  wrote:
>>> The reason I recommended that you examine the data array is that sometimes 
>>> (and I often get confused with this myself) you need to double check 
>>> exactly where the item you are looking for sits in the array. So if you can 
>>> see the field you want, build the path to it by walking back up from it. If 
>>> the path is not right, you get the undefined index error. Is it worth 
>>> pasting the output here?
>>> 
>>> 
>>> Jeremy Burns
>>> jeremybu...@me.com
>>> 
>>> 
>>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>>> 
>>>> I'm not sure why but I'm relatively sure that it's not recognizing the 
>>>> form fields for username and password. 
>>>> 
>>>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner  wrote:
>>>> Yes, I did try that. There is a field for confirm password as well and 
>>>> that is all that is being presented to the controller. 
>>>> 
>>>> 
>>>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote:
>>>> Have you debugged the data that is being presented to the controller 
>>>> function? Set debug to 2 and type die(debug($this->data)); as the first 
>>>> instruction, then take a look at what you see. Is password there? You 
>>>> might need to do something like $this->data[0]['password'], for example.
>>>> 
>>>> Jeremy Burns
>>>> jeremybu...@me.com
>>>> 
>>>> 
>>>> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>>>> 
>>>>> I'm still goofing with forms, ajax, validation, etc. trying to learn 
>>>>> Cake. 
>>>>> 
>>>>> I have a form set up with a field for password[code]   
>>>>> $form->input('User.password');   [/code]
>>>>> 
>>>>> When I reference that field in the controller [code]   $pw1 = 
>>>>> $this->data['User']['password'];[/code]
>>>>> 
>>>>> I keep getting "undefined index for password." It looks okay, what else 
>>>>> could be the issue ? 
>>>>> 
>>>>> Also, I thought I had the ajax helper figured out for the most part but 
>>>>> there is still one field that just refuses to cooperate. 
>>>>> 
>>>>> [cod

Re: Undefined index

2010-03-26 Thread Ed Propsner
Yup, I double checked to make sure I didn't somehow inadvertently end the
form early but it's all good. The field before 'password' is 'username' and
i'm using $ajax->observeField to display changes to the 'username' field but
it's not doing anything and I'm guessing that it's' not seeing the field for
whatever reason. The are several more fields below username and password and
they are being recognized okay.

On Sat, Mar 27, 2010 at 1:18 AM, Jeremy Burns  wrote:

> But are they inside the form in the view?
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
> On 27 Mar 2010, at 05:15, Ed Propsner wrote:
>
> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both
> fields exist and are displayed in the view.
>
> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns  wrote:
>
>> So all you can get is $this->data['User']['confirm_password']...
>>
>> Are you expecting more fields to be in the array? Are the fields you want
>> inside the form in the view?
>>
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>>
>> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>>
>> The only thing showing in the array is the field for 'confirm_password',
>>
>> [code]
>>
>> Array
>> (
>> [User] => Array
>> (
>> [confirm_password] => test
>> )
>>
>> )
>>
>> [/code]
>>
>> I'm having the same issue with the the username field. It's acting like the 
>> field doesn't exist.
>>
>>
>> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns wrote:
>>
>>> The reason I recommended that you examine the data array is that
>>> sometimes (and I often get confused with this myself) you need to double
>>> check exactly where the item you are looking for sits in the array. So if
>>> you can see the field you want, build the path to it by walking back up from
>>> it. If the path is not right, you get the undefined index error. Is it worth
>>> pasting the output here?
>>>
>>>
>>> Jeremy Burns
>>> jeremybu...@me.com 
>>>
>>>
>>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>>>
>>> I'm not sure why but I'm relatively sure that it's not recognizing the
>>> form fields for username and password.
>>>
>>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner wrote:
>>>
>>>> Yes, I did try that. There is a field for confirm password as well and
>>>> that is all that is being presented to the controller.
>>>>
>>>>
>>>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns wrote:
>>>>
>>>>> Have you debugged the data that is being presented to the controller
>>>>> function? Set debug to 2 and type die(debug($this->data)); as the first
>>>>> instruction, then take a look at what you see. Is password there? You 
>>>>> might
>>>>> need to do something like $this->data[0]['password'], for example.
>>>>>
>>>>> Jeremy Burns
>>>>> jeremybu...@me.com 
>>>>>
>>>>>
>>>>> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>>>>>
>>>>> I'm still goofing with forms, ajax, validation, etc. trying to learn
>>>>> Cake.
>>>>>
>>>>> I have a form set up with a field for password[code]
>>>>>   $form->input('User.password');   [/code]
>>>>>
>>>>> When I reference that field in the controller [code]   $pw1 =
>>>>> $this->data['User']['password'];[/code]
>>>>>
>>>>> I keep getting "undefined index for password." It looks okay, what else
>>>>> could be the issue ?
>>>>>
>>>>> Also, I thought I had the ajax helper figured out for the most part but
>>>>> there is still one field that just refuses to cooperate.
>>>>>
>>>>> [code]
>>>>>
>>>>> echo $html->tableCells(array('Username:', $form->input('User.username',
>>>>> array('label' => '')), ''));
>>>>> echo $ajax->observeField('UserUsername', array('url' =>
>>>>> 'checkUsername', 'update' => 'nameAvail'));
>>>>&

Re: Undefined index

2010-03-26 Thread Jeremy Burns
But are they inside the form in the view?

Jeremy Burns
jeremybu...@me.com

On 27 Mar 2010, at 05:15, Ed Propsner wrote:

> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both 
> fields exist and are displayed in the view. 
> 
> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns  wrote:
> So all you can get is $this->data['User']['confirm_password']...
> 
> Are you expecting more fields to be in the array? Are the fields you want 
> inside the form in the view?
> 
> 
> Jeremy Burns
> jeremybu...@me.com
> 
> 
> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
> 
>> The only thing showing in the array is the field for 'confirm_password',
>> 
>> [code]
>> 
>> Array
>> (
>> [User] => Array
>> (
>> [confirm_password] => test
>> )
>> 
>> )
>> [/code]
>> I'm having the same issue with the the username field. It's acting like the 
>> field doesn't exist. 
>> 
>> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns  wrote:
>> The reason I recommended that you examine the data array is that sometimes 
>> (and I often get confused with this myself) you need to double check exactly 
>> where the item you are looking for sits in the array. So if you can see the 
>> field you want, build the path to it by walking back up from it. If the path 
>> is not right, you get the undefined index error. Is it worth pasting the 
>> output here?
>> 
>> 
>> Jeremy Burns
>> jeremybu...@me.com
>> 
>> 
>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>> 
>>> I'm not sure why but I'm relatively sure that it's not recognizing the form 
>>> fields for username and password. 
>>> 
>>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner  wrote:
>>> Yes, I did try that. There is a field for confirm password as well and that 
>>> is all that is being presented to the controller. 
>>> 
>>> 
>>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote:
>>> Have you debugged the data that is being presented to the controller 
>>> function? Set debug to 2 and type die(debug($this->data)); as the first 
>>> instruction, then take a look at what you see. Is password there? You might 
>>> need to do something like $this->data[0]['password'], for example.
>>> 
>>> Jeremy Burns
>>> jeremybu...@me.com
>>> 
>>> 
>>> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>>> 
>>>> I'm still goofing with forms, ajax, validation, etc. trying to learn Cake. 
>>>> 
>>>> I have a form set up with a field for password[code]   
>>>> $form->input('User.password');   [/code]
>>>> 
>>>> When I reference that field in the controller [code]   $pw1 = 
>>>> $this->data['User']['password'];[/code]
>>>> 
>>>> I keep getting "undefined index for password." It looks okay, what else 
>>>> could be the issue ? 
>>>> 
>>>> Also, I thought I had the ajax helper figured out for the most part but 
>>>> there is still one field that just refuses to cooperate. 
>>>> 
>>>> [code]
>>>> 
>>>> echo $html->tableCells(array('Username:', $form->input('User.username', 
>>>> array('label' => '')), ''));
>>>> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername', 
>>>> 'update' => 'nameAvail'));
>>>> 
>>>> [/code]
>>>> 
>>>> - Ed 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 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
>>>>  
>>>> To unsubscribe from this group, send email to 
>>>> cake-php+unsubscribegooglegroups.com or reply to this email with

Re: Undefined index

2010-03-26 Thread Ed Propsner
Yes, I'm expecting to see $this->data['User'][''password'] as well. Both
fields exist and are displayed in the view.

On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns  wrote:

> So all you can get is $this->data['User']['confirm_password']...
>
> Are you expecting more fields to be in the array? Are the fields you want
> inside the form in the view?
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
>
> On 27 Mar 2010, at 05:00, Ed Propsner wrote:
>
> The only thing showing in the array is the field for 'confirm_password',
>
> [code]
>
> Array
> (
> [User] => Array
> (
> [confirm_password] => test
> )
>
> )
>
> [/code]
>
> I'm having the same issue with the the username field. It's acting like the 
> field doesn't exist.
>
>
> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns  wrote:
>
>> The reason I recommended that you examine the data array is that sometimes
>> (and I often get confused with this myself) you need to double check exactly
>> where the item you are looking for sits in the array. So if you can see the
>> field you want, build the path to it by walking back up from it. If the path
>> is not right, you get the undefined index error. Is it worth pasting the
>> output here?
>>
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>>
>> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>>
>> I'm not sure why but I'm relatively sure that it's not recognizing the
>> form fields for username and password.
>>
>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner wrote:
>>
>>> Yes, I did try that. There is a field for confirm password as well and
>>> that is all that is being presented to the controller.
>>>
>>>
>>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns wrote:
>>>
>>>> Have you debugged the data that is being presented to the controller
>>>> function? Set debug to 2 and type die(debug($this->data)); as the first
>>>> instruction, then take a look at what you see. Is password there? You might
>>>> need to do something like $this->data[0]['password'], for example.
>>>>
>>>> Jeremy Burns
>>>> jeremybu...@me.com 
>>>>
>>>>
>>>> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>>>>
>>>> I'm still goofing with forms, ajax, validation, etc. trying to learn
>>>> Cake.
>>>>
>>>> I have a form set up with a field for password[code]
>>>>   $form->input('User.password');   [/code]
>>>>
>>>> When I reference that field in the controller [code]   $pw1 =
>>>> $this->data['User']['password'];[/code]
>>>>
>>>> I keep getting "undefined index for password." It looks okay, what else
>>>> could be the issue ?
>>>>
>>>> Also, I thought I had the ajax helper figured out for the most part but
>>>> there is still one field that just refuses to cooperate.
>>>>
>>>> [code]
>>>>
>>>> echo $html->tableCells(array('Username:', $form->input('User.username',
>>>> array('label' => '')), ''));
>>>> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername',
>>>> 'update' => 'nameAvail'));
>>>>
>>>> [/code]
>>>>
>>>> - Ed
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 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
>>>>
>>>> To unsubscribe from this group, send email to cake-php+
>>>> unsubscribegooglegroups.com or reply to this email with the words
>>>> "REMOVE ME" as the subject.
>>>>
>>>>
>>>>
>>>> Check out the new CakePHP Questions site http://cakeqs.or

Re: Undefined index

2010-03-26 Thread Jeremy Burns
So all you can get is $this->data['User']['confirm_password']...

Are you expecting more fields to be in the array? Are the fields you want 
inside the form in the view?

Jeremy Burns
jeremybu...@me.com


On 27 Mar 2010, at 05:00, Ed Propsner wrote:

> The only thing showing in the array is the field for 'confirm_password',
> 
> [code]
> 
> Array
> (
> [User] => Array
> (
> [confirm_password] => test
> )
> 
> )
> [/code]
> I'm having the same issue with the the username field. It's acting like the 
> field doesn't exist. 
> 
> On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns  wrote:
> The reason I recommended that you examine the data array is that sometimes 
> (and I often get confused with this myself) you need to double check exactly 
> where the item you are looking for sits in the array. So if you can see the 
> field you want, build the path to it by walking back up from it. If the path 
> is not right, you get the undefined index error. Is it worth pasting the 
> output here?
> 
> 
> Jeremy Burns
> jeremybu...@me.com
> 
> 
> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
> 
>> I'm not sure why but I'm relatively sure that it's not recognizing the form 
>> fields for username and password. 
>> 
>> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner  wrote:
>> Yes, I did try that. There is a field for confirm password as well and that 
>> is all that is being presented to the controller. 
>> 
>> 
>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote:
>> Have you debugged the data that is being presented to the controller 
>> function? Set debug to 2 and type die(debug($this->data)); as the first 
>> instruction, then take a look at what you see. Is password there? You might 
>> need to do something like $this->data[0]['password'], for example.
>> 
>> Jeremy Burns
>> jeremybu...@me.com
>> 
>> 
>> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>> 
>>> I'm still goofing with forms, ajax, validation, etc. trying to learn Cake. 
>>> 
>>> I have a form set up with a field for password[code]   
>>> $form->input('User.password');   [/code]
>>> 
>>> When I reference that field in the controller [code]   $pw1 = 
>>> $this->data['User']['password'];[/code]
>>> 
>>> I keep getting "undefined index for password." It looks okay, what else 
>>> could be the issue ? 
>>> 
>>> Also, I thought I had the ajax helper figured out for the most part but 
>>> there is still one field that just refuses to cooperate. 
>>> 
>>> [code]
>>> 
>>> echo $html->tableCells(array('Username:', $form->input('User.username', 
>>> array('label' => '')), ''));
>>> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername', 
>>> 'update' => 'nameAvail'));
>>> 
>>> [/code]
>>> 
>>> - Ed 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 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
>>>  
>>> To unsubscribe from this group, send email to 
>>> cake-php+unsubscribegooglegroups.com or reply to this email with the words 
>>> "REMOVE ME" as the subject.
>> 
>> 
>> 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
>>  
>> To unsubscribe from this group, send email to 
>> cake-php+unsubscribegooglegroups.com or reply to this email with the words 
>> 

Re: Undefined index

2010-03-26 Thread Ed Propsner
The only thing showing in the array is the field for 'confirm_password',

[code]

Array
(
[User] => Array
(
[confirm_password] => test
)

)

[/code]

I'm having the same issue with the the username field. It's acting
like the field doesn't exist.


On Sat, Mar 27, 2010 at 12:54 AM, Jeremy Burns  wrote:

> The reason I recommended that you examine the data array is that sometimes
> (and I often get confused with this myself) you need to double check exactly
> where the item you are looking for sits in the array. So if you can see the
> field you want, build the path to it by walking back up from it. If the path
> is not right, you get the undefined index error. Is it worth pasting the
> output here?
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
>
> On 27 Mar 2010, at 02:59, Ed Propsner wrote:
>
> I'm not sure why but I'm relatively sure that it's not recognizing the form
> fields for username and password.
>
> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner wrote:
>
>> Yes, I did try that. There is a field for confirm password as well and
>> that is all that is being presented to the controller.
>>
>>
>> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote:
>>
>>> Have you debugged the data that is being presented to the controller
>>> function? Set debug to 2 and type die(debug($this->data)); as the first
>>> instruction, then take a look at what you see. Is password there? You might
>>> need to do something like $this->data[0]['password'], for example.
>>>
>>> Jeremy Burns
>>> jeremybu...@me.com 
>>>
>>>
>>> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>>>
>>> I'm still goofing with forms, ajax, validation, etc. trying to learn
>>> Cake.
>>>
>>> I have a form set up with a field for password[code]
>>>   $form->input('User.password');   [/code]
>>>
>>> When I reference that field in the controller [code]   $pw1 =
>>> $this->data['User']['password'];[/code]
>>>
>>> I keep getting "undefined index for password." It looks okay, what else
>>> could be the issue ?
>>>
>>> Also, I thought I had the ajax helper figured out for the most part but
>>> there is still one field that just refuses to cooperate.
>>>
>>> [code]
>>>
>>> echo $html->tableCells(array('Username:', $form->input('User.username',
>>> array('label' => '')), ''));
>>> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername',
>>> 'update' => 'nameAvail'));
>>>
>>> [/code]
>>>
>>> - Ed
>>>
>>>
>>>
>>>
>>>
>>> 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
>>>
>>> To unsubscribe from this group, send email to cake-php+
>>> unsubscribegooglegroups.com or reply to this email with the words
>>> "REMOVE ME" as the subject.
>>>
>>>
>>>
>>> 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.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>> To unsubscribe from this group, send email to cake-php+
>>> unsubscribegooglegroups.com or reply to this email with the words
>>> "REMOVE ME" as the subject.
>>>
>>
>>
>
> 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
> &q

Re: Undefined index

2010-03-26 Thread Jeremy Burns
The reason I recommended that you examine the data array is that sometimes (and 
I often get confused with this myself) you need to double check exactly where 
the item you are looking for sits in the array. So if you can see the field you 
want, build the path to it by walking back up from it. If the path is not 
right, you get the undefined index error. Is it worth pasting the output here?

Jeremy Burns
jeremybu...@me.com


On 27 Mar 2010, at 02:59, Ed Propsner wrote:

> I'm not sure why but I'm relatively sure that it's not recognizing the form 
> fields for username and password. 
> 
> On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner  wrote:
> Yes, I did try that. There is a field for confirm password as well and that 
> is all that is being presented to the controller. 
> 
> 
> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote:
> Have you debugged the data that is being presented to the controller 
> function? Set debug to 2 and type die(debug($this->data)); as the first 
> instruction, then take a look at what you see. Is password there? You might 
> need to do something like $this->data[0]['password'], for example.
> 
> Jeremy Burns
> jeremybu...@me.com
> 
> 
> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
> 
>> I'm still goofing with forms, ajax, validation, etc. trying to learn Cake. 
>> 
>> I have a form set up with a field for password[code]   
>> $form->input('User.password');   [/code]
>> 
>> When I reference that field in the controller [code]   $pw1 = 
>> $this->data['User']['password'];[/code]
>> 
>> I keep getting "undefined index for password." It looks okay, what else 
>> could be the issue ? 
>> 
>> Also, I thought I had the ajax helper figured out for the most part but 
>> there is still one field that just refuses to cooperate. 
>> 
>> [code]
>> 
>> echo $html->tableCells(array('Username:', $form->input('User.username', 
>> array('label' => '')), ''));
>> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername', 
>> 'update' => 'nameAvail'));
>> 
>> [/code]
>> 
>> - Ed 
>> 
>> 
>> 
>> 
>> 
>> 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
>>  
>> To unsubscribe from this group, send email to 
>> cake-php+unsubscribegooglegroups.com or reply to this email with the words 
>> "REMOVE ME" as the subject.
> 
> 
> 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
>  
> To unsubscribe from this group, send email to 
> cake-php+unsubscribegooglegroups.com or reply to this email with the words 
> "REMOVE ME" as the subject.
> 
> 
> 
> 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
>  
> To unsubscribe from this group, send email to 
> cake-php+unsubscribegooglegroups.com or reply to this email with the words 
> "REMOVE ME" as the subject.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-26 Thread Ed Propsner
I'm not sure why but I'm relatively sure that it's not recognizing the form
fields for username and password.

On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner  wrote:

> Yes, I did try that. There is a field for confirm password as well and that
> is all that is being presented to the controller.
>
>
> On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote:
>
>> Have you debugged the data that is being presented to the controller
>> function? Set debug to 2 and type die(debug($this->data)); as the first
>> instruction, then take a look at what you see. Is password there? You might
>> need to do something like $this->data[0]['password'], for example.
>>
>> Jeremy Burns
>> jeremybu...@me.com 
>>
>>
>> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>>
>> I'm still goofing with forms, ajax, validation, etc. trying to learn
>> Cake.
>>
>> I have a form set up with a field for password[code]
>>   $form->input('User.password');   [/code]
>>
>> When I reference that field in the controller [code]   $pw1 =
>> $this->data['User']['password'];[/code]
>>
>> I keep getting "undefined index for password." It looks okay, what else
>> could be the issue ?
>>
>> Also, I thought I had the ajax helper figured out for the most part but
>> there is still one field that just refuses to cooperate.
>>
>> [code]
>>
>> echo $html->tableCells(array('Username:', $form->input('User.username',
>> array('label' => '')), ''));
>> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername',
>> 'update' => 'nameAvail'));
>>
>> [/code]
>>
>> - Ed
>>
>>
>>
>>
>>
>> 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
>>
>> To unsubscribe from this group, send email to cake-php+
>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>> ME" as the subject.
>>
>>
>>  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.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>> To unsubscribe from this group, send email to cake-php+
>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>> ME" as the subject.
>>
>
>

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-26 Thread Ed Propsner
Yes, I did try that. There is a field for confirm password as well and that
is all that is being presented to the controller.

On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns  wrote:

> Have you debugged the data that is being presented to the controller
> function? Set debug to 2 and type die(debug($this->data)); as the first
> instruction, then take a look at what you see. Is password there? You might
> need to do something like $this->data[0]['password'], for example.
>
> Jeremy Burns
> jeremybu...@me.com 
>
>
> On 25 Mar 2010, at 22:01, Ed Propsner wrote:
>
> I'm still goofing with forms, ajax, validation, etc. trying to learn Cake.
>
> I have a form set up with a field for password[code]
>   $form->input('User.password');   [/code]
>
> When I reference that field in the controller [code]   $pw1 =
> $this->data['User']['password'];[/code]
>
> I keep getting "undefined index for password." It looks okay, what else
> could be the issue ?
>
> Also, I thought I had the ajax helper figured out for the most part but
> there is still one field that just refuses to cooperate.
>
> [code]
>
> echo $html->tableCells(array('Username:', $form->input('User.username',
> array('label' => '')), ''));
> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername',
> 'update' => 'nameAvail'));
>
> [/code]
>
> - Ed
>
>
>
>
>
> 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
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>
>
>  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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Undefined index

2010-03-25 Thread Jeremy Burns
Have you debugged the data that is being presented to the controller function? 
Set debug to 2 and type die(debug($this->data)); as the first instruction, then 
take a look at what you see. Is password there? You might need to do something 
like $this->data[0]['password'], for example.

Jeremy Burns
jeremybu...@me.com


On 25 Mar 2010, at 22:01, Ed Propsner wrote:

> I'm still goofing with forms, ajax, validation, etc. trying to learn Cake. 
> 
> I have a form set up with a field for password[code]   
> $form->input('User.password');   [/code]
> 
> When I reference that field in the controller [code]   $pw1 = 
> $this->data['User']['password'];[/code]
> 
> I keep getting "undefined index for password." It looks okay, what else could 
> be the issue ? 
> 
> Also, I thought I had the ajax helper figured out for the most part but there 
> is still one field that just refuses to cooperate. 
> 
> [code]
> 
> echo $html->tableCells(array('Username:', $form->input('User.username', 
> array('label' => '')), ''));
> echo $ajax->observeField('UserUsername', array('url' => 'checkUsername', 
> 'update' => 'nameAvail'));
> 
> [/code]
> 
> - Ed 
> 
> 
> 
> 
> 
> 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
>  
> To unsubscribe from this group, send email to 
> cake-php+unsubscribegooglegroups.com or reply to this email with the words 
> "REMOVE ME" as the subject.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Undefined index

2010-03-25 Thread Ed Propsner
I'm still goofing with forms, ajax, validation, etc. trying to learn Cake.

I have a form set up with a field for password[code]
  $form->input('User.password');   [/code]

When I reference that field in the controller [code]   $pw1 =
$this->data['User']['password'];    [/code]

I keep getting "undefined index for password." It looks okay, what else
could be the issue ?

Also, I thought I had the ajax helper figured out for the most part but
there is still one field that just refuses to cooperate.

[code]

echo $html->tableCells(array('Username:', $form->input('User.username',
array('label' => '')), ''));
echo $ajax->observeField('UserUsername', array('url' => 'checkUsername',
'update' => 'nameAvail'));

[/code]

- Ed

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: "Notice (8): Undefined index: 0" When attempting to place custom element

2009-10-20 Thread StkMtd

Thanks John.

I used debug() and I was receiving the values I expected. I realized
that $this->params wasn't holding anything on the two problem cases,
so I added an additional if wrapping the first 3 checks:

if (isset($this->params['pass']['0'])) {

if ($this->params['pass']['0'] == 'home') {$pageNum = 1;}
elseif ($this->params['pass']['0'] == 'about') {$pageNum = 4;}
elseif ($this->params['pass']['0'] == 'contact') {$pageNum = 5;}

}

Goes off without a hitch now :)

On Oct 20, 2:10 pm, John Andersen  wrote:
> Try to put a debug($this->params) before you use it, so you can
> confirm that there are the values and indexes that you expect!
> Enjoy,
>    John
>
> On Oct 20, 8:18 pm, StkMtd  wrote:
>
> > Cake Version:
> > 1.2.5
>
> > Environment:
> > Apache and MySQL on localhost
>
> > Summary:
> > I'm creating a nav element to simplify the code on my main layout.
>
> > Details:
> > The nav element first checks which controller is active, or which page
> > in the pages controller. It then assigns an integer value to the
> > variable $pageNum, based on which of the 5 pages is currently being
> > viewed. From here it spits out a  with the menu item that is
> > currently active styled with a unique CSS style.
>
> > See the code for nav.ctp here:http://bin.cakephp.org/saved/51689
>
> > Errors Received:
> > Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 5]
> > Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 6]
> > Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 7]
>
> > Lines 2-7 (or view @CakeBin above):
> > 2. // determine the page being viewed
> > 3. // 1 = home, 2 = work, 3 = blog, 4 = about, 5 = contact
> > 4. $pageNum = 0;
> > 5. if ($this->params['pass']['0'] == 'home') {$pageNum = 1;}
> > 6. elseif ($this->params['pass']['0'] == 'about') {$pageNum = 4;}
> > 7. elseif ($this->params['pass']['0'] == 'contact') {$pageNum = 5;}
>
> > Full Error Dump (key lines are highlighted in 
> > yellow):http://pastebay.com/62559
>
> > Conclusions:
> > I believe that this error has something to do with $pageNum being set
> > to 0 (as per the error message). The strange thing about this error is
> > that it only appears when I'm viewing the main layout through the work
> > (works) and blog (posts) controllers. The home, about, and contact
> > pages do not yield this error.
>
> > I've tried my damndest to hack this thing out on my own, but I've
> > posted as much information as I could gather in hopes that someone can
> > give me a hand in figuring out what is wrong, and potentially how I
> > could fix it. Thanks in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: "Notice (8): Undefined index: 0" When attempting to place custom element

2009-10-20 Thread John Andersen

Try to put a debug($this->params) before you use it, so you can
confirm that there are the values and indexes that you expect!
Enjoy,
   John

On Oct 20, 8:18 pm, StkMtd  wrote:
> Cake Version:
> 1.2.5
>
> Environment:
> Apache and MySQL on localhost
>
> Summary:
> I'm creating a nav element to simplify the code on my main layout.
>
> Details:
> The nav element first checks which controller is active, or which page
> in the pages controller. It then assigns an integer value to the
> variable $pageNum, based on which of the 5 pages is currently being
> viewed. From here it spits out a  with the menu item that is
> currently active styled with a unique CSS style.
>
> See the code for nav.ctp here:http://bin.cakephp.org/saved/51689
>
> Errors Received:
> Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 5]
> Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 6]
> Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 7]
>
> Lines 2-7 (or view @CakeBin above):
> 2. // determine the page being viewed
> 3. // 1 = home, 2 = work, 3 = blog, 4 = about, 5 = contact
> 4. $pageNum = 0;
> 5. if ($this->params['pass']['0'] == 'home') {$pageNum = 1;}
> 6. elseif ($this->params['pass']['0'] == 'about') {$pageNum = 4;}
> 7. elseif ($this->params['pass']['0'] == 'contact') {$pageNum = 5;}
>
> Full Error Dump (key lines are highlighted in 
> yellow):http://pastebay.com/62559
>
> Conclusions:
> I believe that this error has something to do with $pageNum being set
> to 0 (as per the error message). The strange thing about this error is
> that it only appears when I'm viewing the main layout through the work
> (works) and blog (posts) controllers. The home, about, and contact
> pages do not yield this error.
>
> I've tried my damndest to hack this thing out on my own, but I've
> posted as much information as I could gather in hopes that someone can
> give me a hand in figuring out what is wrong, and potentially how I
> could fix it. Thanks in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



"Notice (8): Undefined index: 0" When attempting to place custom element

2009-10-20 Thread StkMtd

Cake Version:
1.2.5

Environment:
Apache and MySQL on localhost

Summary:
I'm creating a nav element to simplify the code on my main layout.

Details:
The nav element first checks which controller is active, or which page
in the pages controller. It then assigns an integer value to the
variable $pageNum, based on which of the 5 pages is currently being
viewed. From here it spits out a  with the menu item that is
currently active styled with a unique CSS style.

See the code for nav.ctp here:
http://bin.cakephp.org/saved/51689

Errors Received:
Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 5]
Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 6]
Notice (8): Undefined index: 0 [APP\views\elements\nav.ctp, line 7]

Lines 2-7 (or view @CakeBin above):
2. // determine the page being viewed
3. // 1 = home, 2 = work, 3 = blog, 4 = about, 5 = contact
4. $pageNum = 0;
5. if ($this->params['pass']['0'] == 'home') {$pageNum = 1;}
6. elseif ($this->params['pass']['0'] == 'about') {$pageNum = 4;}
7. elseif ($this->params['pass']['0'] == 'contact') {$pageNum = 5;}

Full Error Dump (key lines are highlighted in yellow):
http://pastebay.com/62559

Conclusions:
I believe that this error has something to do with $pageNum being set
to 0 (as per the error message). The strange thing about this error is
that it only appears when I'm viewing the main layout through the work
(works) and blog (posts) controllers. The home, about, and contact
pages do not yield this error.

I've tried my damndest to hack this thing out on my own, but I've
posted as much information as I could gather in hopes that someone can
give me a hand in figuring out what is wrong, and potentially how I
could fix it. Thanks in advance.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Undefined index: id [CORE/cake/libs/model/model.php, line 1312]

2009-09-11 Thread Eduardo Romero

Hi folks I have an HABTM relation table with no id, Cake complains
when saving:

Undefined index:  id [CORE/cake/libs/model/model.php, line 1312]


The table looks like:

examenes_referencias
 referencia_id
 examen_id


I changed the line 1312 to this: http://bin.cakephp.org/saved/50559

No error after that. I couldn't figure out how to open a bug on trac,
nor I'm sure that is a "real" bug or that that's the best fix. But
it's a fix :)

Hope it helps. Adding id to the table fixes it too.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Save HABTM, Undefined index: id

2009-08-30 Thread Wilson

Thanks Martin!  That works.  Not quite sure why, but I've added an
'id' field to my join table.  For the multi-saves, there's no error,
but nothing is written to the field?  Anyhow, I appreciate your help.

Wilson

On Aug 17, 4:02 am, Martin Westin  wrote:
> Which model doesn't have anidfield?
>
> If it has an pk or uid or some other name you should just let Cake
> know via the attribute $primaryKey.
> The join-table can manage without any primary key as long as you don't
> store any extra data in it. But this is not encouraged, it seems to be
> considered as smart as smoking cigarettes and drinking lighter-fluid
> at the same time. (I tried to discuss the point a while back.)
>
> But, since you mention a position value in the joining table you do
> need anidthere to make Cake happy.
>
> On Aug 17, 12:31 am, Wilson Sheldon  wrote:
>
> > Hi everyone,
>
> > Anytime I save a HABTM relationship, I always get this error:
>
> >Notice(8):Undefinedindex:  id
>
> > Everything works, but of course, this is annoying when I'm not in
> > production mode.  There is no plain 'id' in the model.
>
> > Done a bit of research on it, and found a few others who mention it,
> > but can't find answer, so just normally suppress it.
>
> > I think it's related to the fact, that I often store the position in
> > the join table.
>
> > Has anyone experienced this?  And if so, is there a workaround or a
> > better way to store the position?
>
> > I've also thought it might be something to do with theindexon my
> > join table?
>
> > Thanks,
> > Wilson
>
>
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Save HABTM, Undefined index: id

2009-08-17 Thread Martin Westin

Which model doesn't have an id field?

If it has an pk or uid or some other name you should just let Cake
know via the attribute $primaryKey.
The join-table can manage without any primary key as long as you don't
store any extra data in it. But this is not encouraged, it seems to be
considered as smart as smoking cigarettes and drinking lighter-fluid
at the same time. (I tried to discuss the point a while back.)

But, since you mention a position value in the joining table you do
need an id there to make Cake happy.



On Aug 17, 12:31 am, Wilson Sheldon  wrote:
> Hi everyone,
>
> Anytime I save a HABTM relationship, I always get this error:
>
> Notice (8): Undefined index:  id
>
> Everything works, but of course, this is annoying when I'm not in
> production mode.  There is no plain 'id' in the model.
>
> Done a bit of research on it, and found a few others who mention it,
> but can't find answer, so just normally suppress it.
>
> I think it's related to the fact, that I often store the position in
> the join table.
>
> Has anyone experienced this?  And if so, is there a workaround or a
> better way to store the position?
>
> I've also thought it might be something to do with the index on my
> join table?
>
> Thanks,
> Wilson
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Save HABTM, Undefined index: id

2009-08-16 Thread Wilson Sheldon

Hi everyone,

Anytime I save a HABTM relationship, I always get this error:

Notice (8): Undefined index:  id

Everything works, but of course, this is annoying when I'm not in
production mode.  There is no plain 'id' in the model.

Done a bit of research on it, and found a few others who mention it,
but can't find answer, so just normally suppress it.

I think it's related to the fact, that I often store the position in
the join table.

Has anyone experienced this?  And if so, is there a workaround or a
better way to store the position?

I've also thought it might be something to do with the index on my
join table?

Thanks,
Wilson
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: undefined index?

2009-07-06 Thread brian

On Mon, Jul 6, 2009 at 9:06 PM, keanoppy wrote:
>
> all index from the stages table, the output for $stage['Phase']['id']
> can be shown

If you're getting an "undefined index" error, what is the next word in
the error message? It should tell you which index is undefined.


> for the table stages,i have:
> id(pk),phase_id(fk),status,duration,stagesname_id
> (fk),p_date,a_date,remarks,created,modified
> which part of the controller code?

The part of the controller code that's relevant to this view. Post the
code you have that includes the find() call (or paginate() or however
you're querying the DB).

> the output from debug:
> include - APP\views\stages\index.ctp, line 31
> View::_render() - CORE\cake\libs\view\view.php, line 662
> View::render() - CORE\cake\libs\view\view.php, line 376
> Controller::render() - CORE\cake\libs\controller\controller.php, line
> 799
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 230
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
> [main] - APP\webroot\index.php, line 88

I meant the output of debug($stages), literally, not the debug message
from the error you're seeing. Put this line at the very top of your
view file:

debug($stages);

Alternatively, put this in the controller, right after your find() call:

die(debug($stages));

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: undefined index?

2009-07-06 Thread keanoppy

all index from the stages table, the output for $stage['Phase']['id']
can be shown
for the table stages,i have:
id(pk),phase_id(fk),status,duration,stagesname_id
(fk),p_date,a_date,remarks,created,modified
which part of the controller code?

the output from debug:
include - APP\views\stages\index.ctp, line 31
View::_render() - CORE\cake\libs\view\view.php, line 662
View::render() - CORE\cake\libs\view\view.php, line 376
Controller::render() - CORE\cake\libs\controller\controller.php, line
799
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 230
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
[main] - APP\webroot\index.php, line 88

On Jul 7, 8:51 am, brian  wrote:
> Which index? What is the table definition? What is the controller
> code? What is the output from debug($stages)?
>
> On Mon, Jul 6, 2009 at 8:35 PM, keanoppy wrote:
>
> > want to ask,i have table stages
> > but seems that for this particular page,the index cannot be undefined
> > other than the table and view,where else should i check?
> > this is the code fragment of the table:
> > the entire php echo for $stage got error
>
> >  > $i = 0;
> > foreach ($stages as $stage):
> >        $class = null;
> >        if ($i++ % 2 == 0) {
> >                $class = ' class="altrow"';
> >        }
> > ?>
> >        >
> >                
> >                        
> >                
> >                
> >                        link($stage['Phase']['id'], 
> > array('controller'=>
> > 'phases', 'action'=>'view', $stage['Phase']['id'])); ?>
> >                
> >                
> >                        
> >                
> >                
> >                        
> >                
> >                
> >                        link($stage['Stagesname']['name'], 
> > array
> > ('controller'=> 'stagesnames', 'action'=>'view', $stage['Stagesname']
> > ['id'])); ?>
> >                
> >                
> >                        
> >                
> >                
> >                        
> >                
> >                
> >                        
> >                
> >                
> >                        link(__('View', true), 
> > array('action'=>'view',
> > $stage['Stage']['id'])); ?>
> >                        link(__('Edit', true), 
> > array('action'=>'edit',
> > $stage['Stage']['id'])); ?>
> >                        link(__('Delete', true), array
> > ('action'=>'delete', $stage['Stage']['id']), null, sprintf(__('Are you
> > sure you want to delete # %s?', true), $stage['Stage']['id'])); ?>
> >                
> >        
> > 
> > 
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   3   >