Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors
I am new to CakePHP and am following the Packt Publishing book to get used to the tool (and challenge myself following 1.2 wirtten apps on 2.1.2). It's working well however I am stuck with basic scaffold as described in the books and online documentation. I am running MySQL 5.5 on Ubuntu Linux 12.04 amd64. The SQL table in my db is defined here: CREATE TABLE `books` ( `id` int(11) DEFAULT NULL, `isbn` varchar(10) NOT NULL, `title` varchar(127) NOT NULL, `description` text NOT NULL, `author_name` varchar(127) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 In app/Model/ I have the following book.php: ?php class Book extends AppModel { var $name = 'Book'; } ? In app/Controller/BooksController.php: ?php class BooksController extends AppController { var $name = 'Books'; var $scaffold; } ? Now if I go to my test application (Available on the Internet, so you can check it out) http://15-sign.15-cloud.fr/Bakery/books it works with the Add function, but View / Edit / Delete all return errors like: *Error: *The requested address *'/Bakery/books/view'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/edit'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/delete'* was not found on this server. What is causing these errors, is this a bug in the scaffold code? Thanks in advance, Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors
You are absolutely right. So should I set the ID filed to autoincrement or would the scaffold take care of that? Ludovic On Tue, May 8, 2012 at 2:02 PM, Andras Kende and...@kende.com wrote: Check id field in the db It looks like they are empty Andras Kende 214 799 1177 and...@kende.com http://www.kende.com On May 8, 2012, at 4:07, Ludovic Ferre ludovic.fe...@gmail.com wrote: I am new to CakePHP and am following the Packt Publishing book to get used to the tool (and challenge myself following 1.2 wirtten apps on 2.1.2). It's working well however I am stuck with basic scaffold as described in the books and online documentation. I am running MySQL 5.5 on Ubuntu Linux 12.04 amd64. The SQL table in my db is defined here: CREATE TABLE `books` ( `id` int(11) DEFAULT NULL, `isbn` varchar(10) NOT NULL, `title` varchar(127) NOT NULL, `description` text NOT NULL, `author_name` varchar(127) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 In app/Model/ I have the following book.php: ?php class Book extends AppModel { var $name = 'Book'; } ? In app/Controller/BooksController.php: ?php class BooksController extends AppController { var $name = 'Books'; var $scaffold; } ? Now if I go to my test application (Available on the Internet, so you can check it out) http://15-sign.15-cloud.fr/Bakery/books it works with the Add function, but View / Edit / Delete all return errors like: *Error: *The requested address *'/Bakery/books/view'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/edit'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/delete'* was not found on this server. What is causing these errors, is this a bug in the scaffold code? Thanks in advance, Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors
Dang, of course I should. Let me correct that now :D. On Tue, May 8, 2012 at 2:11 PM, Ludovic FERRE ludovic.fe...@gmail.comwrote: You are absolutely right. So should I set the ID filed to autoincrement or would the scaffold take care of that? Ludovic On Tue, May 8, 2012 at 2:02 PM, Andras Kende and...@kende.com wrote: Check id field in the db It looks like they are empty Andras Kende 214 799 1177 and...@kende.com http://www.kende.com On May 8, 2012, at 4:07, Ludovic Ferre ludovic.fe...@gmail.com wrote: I am new to CakePHP and am following the Packt Publishing book to get used to the tool (and challenge myself following 1.2 wirtten apps on 2.1.2). It's working well however I am stuck with basic scaffold as described in the books and online documentation. I am running MySQL 5.5 on Ubuntu Linux 12.04 amd64. The SQL table in my db is defined here: CREATE TABLE `books` ( `id` int(11) DEFAULT NULL, `isbn` varchar(10) NOT NULL, `title` varchar(127) NOT NULL, `description` text NOT NULL, `author_name` varchar(127) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 In app/Model/ I have the following book.php: ?php class Book extends AppModel { var $name = 'Book'; } ? In app/Controller/BooksController.php: ?php class BooksController extends AppController { var $name = 'Books'; var $scaffold; } ? Now if I go to my test application (Available on the Internet, so you can check it out) http://15-sign.15-cloud.fr/Bakery/books it works with the Add function, but View / Edit / Delete all return errors like: *Error: *The requested address *'/Bakery/books/view'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/edit'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/delete'* was not found on this server. What is causing these errors, is this a bug in the scaffold code? Thanks in advance, Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Ludovic -- Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors
Ah ah. It's all fixed. Thanks for the quick check. I'll remember that one! On Tue, May 8, 2012 at 2:13 PM, Ludovic FERRE ludovic.fe...@gmail.comwrote: Dang, of course I should. Let me correct that now :D. On Tue, May 8, 2012 at 2:11 PM, Ludovic FERRE ludovic.fe...@gmail.comwrote: You are absolutely right. So should I set the ID filed to autoincrement or would the scaffold take care of that? Ludovic On Tue, May 8, 2012 at 2:02 PM, Andras Kende and...@kende.com wrote: Check id field in the db It looks like they are empty Andras Kende 214 799 1177 and...@kende.com http://www.kende.com On May 8, 2012, at 4:07, Ludovic Ferre ludovic.fe...@gmail.com wrote: I am new to CakePHP and am following the Packt Publishing book to get used to the tool (and challenge myself following 1.2 wirtten apps on 2.1.2). It's working well however I am stuck with basic scaffold as described in the books and online documentation. I am running MySQL 5.5 on Ubuntu Linux 12.04 amd64. The SQL table in my db is defined here: CREATE TABLE `books` ( `id` int(11) DEFAULT NULL, `isbn` varchar(10) NOT NULL, `title` varchar(127) NOT NULL, `description` text NOT NULL, `author_name` varchar(127) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 In app/Model/ I have the following book.php: ?php class Book extends AppModel { var $name = 'Book'; } ? In app/Controller/BooksController.php: ?php class BooksController extends AppController { var $name = 'Books'; var $scaffold; } ? Now if I go to my test application (Available on the Internet, so you can check it out) http://15-sign.15-cloud.fr/Bakery/books it works with the Add function, but View / Edit / Delete all return errors like: *Error: *The requested address *'/Bakery/books/view'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/edit'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/delete'* was not found on this server. What is causing these errors, is this a bug in the scaffold code? Thanks in advance, Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Ludovic -- Ludovic -- Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors
Thanks Vikram, it was a user error indeed as I forgot to set the Id as primary key not null auto_imcrement! Le 8 mai 2012 15:18, vikram sharma vikramka...@gmail.com a écrit : hi Ludovic Plese check these in your site i hope these work for you. 1. Make sure you set up your DATABASE_CONFIG is setup correctly (database.php) 2. Check that your tmp folder (and all of it’s sub folders) are writable (at least chmod 666 on Linux), 3. While you’re there delete all cache files from *all*of the tmp sub folders On Tue, May 8, 2012 at 4:37 PM, Ludovic Ferre ludovic.fe...@gmail.comwrote: I am new to CakePHP and am following the Packt Publishing book to get used to the tool (and challenge myself following 1.2 wirtten apps on 2.1.2). It's working well however I am stuck with basic scaffold as described in the books and online documentation. I am running MySQL 5.5 on Ubuntu Linux 12.04 amd64. The SQL table in my db is defined here: CREATE TABLE `books` ( `id` int(11) DEFAULT NULL, `isbn` varchar(10) NOT NULL, `title` varchar(127) NOT NULL, `description` text NOT NULL, `author_name` varchar(127) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 In app/Model/ I have the following book.php: ?php class Book extends AppModel { var $name = 'Book'; } ? In app/Controller/BooksController.php: ?php class BooksController extends AppController { var $name = 'Books'; var $scaffold; } ? Now if I go to my test application (Available on the Internet, so you can check it out) http://15-sign.15-cloud.fr/Bakery/books it works with the Add function, but View / Edit / Delete all return errors like: *Error: *The requested address *'/Bakery/books/view'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/edit'* was not found on this server. * * *Error: *The requested address *'/Bakery/books/delete'* was not found on this server. What is causing these errors, is this a bug in the scaffold code? Thanks in advance, Ludovic -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- * Thanks Regards** **Vikram Sharma | Cell +9466205050 |* *E-Mail : vikramka...@gmail.com vikramka...@gmial.com| * * My Quotes https://sites.google.com/site/vikramquotes/* * https://sites.google.com/a/daffodildb.com/rwpersonal/ ** ** http://goog_605103996 * -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php