Re: scaffold error
Hi, >From the look of it I'm assuming you are using a Has And Belongs To Many (HABTM) relation. For scaffolding to work properly your table names, and foreign key relations have to strictly follow the cake conventions, and your models need to have the correct relations put in Would you like to paste your actual database schema, models and , to help understand the problem better? Regards Vinci On Nov 30, 11:10 pm, Luke <[EMAIL PROTECTED]> wrote: > I am not sure what I did, but for some reason the edit action isn't > working in any of my controllers. It keeps telling me "Invalid id for > Order::edit()". Why would it be doing that? Here is an example > controller: > > class OrderItemsController extends AppController { > > var $name = 'OrderItems'; > var $uses = array('OrderItem', 'Order'); > var $helpers = array('Html', 'Form' ); > var $scaffold; > > } > > ?> --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: scaffold error
it outputs "app\controllers\orders_controller.php (line 41)" and an empty yellow box. I am on version 1.2.0.5875 pre-beta On Nov 30, 12:27 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > what version? > > Try debug($this->data) in beforeFilter; > > 2007/11/30, Luke <[EMAIL PROTECTED]>: > > > > > I am not sure what I did, but for some reason the edit action isn't > > working in any of my controllers. It keeps telling me "Invalid id for > > Order::edit()". Why would it be doing that? Here is an example > > controller: > > > > class OrderItemsController extends AppController { > > > var $name = 'OrderItems'; > > var $uses = array('OrderItem', 'Order'); > > var $helpers = array('Html', 'Form' ); > > var $scaffold; > > > } > > ?> --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: scaffold error
what version? Try debug($this->data) in beforeFilter; 2007/11/30, Luke <[EMAIL PROTECTED]>: > > I am not sure what I did, but for some reason the edit action isn't > working in any of my controllers. It keeps telling me "Invalid id for > Order::edit()". Why would it be doing that? Here is an example > controller: > > class OrderItemsController extends AppController { > > var $name = 'OrderItems'; > var $uses = array('OrderItem', 'Order'); > var $helpers = array('Html', 'Form' ); > var $scaffold; > > } > ?> > > > --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Scaffold Error
Wow ! You guys are fast :-) Thanks !! That did it :-) S --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Scaffold Error
nate beat me :-p nate wrote: > Try this: > > public $name = "HelpCategories"; > > Sorry if the "name" thing wasn't completely clear. > > > > > > --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Scaffold Error
it should be: class HelpCategoriesController extends AppController { public $name = "HelpCategories"; var $scaffold; var $useDbConfig = "wwa"; } where $name doesnt have 'Controller' in the string. it should be named: app/controllers/help_categories_controller.php Syl wrote: > G'day - > > I am having trouble getting the scaffolding to work with my cake > installation. Here is my code : > > class HelpCategoriesController extends AppController > { > public $name = "HelpCategoriesController"; > var $scaffold; > var $useDbConfig = "wwa"; > > } > > Pretty basic, nothing fancy - But here is the result I am getting : > > == > Notice: Undefined property: HelpPagesController::$table in > C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 599 > > Notice: Undefined property: HelpPagesController::$alias in > C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 600 > > Warning: array_search() [function.array-search]: Wrong datatype for > second argument in > C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 600 > > Warning: Invalid argument supplied for foreach() in > C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 603 > > Fatal error: Call to undefined method HelpPagesController::findAll() in > C:\wamp\www\WebWantAds\cake\libs\controller\scaffold.php on line 148 > == > > Doesn't scaffolding take care of all of this ? > > Syl > > > > > > --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Scaffold Error
Try this: public $name = "HelpCategories"; Sorry if the "name" thing wasn't completely clear. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---