Re:  Send Email problem with multiple receivers

2011-12-03 Thread Abdulhakim Haliru
To debug email problems in cakephp. In your controller's action where you are using the Email component : Do : $this->Email->delivery ='debug' ; In your default.ctp (app/views/layouts) Do flash('email'); ?> Hint: make sure you are not redirecting after you do : $this->Email->send() ; In

Re: How to move "Actions" text to the right?

2011-12-03 Thread Jeremy Burns | Class Outfit
That is SO not the way to go. What is the CSS being applied to the table? Jeremy Burns Class Outfit http://www.classoutfit.com On 3 Dec 2011, at 20:44, Daniel wrote: > FYI: I added about 30   and that brought the "Actions" text back > in line. > > -- > Our newest site for the community: CakeP

Re: Cake 2.0 Virtual Fields

2011-12-03 Thread euromark
you might be doing sth wrong how are you processing the result? because Reporter__name is correct so far. cake will then automatically merge the content of this key back to the Model result array with the key "name". and then it should be available with $result['Reporter']['name'] since "name" an

cake.po resource location

2011-12-03 Thread euromark
Since the introduction of "cake" as domain for many common framework translations, the translations from the default.po are not used anymore. Leaving the strings untranslated, of course. I imagine once translated a cake.po file does not change that often anymore. Are there any plans for a central

Re: How to move "Actions" text to the right?

2011-12-03 Thread Daniel
FYI: I added about 30   and that brought the "Actions" text back in line. -- 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 f

Cake 2.0 Virtual Fields

2011-12-03 Thread aries
Hello, I'm trying to use virtual fields with Cake 2.0 and am running into a problem. I'm trying to populate a select input with values from a table that has no `name` field. I'm setting a virtual field called `name` with the first_name and last_name fields, but the menu is not populating properly.

Testing image upload

2011-12-03 Thread Matteo Landi
Hi list, what is the right way (if any) to test a controller which handles file uploads? At the moment I fill $_FILES with an array containing the fields expected by the controller (i.e. 'tmp_name', 'size', etc.) and then invoke testAction() passing $_FILES as well, but the whole mechanism fails wh

Edit an object without creating it

2011-12-03 Thread Matteo Landi
Hi everybody, is there a way, given an id, to invoke Model->save() (or anything else) to update the relative record if and only if the id is valid? Imagine I want to edit a Post and change its body; if I erroneously call the edit action passing an id which does not exist, Model->save($data) will cr

Re: Validation rules - what a nightmare...

2011-12-03 Thread euromark
well, thats another problem, of course. without last=>true if will show the wrong validation message but your empty string will always be hashed as well (using cake1.3) thats why you shouldnt use "password" as field name. I recommend reading: http://www.dereuromark.de/2011/08/25/working-with-pass

Re: Validation rules - what a nightmare...

2011-12-03 Thread heohni
So it should be this way? 'password' => array( 'required' => array('rule' => 'notEmpty', 'message' => 'EmptyPassword', 'required' => true, 'allowEmpty' => false, 'last' => true), 'between' => array('rule' => array('between', 6,15), 'message' => 'ToShortPassword', 'last' => t

Re: how to get url by giving the controller name, action name and parameters?

2011-12-03 Thread Todong
Thanks, it works! On Dec 3, 9:53 pm, euromark wrote: > you probably want to use Router::url() > > On 3 Dez., 14:22, Todong wrote: > > > > > > > > > Hi, everyone! > > > I know HtmlHelper::link() can generate a link whose url is generated > > by an array containing controller, action and parameter

Re: Validation rules - what a nightmare...

2011-12-03 Thread euromark
you should be using "last"=>true for every subrule http://book.cakephp.org/2.0/en/models/data-validation.html?highlight=last On 3 Dez., 18:16, heohni wrote: > Hi folks! > > Whats wrong here? > var $validate = array( >         'ben_name' => array( >             'required' => array('rule' => 'notE

Validation rules - what a nightmare...

2011-12-03 Thread heohni
Hi folks! Whats wrong here? var $validate = array( 'ben_name' => array( 'required' => array('rule' => 'notEmpty', 'message' => 'EmptyName') ), 'username' => array( 'required' => array('rule' => 'notEmpty', 'message' => 'EmptyEmail', 'required' => tru

Crazy behaviour of die() method

2011-12-03 Thread ghagerer
I was searching through Model.php inside of the cake-lib. I tried to debug a strange server bug. What I found was an absolutely strange behaviour of the die() function. The code: if ($this->getID() === false) { die('I died one time. '); return false; } die('I died a second time.')

Re: Validation problems

2011-12-03 Thread Toby G
Sorted it. It was because the relationship is a hasMany, so the data should have been passed as... Array ( [Booking] => Array ( [event_id] => 17 [booking_type] => is_physical_tickets [post_to_wall] => 1 ) [PhysicalTicket] => Array

HelpBalloon in Cake

2011-12-03 Thread dev
[Ref 1: https://groups.google.com/group/cake-php/browse_thread/thread/fa189d2079c2893b/dc95996da64ecc97?lnk=gst&q=helpballoon#dc95996da64ecc97] [Ref 2: http://www.beauscott.com/2006/08/19/ajax-enabled-help-balloons] I have put in an alert in HelpBalloon.js which executes. But the HelpBallon itsel

Re: CakePHP 2.0.3 out of the oven

2011-12-03 Thread euromark
for overcoming the above phpunit 3.6 output swallowing this might work as an enhancement for the CakeTestCase class: /** * outputs debug information during a web tester (browser) test case * since PHPUnit>=3.6 swallowes all output by default * this is a convenien

Re: How to move "Actions" text to the right?

2011-12-03 Thread Daniel
OK, here is the top part of the index.ctp file: Paginator->sort('id');?> Paginator->sort('title');?> >    

Re: How to move "Actions" text to the right?

2011-12-03 Thread Jeremy Burns | Class Outfit
Show some code? Jeremy Burns Class Outfit http://www.classoutfit.com On 3 Dec 2011, at 16:41, Jeremy Burns | Class Outfit wrote: > Sounds like you've added new table columns (td) without adding a matching > header (th). > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 3

Re: How to move "Actions" text to the right?

2011-12-03 Thread Daniel
No, there are 3 "td" and 3 "th". On Dec 3, 4:41 pm, Jeremy Burns | Class Outfit wrote: > Sounds like you've added new table columns (td) without adding a matching > header (th). > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > -- Our newest site for the community: CakePHP Video

Re: How to move "Actions" text to the right?

2011-12-03 Thread Jeremy Burns | Class Outfit
Sounds like you've added new table columns (td) without adding a matching header (th). Jeremy Burns Class Outfit http://www.classoutfit.com On 3 Dec 2011, at 16:35, Daniel wrote: > At some point during development of my CakePHP app the "Actions" > header on my categories index page appears to

How to move "Actions" text to the right?

2011-12-03 Thread Daniel
At some point during development of my CakePHP app the "Actions" header on my categories index page appears to have moved to the left so that it no longer appears above the buttons. I checked the ctp file for this page and there are no extra columns or such like. Is there a simple way to move the

Re: how to use tree behavior to build multilevel menu category

2011-12-03 Thread Tilen Majerle
in index method use $this->Category->find('threaded'); instead of $this->Category->generatetreelist(); what you will get returned look here: http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-threaded Then you need recursively check every category if has any children and display

Re: Cakephp and AJAX

2011-12-03 Thread Tilen Majerle
for response: just create a view like (but not 'default' layout, make a new layout 'ajax') in others functions how to detect ajax: $this->request->is('ajax') CONTENT FOR ajax.ctp layout: and in controller to enable this layout: $this->layout = 'ajax'; why this ? this will return just your 'arc

Re: how to get url by giving the controller name, action name and parameters?

2011-12-03 Thread euromark
you probably want to use Router::url() On 3 Dez., 14:22, Todong wrote: > Hi, everyone! > > I know HtmlHelper::link() can generate a link whose url is generated > by an array containing controller, action and parameters > e.g. > HtmlHelper::link('book', array('controller'=>'books', > 'action'=>'v

how to get url by giving the controller name, action name and parameters?

2011-12-03 Thread Todong
Hi, everyone! I know HtmlHelper::link() can generate a link whose url is generated by an array containing controller, action and parameters e.g. HtmlHelper::link('book', array('controller'=>'books', 'action'=>'view', 4)) will output: book Now I wanna get the only the url by giving the controller,

how to use tree behavior to build multilevel menu category

2011-12-03 Thread ahmed fakher
i want to build nav menu from main and subcategory,,i tried more things and choose tree behavior,,the problem is how to use The extracted data to build dropdown menu like this categories/index.ctp link("Add Category",array('action'=>'add')); echo ""; foreach($categories as $key=>$value){ ech

Re: Write unit test for a controller that uses AuthComponent in CakePHP 2.0.3

2011-12-03 Thread elitalon
If you look at my last piece of code I am exactly doing that: $this->Users = $this->generate('Users', array( 'components' => array('Session', 'Auth' => array('user')) 'models' => 'User' )); However, the problem got fixed after rebooting the machine. I don't know if it could be a cache issue.