I'm running cakePHP version 1.2.3.8166 on windows XP with Apache, PHP version 5.2.0.
I can get everything set up and running, and have worked through the "15 minute blog tutorial" on the cakePHP site. A friend recommended your book, and I have recently begun working through it. I have hit the following snag:
In the ToDo Application lesson, when I navigate to
http://localhost/todo/items/, I get the following error messages:
Notice (8): Undefined property: ItemsController::$primaryKey[CORE\cake\libs\controller\scaffold.php, line 160]
Notice (8): Undefined property: ItemsController::$displayField [CORE\cake\libs\controller\scaffold.php, line 161]
Fatal error: Call to undefined method ItemsController::schema() in C:\Program Files\xampp\htdocs\todo\cake\libs\controller\scaffold.php on line 166
And in fact that is all that shows up on the screen. If I REM out the var $scaffold; line in the items_controller.php file I just get the error message telling me the index action hasn't been defined in the controller.
I have checked and re-checked my database setup, table name (all lowercase!), made sure the id field was set as the primary key, and of course checked and re-checked my app/models/item.php and app/controllers/items_controller.php files. I should mention when i navigate to
http://localhost/todo/ i get the "happy" welcome page with CSS styles and four green bars at the top telling me everything hooks up.
Is there a clue you can give me by the error messages as to what could be going wrong here? My first thought was something wrong with the DB given the error from line 160, but like I mentioned I double-checked to make sure the primary key was set to the id field.
Any help would be greatly appreciated!