thanks! making those changes to the view worked. interesting how nothing in the controller failed, made it hard to debug.
On Dec 20, 11:38 pm, Adam Royle <[email protected]> wrote: > If you are upgrading from 1.1 there could be many things that are > tripping you up. You controller code looks fine, although I would > change your view code to this: > > <?php > echo $form->create('User'); > echo $form->input('about_me', array('type' => 'textarea'); > echo $form->end('Submit'); > ?> > > Also, in 1.2 "User/about_me" would be changed to "User.about_me". > > Lastly maybe there is something not right in your AppModel, or any > behaviors you might have enabled? > > And make sure you try running in debug mode = 2 to ensure table cache > is being refreshed. > > Cheers, > Adam > > > > mike wrote: > > please someone help with this! I'm stuck > > > On Dec 19, 10:49 pm, mike <[email protected]> wrote: > > > somehow, the only sql i see in debug mode is DESCRIBE `users` > > > > On Dec 16, 4:28 am, grigri <[email protected]> wrote: > > > > > What SQL is being executed? > > > > > On Dec 16, 5:26 am, mike <[email protected]> wrote: > > > > > > somehow, its getting to 'test2' in the controller, however, I don't > > > > > see thedatain the table! I actually had this working in cake1.1 but > > > > > updated to 1.2 changed htmlhelper to formhelper, and now it doesn't > > > > > work! any help appreciated. > > > > > > Thanks. > > > > > >database: > > > > > CREATE TABLE users > > > > > ( > > > > > id intNOTNULL AUTO_INCREMENT, > > > > > /* ... some other fields here */ > > > > > about_me varchar(255), > > > > > PRIMARY KEY (id) > > > > > ); > > > > > > model: > > > > > class User extendsAppModel > > > > > { > > > > > var $name = 'User'; > > > > > > var $validate = array(); > > > > > > } > > > > > > view: > > > > > > <? echo $form->create('User', array('action' => '/add')); ?> > > > > > > <?php echo $form->textarea('User/about_me')?> > > > > > > <?php echo $form->submit('Add'); ?> > > > > > > <? //echo $form->end('Add User'); ?> > > > > > </form> > > > > > > controller: > > > > > ... > > > > > function add() { > > > > > $this->log('in newuser_controller add()'); > > > > > $this->User->create(); > > > > > if(!empty($this->data)) { > > > > > $this->log($this->data); > > > > > $this->log('test1'); > > > > > //If the formdatacan be validated and saved... > > > > > if($this->User->save($this->data)) { > > > > > $this->log('test2'); > > > > > //Set a session flash message and redirect. > > > > > $this->Session->setFlash("User Saved!"); > > > > > //$this->redirect('newuser/add'); > > > > > } > > > > > } > > > > > }- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
