Re: Empty hasOne association

2008-03-31 Thread Preloader
Any comments on this issue? :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PRO

Re: about cakephp 1.2.0.6311: Model::updateAll()

2008-03-31 Thread Grant Cox
Tickets go on https://trac.cakephp.org However, if you search there you will find a few tickets on the same topic, such as: https://trac.cakephp.org/ticket/3029 "The purpose of updateAll() is to allow updating of fields based on calculated values of other fields. Hence, strings are not supposed

Re: Is cakePHP alive?

2008-03-31 Thread Grant Cox
I'll bet that what is actually crashing apache is the Zend Optimizer extension for PHP. On Apr 1, 11:17 am, Vangel <[EMAIL PROTECTED]> wrote: > The topic sounded like a troller post, I guess it served its purpose. > Hack the cake core if you believe its messing up. Thats what Open > Source is fo

Re: Run query in background while showing "Please wait"

2008-03-31 Thread kdecapite
> Oh, and don't forget to create an index on (fn, ln) for both tables. Sorry for being out of touch lately. I had to table this issue to make progress on a different work-related project. Anyway, I spent some time reading up on indexes. Just by adding the (ln, fn) index to both tables (contacts a

Re: Bindable vs Conditional Joins

2008-03-31 Thread rob5408
Incredible, thanks for your help! On Mar 31, 10:15 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > This may help: > > http://bakery.cakephp.org/articles/view/polymorphic-behavior > > On Mon, Mar 31, 2008 at 8:11 PM, rob5408 <[EMAIL PROTECTED]> wrote: > > > I have a Athletes table as such >

pagination help

2008-03-31 Thread bob
I am using cake 1.2 I am trying to use paginate, but the problem i am having is that my URL is localhost/controller/action/param1/param2 so when i try to do echo $paginator->numbers(); in my view, I get the URL localhost/controller/action/page:2 instead of localhost/controller/action/param1/param

Model named "List"

2008-03-31 Thread Colin Viebrock
I'm guessing this isn't possible, since "list" seems to be a reserved class name in PHP (5.2.5). class List extends AppModel { var $name = 'List'; } Parse error: syntax error, unexpected T_LIST, expecting T_STRING in / var/www/app/models/list.php on line 3 Is there a way around this? I c

Re: Is cakePHP alive?

2008-03-31 Thread Vangel
The topic sounded like a troller post, I guess it served its purpose. Hack the cake core if you believe its messing up. Thats what Open Source is for. On Apr 1, 9:05 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Mon, Mar 31, 2008 at 7:21 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >

Re: Bindable vs Conditional Joins

2008-03-31 Thread Dardo Sordi Bogado
This may help: http://bakery.cakephp.org/articles/view/polymorphic-behavior On Mon, Mar 31, 2008 at 8:11 PM, rob5408 <[EMAIL PROTECTED]> wrote: > > I have a Athletes table as such > > id > name > athlete_type > > Then I have tables that contain fields specific to different > athlete_types

Re: Problems with Acl/Auth

2008-03-31 Thread Dardo Sordi Bogado
Get the SQL queries cake is making, post the here if that doesn't clarify the issue. Also check with an updated version of cake, there are some ACL related bugs that have been fixed in the branch. It will useful to help you, if you include your Auth setup. On Mon, Mar 31, 2008 at 10:26 PM, Sam S

Re: Problems with Acl/Auth

2008-03-31 Thread Sam Sherlock
AFAIK login and login are special functions, that don't require acl branches (is it fair to call them that, part of a tree) it won't solve the issue, are other controlers working with acl? On 31/03/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hi, > > I have spent hours and hours strug

Re: Is cakePHP alive?

2008-03-31 Thread Chris Hartjes
On Mon, Mar 31, 2008 at 7:21 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Is there any unofficial newer releases of 1.2 or approximate date of > 1.2 RC1? You can always work off of the main dev branch, which is what a lot of people do. Or download the nightlies. Oh, you mean you didn'

Re: Is cakePHP alive?

2008-03-31 Thread Sam Sherlock
is the prize a ltd edition release of cake? Signed merchandise... ;) On 01/04/2008, Sliv <[EMAIL PROTECTED]> wrote: > > > "Often I have tracked the issue down to my own damned foul ups - > > things I can't blame on cake. " > > ding! ding! ding! Johnny, tell the man what he's won ;) > > > > > --~

Re: Is cakePHP alive?

2008-03-31 Thread Sliv
"Often I have tracked the issue down to my own damned foul ups - things I can't blame on cake. " ding! ding! ding! Johnny, tell the man what he's won ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" gro

Re: Is cakePHP alive?

2008-03-31 Thread Sam Sherlock
> > Is there any unofficial newer releases of 1.2 or approximate date of > 1.2 RC1? frequent svn updates; some might say your brave asking about release dates. p.s.Recently i found out even how to 'kill' apache with cake (model > bug?) did you submit a ticket to trac? Or it may be an issue wi

Re: Is cakePHP alive?

2008-03-31 Thread Sliv
I heard it's going to be tomorrow. You killed apache with cake? u r haxx0r /bow s3nd m3 sCr!pT5 pl omg!!!11one --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send emai

Problems with Acl/Auth

2008-03-31 Thread [EMAIL PROTECTED]
Hi, I have spent hours and hours struggling with the ACL. It is about the most frustrating thing I have worked with. I have to use it because its inheritable permissions (if anyone has any alternatives to use I am all ears). Anyway, this is what my trees look like: Welcome to CakePHP v1.2.0.6311

Is cakePHP alive?

2008-03-31 Thread [EMAIL PROTECTED]
As it's passed 1/4 of a year since last release of cakePHP, I'm wondering, is this project still alive? I see many discussions here at google group, many tickets, but the main framework is still beta. Is there any unofficial newer releases of 1.2 or approximate date of 1.2 RC1? p.s.Recently i f

Bindable vs Conditional Joins

2008-03-31 Thread rob5408
I have a Athletes table as such id name athlete_type Then I have tables that contain fields specific to different athlete_types baseball_stats table athlete_id homeruns strikeouts rbis basketball_stats athlete_id points freethrowpercentage I was looking for a structure coming from a find()

CakePHP 1.2 Routing with prefixes

2008-03-31 Thread ModByChris
I have not been able to find the way around this an it seems like it should be possible. I have a News controller, and I am dealing with a biennial event, so I have items for 2007,2009 and eventually more. I want to identify which set of news items to display, but using the URLs: /2007/news/:acti

Re: Logical organization best practice

2008-03-31 Thread Baz
Not sure this will help, but here goes: What my Cake experience has shown me is that, there was a lot of stuff that I used to do "manually" that is now made obsolete by CakePHP. I've wasted a lot of trying to to port legacy code into my Cake projects, that I later realized that I didn't need. Off

Logical organization best practice

2008-03-31 Thread Matt
Hi all, My application accepts a fairly large collection of parameters and uses them to generate an HTML snippet. The snippet is generated lazily, so that the parameters can change frequently but the HTML is only generated when it's needed. Once generated, the HTML is cached (in the database) unt

Re: Auth question in 1.2 Beta

2008-03-31 Thread Baz
You should be able to do just what I said below and in the beforeFilter() of the post controller, change Auth's redirect to /posts/main...don't forget to call the parent beforeFilter though Good luck. On Mon, Mar 31, 2008 at 11:43 AM, Baz <[EMAIL PROTECTED]> wrote: > You can't have the login

Re: Bindable syntax, old vs new

2008-03-31 Thread rob5408
Awesome thanks! Rob On Mar 31, 3:14 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Equivalent should be: > > $this->Person-find('first', array( > 'conditions' => array('Person.id' => $id), > 'restrict' => array('PersonType') > )); > > Take a look at the new CakePHP find synta

RE: Bindable syntax, old vs new

2008-03-31 Thread Mariano Iglesias
Equivalent should be: $this->Person-find('first', array( 'conditions' => array('Person.id' => $id), 'restrict' => array('PersonType') )); Take a look at the new CakePHP find syntax to understand it better. -MI

Bindable syntax, old vs new

2008-03-31 Thread rob5408
I'm apparently not understanding the the proper shortform Bindable syntax, isn't this... $this->Person->restrict('PersonType'); $this->Person->find('Person.id = ' . $id); ...equivalent to this... $this->Person->find('Person.id = ' . $id, array('restrict' => array('PersonType'))); ? print_r-ing

View this page "CakePHP Tickets: How To Help"

2008-03-31 Thread Sliv
Added a link to the official CookBook chapter on Testing. Click on http://groups.google.com/group/cake-php/web/cakephp-tickets-how-to-help - or copy & paste it into your browser's address bar if that doesn't work. --~--~-~--~~~---~--~~ You received this message bec

Re: Installation into subdirectory - "Missing Controller" errors

2008-03-31 Thread Matt
Hi Dardo, Thanks for the response. On your recommendation I've upgraded to Cake 1.2, and it does make things easier. This error, I'm afraid, was an embarrassingly simple mistake. The webserver response was exactly right; the files were missing. When I imported the project into Eclipse I accidenta

Re: run cakephp app within an iframe

2008-03-31 Thread john miller
$html->url works! Thanks. On Mon, Mar 31, 2008 at 1:23 PM, Pablo Viojo <[EMAIL PROTECTED]> wrote: > > > On Mon, Mar 31, 2008 at 12:34 PM, eniacx <[EMAIL PROTECTED]> wrote: > > > > > Is there a way to do this without an absolute URL? > > > > Does anyone know of a way to obtain the URL version of

Re: run cakephp app within an iframe

2008-03-31 Thread jonknee
> > Try [1]: > > "> > His CakePHP app is only inside the frame, so the HTML helper is not available. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@go

Re: run cakephp app within an iframe

2008-03-31 Thread Pablo Viojo
On Mon, Mar 31, 2008 at 12:34 PM, eniacx <[EMAIL PROTECTED]> wrote: > > Is there a way to do this without an absolute URL? > > Does anyone know of a way to obtain the URL version of WWW_ROOT? > > thanks in advanced > > Try [1]: "> -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net [1] http:/

Re: run cakephp app within an iframe

2008-03-31 Thread jonknee
> Is there a way to do this without an absolute URL? Did you try with a leading /? With your original method it would only work on the root directory. Example: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake

Auth component not retrieving User data

2008-03-31 Thread mehodgson
I have set up a basic authentication using the Auth component, but the values for $this->Auth->user() are not being set for most of the user data fields. When a login is processed only the user id and username fields are set to the database values in the Auth session data, all other user informat

Re: - is that possible?

2008-03-31 Thread Chris Hartjes
On Mon, Mar 31, 2008 at 12:51 PM, MarcS <[EMAIL PROTECTED]> wrote: > > Is there any way I can do this with cake using the $form->input helper > or will have always have to manually code this and then access $_POST > directly? > echo $form->input('Foo.array.1'); echo $form->input('Foo.array.2')

Re: run cakephp app within an iframe

2008-03-31 Thread eniacx
Is there a way to do this without an absolute URL? Does anyone know of a way to obtain the URL version of WWW_ROOT? thanks in advanced On Mar 19, 1:25 pm, mauricio pastrana <[EMAIL PROTECTED]> wrote: > sigh. never-mind. fixed! (by calling theiframeon an absolute path > src="http://domain/myapp

- is that possible?

2008-03-31 Thread MarcS
Hi, before I started using CakePHP, I frequently used something like which would then $_POST [array] => Array ( [0] => 1 [1] => 2 [2] => 3 ) Is there any way I can do this with cake using the $form->input helper or will have always have

Re: Auth question in 1.2 Beta

2008-03-31 Thread Baz
You can't have the login forms action as /posts/main I think what you may need to do is in your *other* login form, change the action /users/login (I'm assuming)... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: saveAll and validationErrors

2008-03-31 Thread Preloader
Hello again, it seems, that this bug is documented here: https://trac.cakephp.org/ticket/3872 Regards, Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send emai

Re: Auth question in 1.2 Beta

2008-03-31 Thread overeat
Thanks Chris, I think I got what you mean, and I will try it tonight. Actually, I did read all your blogs about the Auth, and that's part of the reason, I am testing drive the Auth component. Really appreciate your helps to show people how to use cake's new features. It really helps a lot. On

Re: how to validate fields that are not part of a model?

2008-03-31 Thread MarcS
thanks a lot On Mar 29, 1:25 pm, simonb <[EMAIL PROTECTED]> wrote: > You need to create a schema in the model. I have done this in a couple > of projects where no tables exists for the model yet I needed to > validate some user input.  See the previous thread below. > > http://groups.google.com/g

Re: Auth question in 1.2 Beta

2008-03-31 Thread Chris Hartjes
On Mon, Mar 31, 2008 at 11:52 AM, overeat <[EMAIL PROTECTED]> wrote: > > I want to display some information on the /posts/index page and the > login form, instead of a link to /posts/main, then let the Auth > component direct the user to the /users/login page, then after the > user passed the

Re: Auth question in 1.2 Beta

2008-03-31 Thread overeat
I want to display some information on the /posts/index page and the login form, instead of a link to /posts/main, then let the Auth component direct the user to the /users/login page, then after the user passed the authentication, then Auth redirect them to the /posts/ main. So I put *another* lo

about cakephp 1.2.0.6311: Model::updateAll()

2008-03-31 Thread [EMAIL PROTECTED]
Hi all, I am new to the cake group, thanks for see the thread. I was trying to use updateAll() and being stuck for a while. not sure it is a bug or something special, would somebody please identify it. And how can I report a bug? The following query works in 1.2.0.6311: $this->Fruit->updateAl

Re: A web 2.0 app powered by Cake needs an expert to help debug

2008-03-31 Thread b logica
Bah. I'm only funnin'. On Mon, Mar 31, 2008 at 11:44 AM, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On Mon, Mar 31, 2008 at 11:40 AM, b logica <[EMAIL PROTECTED]> wrote: > > This group is about sharing info in order that we can all learn > > something and, thus, take Cake further. If you w

Re: A web 2.0 app powered by Cake needs an expert to help debug

2008-03-31 Thread Chris Hartjes
On Mon, Mar 31, 2008 at 11:40 AM, b logica <[EMAIL PROTECTED]> wrote: > This group is about sharing info in order that we can all learn > something and, thus, take Cake further. If you wanna hire someone try > craigslist. Otherwise, post some queries here and maybe someone can > help sort out

Re: Auth question in 1.2 Beta

2008-03-31 Thread Chris Hartjes
On Sun, Mar 30, 2008 at 2:28 AM, overeat <[EMAIL PROTECTED]> wrote: > > Everything looks logic to me, but how can I make the Auth component to > authenticate the user in the first form, and then direct them to the / > posts/main without showing the second login screen? Or is it possible? By de

Re: A web 2.0 app powered by Cake needs an expert to help debug

2008-03-31 Thread b logica
Ooh, which one to reply to? This group is about sharing info in order that we can all learn something and, thus, take Cake further. If you wanna hire someone try craigslist. Otherwise, post some queries here and maybe someone can help sort out your problems. You can always change site name to pro

Re: Auth question in 1.2 Beta

2008-03-31 Thread overeat
Yes, the /posts/index is allowed. So user can access /posts, and / posts/index will be displayed, then there is a login form on the page, so user can login. But I can not get the user to pass the validation on this form. Instead, user will be prompt the /user/login page. --~--~-~--~---

A web 2.0 app powered by Cake needs an expert to help debug

2008-03-31 Thread web20
Hi I have a new web 2.0 app that's really nice. Except we have some issues my developer can't debug. I need an expert to have a look and advise me and help me move my project forward. All help appreciated and credit will be given. Please email [EMAIL PROTECTED] and I'll send the URL and the pro

Re: session expires

2008-03-31 Thread Sliv
Sorry, I meant core.php (need more coffee this morning) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,

efficient allow / deny check for pages

2008-03-31 Thread Marcel
Hello! I have a model named Menu which surprisingly stores menuitems for my websites (using tree behavior). There are also models voor Users and Groups. The menu creates the Aco's and the User and Group models create the corresponding Aro's. What I want is to get all menuitems that a user has ac

A web 2.0 app powered by Cake needs an expert to help debug

2008-03-31 Thread web20
Hi there, I have a new killer web 2.0 app, that's been featured on some leading blogs and has some fantastic exposure. The site is great and we hope to take it very far. We have some issues with the code that our developer can't figure out. I need an expert who can help us out and help us to kee

Re: two models, duplicate and conflicting associations belongsTo/hasMany and HABTM

2008-03-31 Thread Werschinger
This works. I just need to rearrange the $this->data array from $this->data['Country'] to $this->data['SearchCountry'] or vice versa as necessary in the controller. Thank you very much for your help and your quick response, grigi. --~--~-~--~~~---~--~~ You recei

Re: session expires

2008-03-31 Thread Sliv
are you speaking of a cake application you're designing? If so, you may want to try increasing the timeout value in config.php or reducing the security level as something quick to try... On Mar 31, 3:16 am, shan <[EMAIL PROTECTED]> wrote: > when i try to update my password my session is expires

Array vs HABTM

2008-03-31 Thread Caio Vitor
Hi, I have a HABTM relationship: Trabalho HABTM Cautor So, I have an Ajax System that I search the Coautor and save it's ID in a array Session ($this->Session->write('Coautores'); Now I want to save this array as: $this->data['Trabalho']['Coautor'] and I can't. Does anyone can help me? How t

Re: I18n::translate - problem with plural translations

2008-03-31 Thread Claudinei
Ok, I know this trick would be better handled by my application logic. But so, why this syntax for "__n" function? why to this function really needs a singular parameter in addition to plural parameter? I mean, if it do force me to specify a singular, and a plural for specific cases, it should wor

Re: Question about model relational mapping

2008-03-31 Thread Dardo Sordi Bogado
Also check the recursive variable in models (go to the manual) and the bindable behavior (bakery). On Sat, Mar 29, 2008 at 11:29 PM, Joel <[EMAIL PROTECTED]> wrote: > > You would use the Model::bindModel() and Model::unbindModel() function > to create and destroy model associations dynamically

Re: saveAll and validationErrors

2008-03-31 Thread Preloader
Hello grigri, I'm using echo $form->input('Location.name'); and echo $form->input('Address.postalcode'); Regards, Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group,

Re: two models, duplicate and conflicting associations belongsTo/hasMany and HABTM

2008-03-31 Thread grigri
You need to use a different alias for the associations, and set the className property to the original class. class Profile extends AppModel { var $belongsTo = array('Country'); var $hasAndBelongsToMany = array( 'SearchCountry' => array('className' => 'Country') ); } class Country ex

two models, duplicate and conflicting associations belongsTo/hasMany and HABTM

2008-03-31 Thread Werschinger
Dear CakePHP people I ran into a problem with associations. I have the models Profile and Country (n:1). Profile belongsTo Country, and Country hasMany Profiles. So, in the table profiles I have a country_id as a foreign key. Now, I'd like a person/user to save countries as search criteria. So,

Re: Parsing a cakephp session Data row

2008-03-31 Thread grigri
> but if someone can point me to the function cake uses to parse > this, that will help a lot. Cake doesn't encode or decode the session data; normal php does. See the php manual for unserialize() and session_decode() functions; there are lots of user comments with variants on how to decode ses

Re: Updating additional fields in join tables

2008-03-31 Thread grigri
> But what's the whole point of being able > to fetch additional join table fields by setting the "with" attribute > in the HABTM definition but not being able to update these fields > without creating a model? I think you're seeing this the wrong way around. The point of the `with` attribute is

Re: Test Suite using a console or shell script

2008-03-31 Thread Defranco
On 27 mar, 16:16, Sliv <[EMAIL PROTECTED]> wrote: > I haven't tried this, but you may want to check it out: > > http://lemoncake.wordpress.com/2007/06/24/cakephp-test-suite-shell/ Hi Sliv, Thank you very much, This is exactly what I'm looking for - I'll give a try and provide a feedback here,

Re: Updating additional fields in join tables

2008-03-31 Thread Dardo Sordi Bogado
I think creating a model is the way to go. On Mon, Mar 31, 2008 at 6:04 AM, mich <[EMAIL PROTECTED]> wrote: > > Hello bakers! > > First: I think the new "with" attribute in HABTM definitions is great. > I started a new project including a User and a Game model with a HABTM > relationship.

Re: saveAll and validationErrors

2008-03-31 Thread grigri
What code are you using in the view to generate the form fields and display the error messages? On Mar 31, 9:44 am, Preloader <[EMAIL PROTECTED]> wrote: > Hello Bakers, > > I have a problem with the Model::saveAll function and the display of > validation errors. I'm not sure if this is a bug or i

Re: I18n::translate - problem with plural translations

2008-03-31 Thread Dardo Sordi Bogado
But showing add coments, instead of show comments is a matter of logic of your application, I18N isn't intended to do it. if (count($comments) == 0) { // show add comment } else { // show comment/comments (here comes the __n) } On Mon, Mar 31, 2008 at 8:17 AM, Dardo Sordi Bogado <[EMAIL PRO

Re: I18n::translate - problem with plural translations

2008-03-31 Thread Dardo Sordi Bogado
I think you need to specify in the header of your po file the number of plural forms for your language. http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#PO-Files (at the end of chapter) http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#Plural-forms (th

Updating additional fields in join tables

2008-03-31 Thread michaaaa
Hello bakers! First: I think the new "with" attribute in HABTM definitions is great. I started a new project including a User and a Game model with a HABTM relationship. The join table is "games_users" and contains three fields: "game_id", "user_id" and the additional field "last_played". Users

TreeBehaviour

2008-03-31 Thread acoustic_overdrive
I'm using the TreeBehaviour on a Page model and I noticed that when records are ADDED with no parent selected they are saved in the database with a parent_id of 0, but when records are EDITED and given no parent they saved with NULL as the parent_id. My add and edit controller logic is almost ide

saveAll and validationErrors

2008-03-31 Thread Preloader
Hello Bakers, I have a problem with the Model::saveAll function and the display of validation errors. I'm not sure if this is a bug or if I did something wrong. Maybe one of you could help me out! MODELS: Location: - name (alphaNumeric) - ... - ... Address: - ... - postalcode (postal) - ... AS

Re: Parsing a cakephp session Data row

2008-03-31 Thread Stephen Orr
Trouble is, as he says in the original post, this is for an external application. So he can't use Cake methods. That doesn't mean there's not an easier way to do it, however I can't think of one :) On Mar 31, 6:06 am, jonknee <[EMAIL PROTECTED]> wrote: > > Thanks for your repleys. I got it work

Strange behaviour with saving HABTM associations

2008-03-31 Thread glastoveteran
Hi all, I've got myself into a confused mess over HABTM relations and how to save them. I've just got one fundamental problem that's occurring at the moment when trying to save an Event. In my Event add form I have multi-select tags for EventTypes and Downloads. Here is a snippet from my Event

session expires

2008-03-31 Thread shan
when i try to update my password my session is expires and i redirect to index page pls help me if any one knows :) Advance Thanks, shan. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post t