Re: Avoiding $uses but binding not giving a result?
You are using the plural. Try $this-Article-Comment-CommentsRank 2010/5/26 Shaz shazam...@gmail.com I have: Article [hasmany] Comment [hasmany] CommentRank CommentRank [belongsto] Comment [belongsto] Article I try to use (in the articles controller) $this-Article-Comments- CommentsRanks-read() but it results in “Undefined property: AppModel::$CommentsRanks” I am trying to avoid using $uses as the models are related to one another; but the binding only goes as far as $this-Article-Comments, any advice on why it is not going further? I have tried the different recursive levels to no avail. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pagination ordered by a field that is not in the table
I like these ideas, but the solution should be simpler than this. If I had written: }else{ //line 1021 $options['order'][$field] = $value; } the ordering in pagination should work correctly. The only objective of that code in the other email is to avoid sql injections, because $value will be concatenated in the query like: ORDER BY model.$value In my opinion, Cake should handle this automatically. Thank you 2010/5/22 WebbedIT p...@webbedit.co.uk If you are regularly sorting fields by aggregate values then it may be a lot more efficient to add those as real fields into the database which are calculated afterSave and afterDelete as will save a lot of extra database work in the long run. HTH Paul. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How do I save a field on my User without breaking the ACL?
I use $this-User-save($this-data) instead of saveField. 2010/5/24 Jon Chin port23u...@gmail.com I'm using Auth and db ACL, but I have an action that screws up my ACL records every time. I have ACL set up just like the Book instructs. I'm building a change password page where I want to just update the password. I run the following commands: $this-User-id = $this-Session-read('Auth.User.id'); $this-User-saveField('password', $this-data['User']['password']); (I've also tried $this-User-save()). When I execute this, it deletes the user's parent_id from the aros table as well as corrupts the tree-ness of the ACL tables. What am I doing wrong? Thanks in advance. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Validation errors
There is this option: http://book.cakephp.org/view/198/options-error But is not very good to do things different from the patterns 2010/5/23 Ed Propsner crotchf...@gmail.com It returns exactly what I would expect it to: Array ( [ProfileAttribute] = Array ( [gender] = Male ) ) Everything with the data seems to be fine, the model is even validating as expected. The $this-validateErrors array is loaded with the error messages, they are just not displaying. I'm assuming it's something I did because all of my original forms that I made before the problem started all work just fine, no probs. On Sun, May 23, 2010 at 1:38 AM, Filipe Teles Rodrigues filipe.t2...@gmail.com wrote: This is strange. Put here the output of pr($this-data) before the validation. 2010/5/23 Ed Propsner crotchf...@gmail.com The models were all baked originally but edited as I went along. One of the tests was with a freshly baked model and controller but the view was not. The view in that case only consisted of a form, one field, and a submit button ... it still didn't work. I'm not quite sure what got changed or altered but I've been through 4 more forms since and with every one of them I had to manually display the validation errors. I guess I broke it 8-) On Sun, May 23, 2010 at 1:13 AM, Filipe Teles Rodrigues filipe.t2...@gmail.com wrote: Have you done these models with bake? If not, you could bake a model and see how it makes the forms, views, validations, etc. Maybe it helps. 2010/5/22 Ed Propsner crotchf...@gmail.com Now I'm really stumped. The new form I just created is having the same problem with validation errors. What am I overlooking here? On Sat, May 22, 2010 at 1:54 PM, Ed Propsner crotchf...@gmail.comwrote: Yup, I did and there was no problems with it. I think I'm to the point where I'm going to kick the entire problem to the curb. I manually pulled the errors from $this-validationErrors array and displayed them that way. I'll be starting another model, controller, etc. for another form shortly and if the problem persists ... well, I dunno 8-) I was convinced it was something I was doing wrong because I have a handful of other forms that all function flawlessly with validation errors - this is the only one I had problems with. - Ed On Sat, May 22, 2010 at 1:45 PM, John Andersen j.andersen.lv@ gmail.com wrote: Ok :) Have you tried to use the method described by Master Ram, just so it can be confirmed that the validation errors do get to the form helper? Enjoy, John On May 22, 8:39 pm, Ed Propsner crotchf...@gmail.com wrote: @john, Sorry about that. I was grasping at straws and scrapped everything and started over since my original post. The names are consistent across MVC. It now uses ProfileAttribute - Ed [snip] Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group
Re: Validation errors
Have you done these models with bake? If not, you could bake a model and see how it makes the forms, views, validations, etc. Maybe it helps. 2010/5/22 Ed Propsner crotchf...@gmail.com Now I'm really stumped. The new form I just created is having the same problem with validation errors. What am I overlooking here? On Sat, May 22, 2010 at 1:54 PM, Ed Propsner crotchf...@gmail.com wrote: Yup, I did and there was no problems with it. I think I'm to the point where I'm going to kick the entire problem to the curb. I manually pulled the errors from $this-validationErrors array and displayed them that way. I'll be starting another model, controller, etc. for another form shortly and if the problem persists ... well, I dunno 8-) I was convinced it was something I was doing wrong because I have a handful of other forms that all function flawlessly with validation errors - this is the only one I had problems with. - Ed On Sat, May 22, 2010 at 1:45 PM, John Andersen j.andersen...@gmail.comwrote: Ok :) Have you tried to use the method described by Master Ram, just so it can be confirmed that the validation errors do get to the form helper? Enjoy, John On May 22, 8:39 pm, Ed Propsner crotchf...@gmail.com wrote: @john, Sorry about that. I was grasping at straws and scrapped everything and started over since my original post. The names are consistent across MVC. It now uses ProfileAttribute - Ed [snip] Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Validation errors
This is strange. Put here the output of pr($this-data) before the validation. 2010/5/23 Ed Propsner crotchf...@gmail.com The models were all baked originally but edited as I went along. One of the tests was with a freshly baked model and controller but the view was not. The view in that case only consisted of a form, one field, and a submit button ... it still didn't work. I'm not quite sure what got changed or altered but I've been through 4 more forms since and with every one of them I had to manually display the validation errors. I guess I broke it 8-) On Sun, May 23, 2010 at 1:13 AM, Filipe Teles Rodrigues filipe.t2...@gmail.com wrote: Have you done these models with bake? If not, you could bake a model and see how it makes the forms, views, validations, etc. Maybe it helps. 2010/5/22 Ed Propsner crotchf...@gmail.com Now I'm really stumped. The new form I just created is having the same problem with validation errors. What am I overlooking here? On Sat, May 22, 2010 at 1:54 PM, Ed Propsner crotchf...@gmail.comwrote: Yup, I did and there was no problems with it. I think I'm to the point where I'm going to kick the entire problem to the curb. I manually pulled the errors from $this-validationErrors array and displayed them that way. I'll be starting another model, controller, etc. for another form shortly and if the problem persists ... well, I dunno 8-) I was convinced it was something I was doing wrong because I have a handful of other forms that all function flawlessly with validation errors - this is the only one I had problems with. - Ed On Sat, May 22, 2010 at 1:45 PM, John Andersen j.andersen...@gmail.com wrote: Ok :) Have you tried to use the method described by Master Ram, just so it can be confirmed that the validation errors do get to the form helper? Enjoy, John On May 22, 8:39 pm, Ed Propsner crotchf...@gmail.com wrote: @john, Sorry about that. I was grasping at straws and scrapped everything and started over since my original post. The names are consistent across MVC. It now uses ProfileAttribute - Ed [snip] Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en