Call to undefined function loadmodel() when Im logged in as admin.

I re-ran buildACL, init DB, cleared cache (server and browser) emptied ACOS,
ACOS_AROS, ran buildACL and initDB again.... Same thing. Cant figure out
what is going on here. 

- Invoices db has data in it.
- Admin routing works for the other controllers
- actions are in AROS table after running buildACL

I can not bring up anything in the invoices controller
 
invoices_controller.php
 
<?php
class InvoicesController extends AppController {
        var $name = 'Invoices';
 var $helpers = array('Html', 'Form');
    var $components = array('Email');
 
 function beforeFilter() {
          parent::beforeFilter();
          $this->Auth->autoRedirect = false;
          $this->Auth->allowedActions = array();
      }
   
     

 function admin_index() {   
  $this->Invoice->recursive = 0;
  $this->set('invoices', $this->paginate());
 }
 
  function admin_view($id = null) {
  if (!$id) {
   $this->Session->setFlash(__('Invalid Invoice.', true));
   $this->redirect(array('action'=>'index'));
  }
  $this->set('invoices', $this->Invoice->read(null, $id));
 }
 
  function admin_add(){
    $this->redirect(array('admin' => true, 'action' => 'edit')); 
 }
 
  function admin_edit($id = null) {
  if (!empty($this->data)) {
   if ($this->Invoice->save($this->data)) {

    $this->redirect(array('action'=>'index'));
   } else {
$this->redirect(array('action'=>'index'));

   }
  }
  if ($id && empty($this->data)) {
   $this->data = $this->Invoice->read(null, $id);
  }
 }
 
  function admin_delete($id = null) {
  if (!$id) {
   $this->redirect(array('action'=>'index'));
  }
  if ($this->Invoice->del($id)) {
   $this->redirect(array('action'=>'index'));
  }
 }
}
?>
 
invoice.php
 
<?php
class Invoice extends AppModel {
 
 var $name = 'Invoice';
}
?>
 
Ideas whats missing? Wrong?
 
Dave


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to