Re: Poll: what do you hate about CakePHP?

2013-10-12 Thread Tahiri Abdou
Poor documentation 

On Thursday, May 7, 2009 10:29:55 PM UTC, Nate wrote:

 Well, maybe hate's a strong word.  Let's say, what do you like the 
 least?  Kind of an odd question, I know, but since we've kick-started 
 development of a new version, I'd like to know what the most 
 frustrating things with the framework are, even if they're things we 
 can't fix right away. 

 I'll get us started: PHP 4 support. 

 Who's next? TIA for the input.

-- 
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: Translate Behavior Save and Validate more languages

2013-10-12 Thread Tahiri Abdou
try 
$this-Model-saveAssociated($data);


On Monday, May 7, 2012 2:33:41 PM UTC+1, manzapanza wrote:

 I'm trying to Save and Validate categories with 3 translations for the 
 field 'name' using TranslateBehavior. 
 I have a problem with the validation of the field with Translation. 

 Model/Category.php

 public $actsAs = array('Translate' = array('name' = 'MyTranslateName'));
 public $validate = array(
 'name' = array(
 'notempty' = array(
 'rule' = array('notempty'),
 'message' = 'Error notempty',
 ),
 ),
 ...
 );


 View/Categories/admin_edit.ctp:

 echo $this-Form-create('Category');
 echo $this-Form-input('Category.name.deu', array('label' = 
 __d('Category', 'Name Deu')));
 echo $this-Form-input('Category.name.eng', array('label' = 
 __d('Category', 'Name Eng')));
 echo $this-Form-input('Category.name.ita', array('label' = 
 __d('Category', 'Name Ita')));
 echo $this-Form-end(__d('app', 'Submit'));


 In the controller I use simply the save() method and the behavior store 3 
 records correctly in i18n table but the all three values are not validated.
 Is validated only the field of language = $this-Category-locale but in 
 case of a error the error is returned for Category.name field and not for 
 Category.name.eng and for this error messages are not displayed...

 How can I do to validate translations in the same form?

 Thanks!
 Massimo


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