UPDATE: I decided to continue with tutorial.
( http://wiki.cakephp.org/tutorials:blog_tutorial_-_1 )
The next step: add post work fine with no errors.
The next step: delete post works fine with no errors.
The next step: edit a post generates errors
Notice: Undefined variable: this in
c:\server\server\apache\htdocs\cake\cake\libs\controller\controller.php
on line 470
Notice: Undefined property: webservices in
c:\server\server\apache\htdocs\cake\cake\libs\view\view.php on line 482
Missing view
You are seeing this error because the view
c:\server\server\apache\htdocs\cake\app\views\\.thtml for action in
controller could not be found
I double checked each view, model and controller file. They are exactly
as shown in tutorial.
Thankx in advance.
[EMAIL PROTECTED] wrote:
> I successfully made it to display the lists of posts using
> app/views/posts/index.thtml
>
> Then the next step is add to the controller:
> function view($id)
> {
> $this->Post->id = $id;
> $this->set( 'data', $this->Post->read() );
> }
>
> And then add the view.thtml and then try the url
>
> http://127.0.0.1:8080/cake/posts/view/2
>
> The result is I get Notices that:
> Notice: Undefined variable: data in
> c:\server\server\apache\htdocs\cake\app\views\posts\view.thtml on line
> 1
>
> Created:
> Notice: Undefined variable: data in
> c:\server\server\apache\htdocs\cake\app\views\posts\view.thtml on line
> 3
>
> Notice: Undefined variable: data in
> c:\server\server\apache\htdocs\cake\app\views\posts\view.thtml on line
> 6
>
> So why isn't 'data' getting set for the read() but seems OK for the
> findAll() ??
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---