I am working on an ecommerce site using v1.2 and I am having a weird problem with anything static pages run through the pages controller.
The navigation is set up to dynamically pull the product information from the database to create all of the necessary links. I currently have the appController set like this: class AppController extends Controller { var $components = array('Session'); var $uses = array('Product'); function beforeFilter() { $subProducts = $this->Product- >findAll('Product.status='.PRODUCT_ACTIVE,null,null,2); // this is line 48 referred to in the error below $this->set('subProducts', $subProducts); } } It works for perfectly for any of the pages that are run through any of the other controllers, but the pages controller gives me this message: Fatal error: Call to a member function on a non-object in (directory_path)/app/app_controller.php on line 48 Just as an experiment I set $uses = array('Product'); in the pages controller and the dynamic navigation worked, but as expected I get the missing model error for pages. It seems like setting $uses = null; in the pages controller is overriding the $uses=array('Product'); in the app controller and causing the $this->Products fatal call to a member functionon a non- object. Does anyone have any suggestions on how to deal with this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---