Re: Scaffold & insert: session problem
Solved, I had validate_empty in id field :) thanks John! PS. There is no way to edit own post titles here? Would be nice habit to put some status marks to them (Solved: Scaffold & insert: session problem) On Apr 17, 12:08 am, John David Anderson <[EMAIL PROTECTED]> wrote: > On Apr 16, 2007, at 1:59 PM, bono wrote: > > > > > > > Lots of same kind of question but didn't find the answer. I have table > > like this: > > > CREATE TABLE 'users' ( > > 'id' INT( 10 ) NOT NULL AUTO_INCREMENT , > > 'username' VARCHAR( 40 ) NOT NULL , > > 'password' VARCHAR( 40 ) NOT NULL , > > 'email' VARCHAR( 255 ) NOT NULL , > > 'first_name' VARCHAR( 40 ) NOT NULL , > > 'last_name' VARCHAR( 40 ) NOT NULL , > > PRIMARY KEY ('id`), > > UNIQUE KEY 'username' ('username'), > > UNIQUE KEY 'email' ('email') > > ) TYPE = MYISAM ; > > > and I have "baked" default scaffold controller and view. When I try to > > add new user "Please correct errors below." error message is shown all > > the time even though all fields are correctly entered and no error > > messages are showing. > > > It comes from here (scaffold.php line 317): > > if (isset($this->controller->Session) && $this->controller->Session- > >> valid != false) { > > $this->controller->Session->setFlash(__('Please correct errors > > below.', true)); > > } > > > I have tried all three session saving methods buts it makes no > > difference. Environment is OS X 10.4.9, cakephp 1.2.0.4798alpha, php 5 > > and MySQL 5. > > > Any suggestions? > > Can you show us what your model looks like? > > You might want to comment out the validation rules in the model just > to see if that is what is causing the problems. > > -- John > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Scaffold & insert: session problem
On Apr 16, 2007, at 1:59 PM, bono wrote: > > Lots of same kind of question but didn't find the answer. I have table > like this: > > CREATE TABLE 'users' ( > 'id' INT( 10 ) NOT NULL AUTO_INCREMENT , > 'username' VARCHAR( 40 ) NOT NULL , > 'password' VARCHAR( 40 ) NOT NULL , > 'email' VARCHAR( 255 ) NOT NULL , > 'first_name' VARCHAR( 40 ) NOT NULL , > 'last_name' VARCHAR( 40 ) NOT NULL , > PRIMARY KEY ('id`), > UNIQUE KEY 'username' ('username'), > UNIQUE KEY 'email' ('email') > ) TYPE = MYISAM ; > > and I have "baked" default scaffold controller and view. When I try to > add new user "Please correct errors below." error message is shown all > the time even though all fields are correctly entered and no error > messages are showing. > > It comes from here (scaffold.php line 317): > if (isset($this->controller->Session) && $this->controller->Session- >> valid != false) { > $this->controller->Session->setFlash(__('Please correct errors > below.', true)); > } > > I have tried all three session saving methods buts it makes no > difference. Environment is OS X 10.4.9, cakephp 1.2.0.4798alpha, php 5 > and MySQL 5. > > Any suggestions? Can you show us what your model looks like? You might want to comment out the validation rules in the model just to see if that is what is causing the problems. -- John > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Scaffold & insert: session problem
Lots of same kind of question but didn't find the answer. I have table like this: CREATE TABLE 'users' ( 'id' INT( 10 ) NOT NULL AUTO_INCREMENT , 'username' VARCHAR( 40 ) NOT NULL , 'password' VARCHAR( 40 ) NOT NULL , 'email' VARCHAR( 255 ) NOT NULL , 'first_name' VARCHAR( 40 ) NOT NULL , 'last_name' VARCHAR( 40 ) NOT NULL , PRIMARY KEY ('id`), UNIQUE KEY 'username' ('username'), UNIQUE KEY 'email' ('email') ) TYPE = MYISAM ; and I have "baked" default scaffold controller and view. When I try to add new user "Please correct errors below." error message is shown all the time even though all fields are correctly entered and no error messages are showing. It comes from here (scaffold.php line 317): if (isset($this->controller->Session) && $this->controller->Session- >valid != false) { $this->controller->Session->setFlash(__('Please correct errors below.', true)); } I have tried all three session saving methods buts it makes no difference. Environment is OS X 10.4.9, cakephp 1.2.0.4798alpha, php 5 and MySQL 5. Any suggestions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---