Re: Undefined property help :(
what is on line 30 On Sat, Nov 28, 2009 at 11:25 PM, kani infok...@gmail.com wrote: i have a problem with add action help me. i used cake bake all http://localhost/loan/AjiltanBrts looks Ok http://localhost/loan/AjiltanBrts/add Notice (8): Undefined property: AjiltanBrt::$BankSalLav [APP \controllers\ajiltan_brts_controller.php, line 30] Fatal error: Call to a member function find() on a non-object in C: \xampp\htdocs\loan\app\controllers\ajiltan_brts_controller.php on line 30 i not added code. Please help me 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
Does CakePHP require a change of document root?
I am having trouble installing Cake on a webhosting company one.com server. Installed it a few times on with other hosting providers without problems. After contacting one.com helpdesk I received this answer: Quote: I am afraid you cannot install CakePHP. This is not supported by our servers at all. It is not blocked, but this requires a change of document root, which is not possible. Is it true that Cake really requires it? As far as I know it doesn't necessary require it, but you can tell it to, just like any PHP script/app. Can anyone shed a light on this? 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: Does CakePHP require a change of document root?
On Sun, Nov 29, 2009 at 10:36 PM, MissYeh miss...@gmail.com wrote: I am having trouble installing Cake on a webhosting company one.com server. Installed it a few times on with other hosting providers without problems. After contacting one.com helpdesk I received this answer: Quote: I am afraid you cannot install CakePHP. This is not supported by our servers at all. It is not blocked, but this requires a change of document root, which is not possible. Is it true that Cake really requires it? Evidently they don't know much about CakePHP. Do they support mod_rewrite and .htaccess override? The following link might be useful: http://book.cakephp.org/view/333/A-Note-on-mod_rewrite - Gonzalo 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: the essential mix of cakephp tips (community edition)
Hi teknoid, DO NOT HACK THE CORE AT ANY RATE, AND THIS IS FOR FORWARD COMPATIBILITY / MIGRATION PURPOSES, FOR EXAMPLE : AVOID ADDING AN ADDITIONAL CALLBACK BECAUSE YOU ALMOST ALWAYS DO NOT NEED TO CREATE IT 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: Caching custom routes
Yeah, adding a line matching url (not action) do the work! Thanks Dave for your advice, problem solved :) On Nov 28, 7:02 pm, Dave davidcr...@gmail.com wrote: what do you have in your $cacheAction variable in your controller? Perhaps adding a line to match the new routing url? On Fri, Nov 27, 2009 at 11:21 AM, Quess miroslaw.niepo...@gmail.com wrote: Hello, Is anybody here who make it working? In my application I have some custom urls and it seems like cache is not working when action is requested via custom route. To give you an idea what i talk about: If path is like that: /public/gown/gown-name-slug then action is cached, but when i want to make url more pretty: Router::connect( '/gown/:slug/*', array('controller' = 'public', 'action' = 'gown'), array( 'pass' = array('slug') ) ); and accessing the action like this: /gown/gown-slug-name action is called properly but cache doesnt works. Please help! :) Best Regards, Miro Check out the new CakePHP Questions sitehttp://cakeqs.organd 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: Undefined property help :(
Sorry my english is not good :) i solved but there is another problem only this module is ok other model has relationship problem foreighn key field is show but not as list box. i am confused :( i think line 30 is not reason maybe reason is relationship line 30 $bankSalLavs = $this-AjiltanBrt-BankSalLav-find('list'); following code generated by shell cake bake all class AjiltanBrt extends AppModel { var $name = 'AjiltanBrt'; ); var $belongsTo = array( 'BankSalLav' = array( //BankSalLav was BankSalLavs i removed 's' Is it cakephp issue? 'className' = 'BankSalLav', //BankSalLav was BankSalLavs i removed 's' 'foreignKey' = 'bank_sal_lavs_id', 'conditions' = '', 'fields' = '', 'order' = '' ), 'AjiltanTrlLav' = array( 'className' = 'AjiltanTrlLav', 'foreignKey' = 'ajiltan_trl_lavs_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); } i removed s from all model relationship class name but only AjiltanBrt model is ok other models have not list box. 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
$ajax-autocomplete empty results
So I've been pulling my hair out over this and I'm hoping somebody can lend some advice. I have a very basic auto-complete that I cannot get to work correctly. The problem I'm having is that I cannot get any results listed in the div of my auto-complete, its always blank when I try to pull data from another Model/Controller. If I provide a static HTML file as the data (url) for the auto-complete field it works fine. I've checked, double checked and triple checked that my controller is properly outputting the data for the auto-complete function, and it spits out a nicely formatted unordered list: ul li id=11Chicken Brests/li li id=21Cinnamon Sticks/li li id=46Coffee Stirrers/li li id=10Corn Starch/li /ul And like I said, if I put the exact same HTML in a static page and reference it in my $ajax-autocomplete() call it will display just fine. I've also watched the query's happening with Firebug so I know the URL is getting called correctly, and the POST content is getting sent properly. I'm truly at a loss as to what else to look at and I'm hoping somebody can point me in the right directly or see something I missed. - Input Form - ?php echo $form-create('Shoppinglist'); ? ?php echo $ajax-autocomplete('Item.title', '/items/query'); ? ?php echo $button-submit('Add Item','icons/ add.png','positive',true); ? ?php echo $form-end(); ? - Item list function - function query($q = null) { // Debugging line, if not called with POST, shortcut a search for 'c' if(empty($this-data)) $this-data['Item']['title'] = 'c'; $this-set('items', $this-Item-find('all', array( 'conditions' = array( 'Item.title LIKE' = '%'.$this-data['Item']['title'].'%' ), 'order' = array('Item.title' = 'ASC'), 'fields' = array('id','title') ))); $this-layout = 'ajax'; } 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
Association problem
I am trying to make some associations with a restaurant menu. I have five tables and they are all linked, although not directly. How do get info from all tables if some tables aren't in direct relation to the calling table? Here is my setup: menu_items -id -name -price menu_types: ( has only Lunch Dinner) -id -name menu_item_types (associates each menu item with either lunch or dinner) -menu_item_id -menu_item_type_id menu_subtypes: ( has Appetizers, Soups, Pasta, etc...) -id -name menu_item_types (associates each menu item with either Appetizers, Soups, Pasta, etc...) -menu_item_id -menu_item_type_id Basically, I want to be able to select all the info from all tables. The associations I have now are: MenuItem hasOne (MenuItemType, MenuItemSubtype) MenuType hasOne (MenuItemType) MenuItemType belongsTo (MenuItem, MenuType) MenuSubtype hasOne (MenuItemSubtype) MenuItemSubtype belongsTo (MenuItem, MenuSubtype) From MenuItemsController, I have no problem getting MenuItem, MenuItemType, and MenuItemSubtype but I can't get MenuType or MenuSubtype. How do I get those? 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: Does CakePHP require a change of document root?
hi cant help you much on this . .but looks like the following cakephp feature http://oss.org.cn/ossdocs/php/CakePHP-Manual/ch03s03.html might be the reason of conflictactually Apache sets the environment variable $_SERVER['DOCUMENT_ROOT'] to your root directory...but cakephp requires changing that Thanks alot for informing me about this now i need to think about any fix On 11/29/09, MissYeh miss...@gmail.com wrote: I am having trouble installing Cake on a webhosting company one.com server. Installed it a few times on with other hosting providers without problems. After contacting one.com helpdesk I received this answer: Quote: I am afraid you cannot install CakePHP. This is not supported by our servers at all. It is not blocked, but this requires a change of document root, which is not possible. Is it true that Cake really requires it? As far as I know it doesn't necessary require it, but you can tell it to, just like any PHP script/app. Can anyone shed a light on this? 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 -- Regards Abhishek Kaushik 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: Undefined property help :(
Tnx i solved i recreated all MVC and again removed all s from class name. 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
cakephp developer vmware appliance
Hello, is there an appliance somewhere on the net with LAMP developement enviroment for cakephp for download? Couldn't find any... thanks, Robert 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 to paginate with user-selected filter-options?
Hey, a short and simple example would be appreciated here. Setting standard- options is a thing I could build in, but as I do many different paginates in my controller I do not like do define these standards at the beginning of my controller so I do it in the action where it's needed. How does it work with GET and the url-parameter? Regards, DD On 28 Nov., 20:44, Dave davidcr...@gmail.com wrote: You don't need to set the defaults at all in the method, these should be set in your $paginate variable at the top of your controller. If you send the filter options as GET variables (or parameters for the action), then you can add 'url'=$this-params to your $paginator variable in the view file. This will tell the paginator to pass any custom parameters along when it paginates. On Sat, Nov 28, 2009 at 2:30 PM, Dave make.cake.b...@gmail.com wrote: I had the same problem and used the same method. Save to session and check session. Also not sure if this is the best way but it works. -Original Message- From: DigitalDude [mailto:e.blumsten...@googlemail.com] Sent: November-28-09 3:40 PM To: CakePHP Subject: Re: How to paginate with user-selected filter-options? Hey, ok I found a way to do this, but I'm not sure if that's the right approach. What I'm doing now, is store the incoming filter-options in the Session. When a user comes into the controller for the first time, I check if the session-keys are set, and if not, I apply some standard options. When the user sends the form, I write the selections into the session, and then set my variables with these session values. This works perfectly, even when I'm on page 2 and use the column-sorting everything is displayed correctly. I don't know if this is absolutely correct, but it works and I'll further develop this if anyone can tell me a better way to do this... Regards, DD On 28 Nov., 19:42, DigitalDude e.blumsten...@googlemail.com wrote: Hey, I tried, but it won't work. The variables für limit, order and sortby are overwritten after I change the page of the pagination, because the date from the forms no longer exist and are overwritten by my standard values. The problem is that when I use my filter-form and send the form, the variables are set. But when the paginator-link is clickes, the controller is called again, variables are set and the RequestHandler part will be ignored because in this case the data from the forms is not given to the controller. So I guess I need a way to a) store the given form data (filter options) persistent in my app so it won't be overwritten after a page-change or b) manipulate the links of the form helper after sending the form so it will have the desired options I selected in my form... There has to be someone who already did this in an app, right? On 28 Nov., 19:33, Dave davidcr...@gmail.com wrote: Rather then using request handler to check for post, you can try just checking if the value exists, ie if(!empty($this-data['Professor']['limit'])) $limit = $this-data['Professor']['limit']; On Sat, Nov 28, 2009 at 1:16 PM, DigitalDude e.blumsten...@googlemail.comwrote: Hey, I know how the paginator works and how I can define my conditions to filter as I like, but I was wondering how to add some more usability to this so let's say the user should set the filters on the fly with some drop downs... So I made some dropdowns with some options such as order = ASC/DESC, limit = 5,10,20,50 and oderby = lastname/firstname/email... That's really easy I think, so I created this as a form on top of the index-table, and checked in my controller wether the form is sent or not. The options I selected with my dropdowns are set and when I see the pagination after I hit Sent! the table is sorted as I selected it. But now comes the problem: After I hit Page 2, my filters are overwritten by the default values of my controller. So I think I'm doing something wrong, and I need a simple example of how I can achieve the desired functionality. Could please someone give me a hint how I can do it? When I hit the page-change link, my selected values are overwritten beause the RequestHandler does not kick in. Here's my controller-code: public function myProfs() { $limit = 10; $order = 'ASC'; $sortby = 'lastname'; if($this-RequestHandler-IsPost()) { $limit = $this-data['Professor']['limit']; $order = $this-data['Professor']['order']; $sortby = $this-data['Professor']['sortby']; } $this-paginate['Professor'] = array( 'contain' = false, 'conditions' = array( 'Professor.deleted' = 0, 'Professor.user_id' =
User logs out when doing too much ajax function
Hi, I'm wondering if it's normal that my application logs out a user after let's say he clicks a checkbox like crazy which triggers an Ajax action? 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: Issue with Configure::write('debug', '0');
You need to clear the CakePHP cache. Delete all the files (not directories) in app/tmp On Nov 28, 8:52 am, SugarCRM Geek naveenshurpale...@gmail.com wrote: Hello Cakephp Group, Am facing a problem with this function Configure::write('debug', 0); Whenever i install my cakephp in my Production server, i cannot access any of my screens. i keep getting an error. but if i change the value from 0 to say 3, then back to 0, then i am able to view all my screens. i dont wanna keep doing this all the time. so can u tell me a solution for this. thank u :) 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: Ext.Direct and CakePHP
I replied to your topic at extjs forum. http://www.extjs.com/forum/showthread.php?p=413495 On Nov 4, 3:26 pm, gianpaulo gcbasa...@gmail.com wrote: Anyone have successfully tried to integrate CakePHP and ExtJS's remoting feature (Ext.Direct)? I mean Ext.Direct to call controller's actions, and returning the values. 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: the essential mix of cakephp tips (community edition)
Thank you... and that's it? ... I was honestly hoping for a little more enthusiasm. C'mon people I know you got 'em ;) On Nov 29, 7:02 am, robustsolution i...@robustsolution.net wrote: Hi teknoid, DO NOT HACK THE CORE AT ANY RATE, AND THIS IS FOR FORWARD COMPATIBILITY / MIGRATION PURPOSES, FOR EXAMPLE : AVOID ADDING AN ADDITIONAL CALLBACK BECAUSE YOU ALMOST ALWAYS DO NOT NEED TO CREATE IT 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 to paginate with user-selected filter-options?
Here is a simple pseudo code example function myProfs($limit = 10, $sort = asc) { DO SEARCH WITH FILTERS } now make sure to add to your $paginator variable IN YOUR VIEW 'url'=$this-params now when you want to add custom filters, just point the link to, for example, controller/myProfs/20/desc On Sun, Nov 29, 2009 at 8:48 AM, DigitalDude e.blumsten...@googlemail.comwrote: Hey, a short and simple example would be appreciated here. Setting standard- options is a thing I could build in, but as I do many different paginates in my controller I do not like do define these standards at the beginning of my controller so I do it in the action where it's needed. How does it work with GET and the url-parameter? Regards, DD On 28 Nov., 20:44, Dave davidcr...@gmail.com wrote: You don't need to set the defaults at all in the method, these should be set in your $paginate variable at the top of your controller. If you send the filter options as GET variables (or parameters for the action), then you can add 'url'=$this-params to your $paginator variable in the view file. This will tell the paginator to pass any custom parameters along when it paginates. On Sat, Nov 28, 2009 at 2:30 PM, Dave make.cake.b...@gmail.com wrote: I had the same problem and used the same method. Save to session and check session. Also not sure if this is the best way but it works. -Original Message- From: DigitalDude [mailto:e.blumsten...@googlemail.com] Sent: November-28-09 3:40 PM To: CakePHP Subject: Re: How to paginate with user-selected filter-options? Hey, ok I found a way to do this, but I'm not sure if that's the right approach. What I'm doing now, is store the incoming filter-options in the Session. When a user comes into the controller for the first time, I check if the session-keys are set, and if not, I apply some standard options. When the user sends the form, I write the selections into the session, and then set my variables with these session values. This works perfectly, even when I'm on page 2 and use the column-sorting everything is displayed correctly. I don't know if this is absolutely correct, but it works and I'll further develop this if anyone can tell me a better way to do this... Regards, DD On 28 Nov., 19:42, DigitalDude e.blumsten...@googlemail.com wrote: Hey, I tried, but it won't work. The variables für limit, order and sortby are overwritten after I change the page of the pagination, because the date from the forms no longer exist and are overwritten by my standard values. The problem is that when I use my filter-form and send the form, the variables are set. But when the paginator-link is clickes, the controller is called again, variables are set and the RequestHandler part will be ignored because in this case the data from the forms is not given to the controller. So I guess I need a way to a) store the given form data (filter options) persistent in my app so it won't be overwritten after a page-change or b) manipulate the links of the form helper after sending the form so it will have the desired options I selected in my form... There has to be someone who already did this in an app, right? On 28 Nov., 19:33, Dave davidcr...@gmail.com wrote: Rather then using request handler to check for post, you can try just checking if the value exists, ie if(!empty($this-data['Professor']['limit'])) $limit = $this-data['Professor']['limit']; On Sat, Nov 28, 2009 at 1:16 PM, DigitalDude e.blumsten...@googlemail.comwrote: Hey, I know how the paginator works and how I can define my conditions to filter as I like, but I was wondering how to add some more usability to this so let's say the user should set the filters on the fly with some drop downs... So I made some dropdowns with some options such as order = ASC/DESC, limit = 5,10,20,50 and oderby = lastname/firstname/email... That's really easy I think, so I created this as a form on top of the index-table, and checked in my controller wether the form is sent or not. The options I selected with my dropdowns are set and when I see the pagination after I hit Sent! the table is sorted as I selected it. But now comes the problem: After I hit Page 2, my filters are overwritten by the default values of my controller. So I think I'm doing something wrong, and I need a simple example of how I can achieve the desired functionality. Could please someone give me a hint how I can do it? When I hit the page-change link, my selected values are overwritten beause the RequestHandler does not kick in. Here's my controller-code: public function myProfs() { $limit = 10;
Re: Does CakePHP require a change of document root?
If you keep reading, they tell you that it is not required Some users on shared hosts without access to their httpd.conf directives may not be able to change their DocumentRoot to reflect the production setup. Users in that situation may want to try and structure their Cake installation as follows. The Cake installation is found at /path_to_cake_install, and the DocumentRoot (which cannot be changed) points to/public_html. On Sun, Nov 29, 2009 at 6:56 AM, Abhishek Kaushik radicalet...@gmail.comwrote: hi cant help you much on this . .but looks like the following cakephp feature http://oss.org.cn/ossdocs/php/CakePHP-Manual/ch03s03.html might be the reason of conflictactually Apache sets the environment variable $_SERVER['DOCUMENT_ROOT'] to your root directory...but cakephp requires changing that Thanks alot for informing me about this now i need to think about any fix On 11/29/09, MissYeh miss...@gmail.com wrote: I am having trouble installing Cake on a webhosting company one.com server. Installed it a few times on with other hosting providers without problems. After contacting one.com helpdesk I received this answer: Quote: I am afraid you cannot install CakePHP. This is not supported by our servers at all. It is not blocked, but this requires a change of document root, which is not possible. Is it true that Cake really requires it? As far as I know it doesn't necessary require it, but you can tell it to, just like any PHP script/app. Can anyone shed a light on this? 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 -- Regards Abhishek Kaushik 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: Association problem
Try setting $this-recursive = 2. On Sun, Nov 29, 2009 at 5:04 AM, un professional iamunprofessio...@gmail.com wrote: I am trying to make some associations with a restaurant menu. I have five tables and they are all linked, although not directly. How do get info from all tables if some tables aren't in direct relation to the calling table? Here is my setup: menu_items -id -name -price menu_types: ( has only Lunch Dinner) -id -name menu_item_types (associates each menu item with either lunch or dinner) -menu_item_id -menu_item_type_id menu_subtypes: ( has Appetizers, Soups, Pasta, etc...) -id -name menu_item_types (associates each menu item with either Appetizers, Soups, Pasta, etc...) -menu_item_id -menu_item_type_id Basically, I want to be able to select all the info from all tables. The associations I have now are: MenuItem hasOne (MenuItemType, MenuItemSubtype) MenuType hasOne (MenuItemType) MenuItemType belongsTo (MenuItem, MenuType) MenuSubtype hasOne (MenuItemSubtype) MenuItemSubtype belongsTo (MenuItem, MenuSubtype) From MenuItemsController, I have no problem getting MenuItem, MenuItemType, and MenuItemSubtype but I can't get MenuType or MenuSubtype. How do I get those? 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: validate as hour
I would just create a custom validation function: /** * function intRange * * Checks if a value is an integer within the * range given (inclusive) * * @param $value to be checked * @param $start of range * @param $end of range * @return bool */ function intRange($value,$start,$end) { // Verify the value is an int if (!is_int($value)) return false; // Verify the value is within the range if ($value$start) return false; if ($value$end) return false; // Passed all tests return true; } use it in your validation array like this: 'hour' = array( 'rule' = array('intRange', 0, 23), 'message' = 'Please enter an integer between 0 and 23' ) On Nov 26, 10:41 am, ge...@dinnerbooking.com ge...@dinnerbooking.com wrote: I have an field which is an hour: hour = array( required = true, allowEmpty = false, rule = /^\d{1,2}+/, ), but how do I also specify that the number MUST be between 0 and 23 ? 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
Multiple checkbox in Cakephp 1.1 ??
Hello, forst of all i want you to know i'm using cakephp 1.1 because for me its too complicated upgrading to 1.2 and i would like to ask you something: I have a search form and i would like to make that my users could select some options with checkboxes (the options are in the database in an enum field). Is that possible or its only possible in cakephp1.2? 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
Updating Record - Reset Password
Hi I'm having problem with this method, it is not saving or updating, can you please help me and tell me what is wrong with the code below. I'm Using cakephp 1.2.5 public function reset_password() { if(!empty($this-data)) { if(!empty($this-data['User']['email'])) { $this-User-unBindAll(); $user = $this-User-findByEmail($this-data['User']['email']); if(!empty($user)) { $this-User-id = $user['User']['id']; $data['User']['id'] = $user['User']['id']; $data['User']['tmp_password'] = $this-generate_password(7); $data['User']['password'] = $this-Auth-password($data['User'] ['tmp_password']); if($this-User-save($data)) { $this-Session-setFlash('Password Successfully Changedbr / Please check you email.','flash'); } } else { $this-Session-setFlash('Email address is not on the database.','flash'); } } else { $this-Session-setFlash('Email address cannot be empty.','flash'); } } } public function generate_password($len) { $pass = ''; $lchar = 0; $char = 0; for($i=0;$i$len;$i++) { while($char==$lchar) { $char = rand(48, 109); if($char57)$char+=7; if($char90)$char+=6; } $pass .= chr($char); $lchar = $char; } return $pass; } 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
test case cannot find component class
I am very new to CakePHP and am trying to write a component for an existing application. I have written a few lines of component code and wanted to test them to be sure my setup and general syntax/code is correct. But, my test case can't find my component class. I get the following error through the web page: Fatal error: Class 'FormActionComponent' not found in /var/www/cake/ app/tests/cases/components/form_action.test.php on line 8 The FormActionComponent class is defined in /var/www/cake/app/controllers/components /form_action.php and the source is below. Further, the test case is defined in /var/www/cake/app/tests/cases/components/ form_action.test.php and is also below. Am I missing something? Also, as a side note, I can only seem to run test.php from a URL like http://myIpAddress/cake/app/webroot/test.php and none of the images or stylesheets are working. Could that be related? Thanks! FormActionComponent class: ?php class FormActionComponent extends Object { var $name = 'FormAction'; //called before Controller::beforeFilter() function initialize($controller, $settings = array()) { // saving the controller reference for later use $this-controller = $controller; } function approveForm($form_metadata_id) { $chainInstance = ClassRegistry::init ('ApprovalChainInstance'); $chain = $chainInstance-findByFormMetadataId ($form_metadata_id); $this-log('chain id '.$chain-id, LOG_DEBUG); } } ? FormActionTestCase class: ?php class FormActionTestCase extends CakeTestCase { var $fixtures = array ('form_metadata','approval_chain_instance','approval_chain_entry_instance'); var $components = array('Session', 'FormAction'); function testApproveForm() { $this-FormActionComponentTest = new FormActionComponent(); $controller = new FakeFormController(); $controller-FormMetadata = new FormActionTest(); $this-FormAcdtionComponentTest-startup( $controller); $result = $this-FormActionComponentTest-approveForm (1); $this-assertEqual($result,true); } } ? 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
Social Portal Demo developed in Cakephp
A Social Portal Demo developed in Cakephp giving You possibility to save your favorite music songs from Youtube by categories. Cakephp core version used is 1.2x. The purpose of this application is teaching and understand how Cakephp it works. Available options: Register, Login, Profile Modify, Add song by Category. Demo: http://eopp.de Download source from http://code.google.com/p/marancakemelody/ Any suggestions are welcome. 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: Multiple SUM in query
I have this same problem happening right now. You can put other fields in that are not sums and they are returned just fine, but of all the SUMs you put it it only returns the first occuring one. It is bizzarr. It is generating the appropriate SQL statement, because when i take the SQL statement it creates from the debugger, and run it in phpmyadmin manually, it returns exactly what i need, with all the appropriate sums. But for some reason it isnt returning it in cakephp. Any help on this would be great. On Nov 28, 6:48 am, Robin Marx marx.ro...@gmail.com wrote: Since I can't seem to find the answer on google, nor in the docs, I hope someone here can help me. Whenever I try to do a query with more then 1 SUM-field in it, it will only return the first SUM-field, not the other ones in its results. So for instance : SUM( amount1 ) as amountOne, SUM( amount2 ) as amountTwo + group on year will only return amountOne as result. When I do : SUM( amount2 ) as amountTwo, SUM( amount1 ) as amountOne + group on year it will only return amountTwo. Anyone got an idea why this behaviour occurs and how to fix it? We would be most grateful because it's quite urgent for a school project. 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: Saving HABTM..am I making it too complicated?
Did you ever find the place in the docs? Please advise 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: Saving HABTM..am I making it too complicated?
http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM On Mon, Nov 30, 2009 at 12:16 AM, websurfshop websurfs...@gmail.com wrote: Did you ever find the place in the docs? Please advise 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: Multiple checkbox in Cakephp 1.1 ??
No version of CakePHP has proper support for enum fields. And, AFAIK, multiple checkboxes are only possible in 1.2. If I were you, I'd spent the time to upgrade to 1.2. 1.2 is far better than 1.1, and 1.2 offers a easy upgrade path to the soon to be released 1.3, which is even better. On Nov 29, 6:59 pm, unax18 unaxi...@gmail.com wrote: Hello, forst of all i want you to know i'm using cakephp 1.1 because for me its too complicated upgrading to 1.2 and i would like to ask you something: I have a search form and i would like to make that my users could select some options with checkboxes (the options are in the database in an enum field). Is that possible or its only possible in cakephp1.2? 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