I am trying to set up a cakePHP blog. Following the steps at:
http://www.marcofolio.net/webdesign/building_a_blog_with_cakephp_part_1_getting_started.html
but when I get to the stage of creating ‘article.ctp’ in order to view the ‘Read More’ part of the blog. I get the following error messages:
Notice (8): Undefined index: id = 1 [CORE/Cake/Model/Model.php, line 2519]
Notice (8): Undefined index: id = 1 [CORE/Cake/Model/Model.php, line 2495]
Notice (8): Undefined variable: articles [APP/View/Blog/article.ctp, line 1]
Sadly this is hosted on my test server locally in MAMP so I can’t show you the live error I am getting. But just thought id check and see if anyone has had similar issues with this (I believe its a common beginner tutorial for learning to use cakePHP)
That’s an ancient tutorial, try out the cakephp 2.x blog tutorial from the official site:
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html
And your error is quite simple, the variable
$articlesdoes not exist in your view, so you haven’t set the variable in your controller with$this->set('articles', 'value');