cake-php@googlegroups.com
[Top] [All Lists]

Re: 15 minute Blog Tutorial? Really?

Subject: Re: 15 minute Blog Tutorial? Really?
From: Renato de Freitas Freire
Date: Sun, 10 Oct 2010 16:42:48 -0300
what is the name of your index view file?

i think u have named it index.php.ctp, but its index.ctp only...

try to check this...

--
Renato de Freitas Freire
renato@xxxxxxxxxx


On Sun, Oct 10, 2010 at 4:37 PM, Jeff <jeffriedl@xxxxxxxxx> wrote:
Not sure why, but I'm the lucky guy that gets to spend WAYYYY more
than 15 minutes on a 'simple' demo.  Admittedly I'm a noob, but one
would think that something this basic should work.

I dutifully copied and pasted the code from the tutorial examples in
to php files and uploaded them to my webserver, then I went to the url
as described in the tutorial - and Cake doesn't seem to be the least
bit interested in the blog stuff - it just wants a whole new set of
files NOT pointing at Posts, but pointing at

Missing Method in PostsController

Error: The action index.php is not defined in controller
PostsController

Error: Create PostsController::index.php() in file: app/controllers/
posts_controller.php.
<?php
class PostsController extends AppController {

       var $name = 'Posts';


       function index.php() {

       }

}
?>

Notice: If you want to customize this error message, create app/views/
errors/missing_action.ctp.

So that's all well and good - it wants the basic PostsController class
to extend AppController ... but here's the contents of my file in
exactly the right place:

<?php
class PostsController extends AppController {
   var $name = 'Posts';
   function index() {
       $this->set('posts', $this->Post->find('all'));
   }
   function view($id = null) {
             $this->Post->id = $id;
           $this->set('post', $this->Post->read());
   }
}
?>

So now what?  Anyone with help ... please?

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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For 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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
<Prev in Thread] Current Thread [Next in Thread>