Re: How to debug($result) during a test? (Cake 2.1)

2012-03-05 Thread andrewperk
&debug=1 does not work when testing controllers with the testAction method using the web runner. If you call the testAction method any debugs do not work. If you remove the testAction method call it works again and prints out your debug just fine. --debug does work in the CLI still though with te

Re: Epub format Cookbook not working

2012-03-05 Thread José Lorenzo
Fixed On Sunday, March 4, 2012 8:05:36 PM UTC-4:30, Ciul wrote: > > Hi, > > I love the new design of the Cakephp site. > > Guys, please check the epub format Cookbook download link, it seems > not working :: 404 error > > Regards, > Ciul -- Our newest site for the community: CakePHP Video T

Re: How to debug($result) during a test? (Cake 2.1)

2012-03-05 Thread andrewperk
Not even 5 seconds after I make this post I see that I should put &debug=1 in the URL because the tests swallow output. Sorry. On Mar 5, 8:55 pm, andrewperk wrote: > Hello, in the past during one a test case I used to be able to call > the debug method and it would output the data on to the testi

How to debug($result) during a test? (Cake 2.1)

2012-03-05 Thread andrewperk
Hello, in the past during one a test case I used to be able to call the debug method and it would output the data on to the testing web runner and display the information like so: function testSomething() { $result = 'My result'; debug($result); } This does not work now. I can't seem to figure ou

Re: $this->Auth->user()

2012-03-05 Thread Thiago Belem
Because that's what you passed to $this->Auth->login(), instead you should call it without parameters.. if you pass anything to it, it will login any data and save it to the session. Regards, -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil thiagobelem.net cont...@thiagobelem.net *

$this->Auth->user()

2012-03-05 Thread dariob
Hi, why $this->Auth->user() return me only username and password and no user.id ??? debug($this->Auth->user()); array( 'User' => array( 'User' => array( 'password' => '*', 'username' => 'pollo' )

Re: (un)conventional associations

2012-03-05 Thread luca capra
Thank you, this works fine for Photo->Upload but my problem actually is to link back to the Photo model: Upload hasOne Photo //Upload.php 'Photo' => array( 'className' => 'Photo', 'foreignKey' => ' ? ', // would be what ? 'conditions' => '',

Re: (un)conventional associations

2012-03-05 Thread José Lorenzo
$belongsTo = array('Upload' => array('foreignKey' => 'foreign_key', 'conditions' => array('Upload.model' => 'photo'))) On Monday, March 5, 2012 12:12:10 PM UTC-4:30, muka wrote: > > Hi, > I've made a nice mess with some tables.. > > I got a uploads table with two fields (model, foreign_key) which

Re: Strange blank spaces in markup

2012-03-05 Thread Salines
paste your view code here http://bin.cakephp.org/ -- 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 from this group, send em

(un)conventional associations

2012-03-05 Thread luca capra
Hi, I've made a nice mess with some tables.. I got a uploads table with two fields (model, foreign_key) which serve many models, so "Upload.model = 'photo' AND Upload.foreign_key = Photo.id" give me all the uploads Photo "out of the box". I can't figure out how to define the back association

Re: Saving simple associations

2012-03-05 Thread FirstTimeBaker
Jeremy thank you for your detailed reply. > Your field on the people table should be country_id, not countries_id. It's > always the singular table name plus '_id' (i.e. country_id) not the name of > the table, which is always plural (i.e. countries_id). I had renamed the countries_id -> countr

Re: Problem upgrading to cake 2.1

2012-03-05 Thread euromark
please read the migration guide: http://book.cakephp.org/2.0/en/appendices/2-1-migration-guide.html about AppHelper etc -- 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 the

Problem upgrading to cake 2.1

2012-03-05 Thread Felix
Hi, I'm trying to update one my apps to the new 2.1 release and on every page I get this error: Class 'AppHelper' not found in ../lib/Cake/View/Helper/FormHelper.php on line 27 Rolling back to 2.0.X the problem goes away. My limited troubleshooting abilities show that there wasn't any changes

Re: Scaffold Multi join tables

2012-03-05 Thread Rodrigo Rodrigues Moyle
You could name whatever you want, and use a model on this table. Em segunda-feira, 5 de março de 2012 07h49min19s UTC-3, Walter Raponi escreveu: > > Hi guys, > i finally started my first project with cake! > Have been reading a lot about it but now in real world have a great > problem! > > I'

Re: CakePHP 2.x plugin configs

2012-03-05 Thread majna
You can use configuration files. Check this gist: https://gist.github.com/1978200 On Saturday, March 3, 2012 5:41:42 PM UTC+1, U-Zyn Chua wrote: > > Hello, > > I've been a long time user of CakePHP (since pre v1) but have only > recently checked out CakePHP 2.x. > > I'm writing a plugin for Cake

SqlQueries in Fields to save?

2012-03-05 Thread Kosmo
Hi there, I know this could be a critical hole in my application, anyhow - is there a way to set an article-id like this? I can not assign auto_increment to this table AND I only want to do one query (because there could be several save querys parallel). $this->Article->create(); $data['Article']

Strange blank spaces in markup

2012-03-05 Thread heohni
Hi, I have a strange problem in 2 projects. One is using Cake 1.3 the other 2.1. I have in both projects strange blank spaces in my markup, which I can't find physically in my php code. Please check attachments. Did anyone had something before? What can I do? Those spaces do not appear, when I

Re: left join

2012-03-05 Thread Milina Udara
Problem solved $allleaves = $this->Leavetype->find('all', array( 'joins' => array( array( 'table' => 'vacations', 'alias' => 'vacationsJoin', 'type' => 'left', 'conditions' => array('vacation

Scaffold Multi join tables

2012-03-05 Thread Walter Raponi
Hi guys, i finally started my first project with cake! Have been reading a lot about it but now in real world have a great problem! I'm using cake 2.1.0 i have 3 tables: banners divs sources in naming convention for join tables if i have to join divs with banners i would make a table calle

Re: fetching related models data.

2012-03-05 Thread Kiran Ambati
Yes this is perfect. this solved my query completely. Thanks Jeremy :) Thanks, kiran On Mon, Mar 5, 2012 at 3:08 PM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > Also, go and learn about the Containable behaviour. > > Jeremy Burns > Class Outfit > > http://www.classoutfit.

Re: Saving simple associations

2012-03-05 Thread Jeremy Burns | Class Outfit
There are some non standard aspects to your code that might contribute to your problem. My advice would be to make some small changes and stick to conventions, if that's possible. Your field on the people table should be country_id, not countries_id. It's always the singular table name plus '_i

CakePHP problem in new domain

2012-03-05 Thread Achintya Chakraborty
Hi Guys, I have installed my project in a new production server and found that some of the pages are not displaying data first time loading. When I refresh the page,it loads the data properly. There is no such issue in my testing server as well as in client's testing server. Can anyone tell me why

Re: Saving simple associations

2012-03-05 Thread FirstTimeBaker
Jeremy thanks, but the problem remains. When I rerun the code, SQL log looks like this: SELECT COUNT(*) AS `count` FROM `countries` AS `Country` WHERE `Country`.`name` = 'Belgium' SELECT COUNT(*) AS `count` FROM `countries` AS `Country` WHERE `Country`.`name` = 'Austria' SELECT COUNT(*) AS `count`

Re: fetching related models data.

2012-03-05 Thread Jeremy Burns | Class Outfit
Also, go and learn about the Containable behaviour. Jeremy Burns Class Outfit http://www.classoutfit.com On 5 Mar 2012, at 09:30, Kiran Ambati wrote: > I got that. never mind. > > $this->Question->recursive = 1; > > is the answer. > > Thanks, > kiran > > On Mon, Mar 5, 2012 at 2:51 PM, Kira

Re: fetching related models data.

2012-03-05 Thread Kiran Ambati
I got that. never mind. $this->Question->recursive = 1; is the answer. Thanks, kiran On Mon, Mar 5, 2012 at 2:51 PM, Kiran Ambati wrote: > Hi All, > > I am using a model named 'Questions' It has relationships hasMany and > belongsTo with few other models. Now I want to fetch data in controlle

fetching related models data.

2012-03-05 Thread Kiran Ambati
Hi All, I am using a model named 'Questions' It has relationships hasMany and belongsTo with few other models. Now I want to fetch data in controller such that i get all associated data for particular record in questions table. For eg: - If I input a question_id = 1. I should get all the related