Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread John Andersen
You could probably use the BeforeSave method to modify the values, so as to replace 'NULL' with null or remove the field entirely in the array. Enjoy, John [snip] -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message

Re: cant send email

2014-12-30 Thread ajt
Ok I used ssl and this worked as is public $gmail2 = array( 'host' => 'ssl://smtp.gmail.com', 'port' => 465, 'username' => 'jxxxm', 'password' => 'j', 'transport' => 'Smtp', ); -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http:/

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread MikeK
Thanks again, yes this is what I am seeing and is consistent with the idea that the old code did not submit a NULL field. As notated above the "save" statement in the controller has no parms other than $this->data - when the field has nothing assigned to it cakePHP 1.3.20 sets it to NULL - alth

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread MikeK
FYI the host is running MYSQL 5.0.96-log and PHP 5.3.24 -- 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 r

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread John Andersen
I just checked MySQL and it does fail when I try to insert a NULL into a Non-Null column. So it is only when there is no value for the column that MySQL will use the default value instead. So when CakePHP uses NULL for that column, MySQL will fail the insert operation. How does the save stateme

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread MikeK
I also ran the legacy code with some SQL log dumping and it seems to me the old code did NOT attempt an INSERT with the values of the unset fields set to NULL - apparently it only attempted to INSERT the fields that were set, at least according to the lastQuery() dump. -- Like Us on FaceBook h

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread MikeK
John- Thank you for the reply. Yes indeed I am working on a copy of the DB - in fact I have cloned the entire domain including the DB etc, so I am able to compare things as well as test tweaks in the DB. Yes a default value of 0.00 is specified for the 'column' . The column definitions are: c

Trouble with Twitter plugin: Where to place it?

2014-12-30 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I migrate a project from 1.3 to 2.n. I replace the old Twitter Component with the Twitter plugin https://github.com/mishudark/CakePHP-2.x-Twitter-Plugin Usage: Upload to app/Plugin/Twitter So I unzip the Plugin place it inside .../app/Plugin

Re: 1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread John Andersen
Can I assume that you are working on a copy of the original database? If so, please verify that a default value is specified for that column. Kindly provide us with the definition of it. It is quite alright for CakePHP to provide a NULL for the column on an insert, MySql should then set the val

Posting Data to Controller Function that has no view

2014-12-30 Thread Randy
Form->create('user', array('action'=>'view','inputDefaults'=> array('div'=> false,'fieldset'=>false))); ?> Form->input('username');?> Form->postLink('Find User', array('action' => 'view',$this->request->data['user']['username']));?> When I try to send this with a submit button I get an err

1.3 Migration Question re:NULL and Defaults

2014-12-30 Thread MikeK
I am porting a 1.2.0.5875 app to 1.3 in preparation for moving to 2.X. I have several fields (tax, amount, fee) in an order record all with NULL set to "No", each is a decimal(6,2) field, and each has default value of 0.00 The following code worked fine and dandy in the 1.2 system and in the eve

1.3 Migration Question re:cleanupFields

2014-12-30 Thread MikeK
I am porting a 1.2.0.5875 app to 1.3 in preparation for moving to 2.X. I have several fields (tax, amount, fee) in an order record all with NULL set to "No", each is a decimal(6,2) field, and each has default value of 0.00 The following code worked fine and dandy in the 1.2 system and in the eve

Re: cant send email

2014-12-30 Thread Stephen S
Hey Since you're using gmail, can you confirm you've enabled IMAP in your actual gmail account settings. If you don't do this, you will never be able to send emails via SMTP. It's also worth mentioning that since you're using TLS, the correct port is 587. SSL is port 465. Hope this helps On 29