Re: $scaffold: Display only certain fields to the user (index/view)? --psybear

2014-01-26 Thread Nishant Gupta
Hi psybear83 

I have found a very interesting post on your query. you can follow the post 
Cakephp 
specific fields in scaffolding index view 
http://www.programmersvilla.com/cakephp2/cakephp-specific-fields-in-scaffolding-index-view/
.
here you will find new customized scaffold file with new feature and 
implmentation technique.



On Thursday, December 2, 2010 5:20:13 PM UTC+5:30, psybear83 wrote:

 Hey everybody 

 I guess that's a newbie question, but I didn't find an answer yet... 
 So: is there a way to only show certain fields of a model to the user 
 when on the index or view page? 

 Thanks 
 Josh

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors

2012-05-08 Thread Andras Kende
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


Re: Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors

2012-05-08 Thread Ludovic FERRE
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

2012-05-08 Thread Ludovic FERRE
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

2012-05-08 Thread Ludovic FERRE
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

2012-05-08 Thread vikram sharma
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


Re: Scaffold with CakePHP 2.1.2 works with Add but Edit/View/Delete all cause errors

2012-05-08 Thread Ludovic FERRE
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


Re: Scaffold Multi join tables

2012-03-05 Thread Rodrigo Rodrigues Moyle
You could name whatever you want, and use a model on this table.

Em segunda-feira, 5 de março de 2012 07h49min19s UTC-3, Walter Raponi 
escreveu:

 Hi guys, 
 i finally started my first project with cake! 
 Have been reading a lot about it but now in real world have a great 
 problem! 

 I'm using cake 2.1.0 

 i have 3 tables: 
   banners 
   divs 
   sources 

 in naming convention for join tables if i have to join divs with 
 banners i would make a table called banners_divs that has this fields: 

 id int(11) not null auto_increment, 
 banner_id int(11) not null, 
 div_id int(11) not null 

 But what about a thre way join? 
 i need to join banners, divs and sources. 

 How would that be the name for this kind of table? 

 I'm using scaffold to test my db. 

 Table structure could be something like this: 

 id int(11) not null auto_increment, 
 banner_id int(11) not null 
 div_id int(11) not null, 
 source_id int(11) not null 


 Haven't found nothing about it! 


 Thankyou all for all the posts answers, they're really usefull! 
 Thankyou! 


-- 
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: Display only certain fields to the user (index/view)? --psybear

2010-12-02 Thread euromark
in this case use bake scripts and customize it then
scaffold is not supposed to be used in that way

On 2 Dez., 12:50, psybear83 psybea...@gmail.com wrote:
 Hey everybody

 I guess that's a newbie question, but I didn't find an answer yet...
 So: is there a way to only show certain fields of a model to the user
 when on the index or view page?

 Thanks
 Josh

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@googlegroups.com
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?hl=en


Re: $scaffold: Display only certain fields to the user (index/view)? --psybear

2010-12-02 Thread Joshua Muheim
Thanks, Mark! I know that it's not supposed to be used in that way,
but I have my reasons why I'm asking it.

I noticed that I can unset keys in the
Controller::viewVars['scaffoldFields'] variable to get what I want.

On Thu, Dec 2, 2010 at 3:28 PM, euromark dereurom...@googlemail.com wrote:
 in this case use bake scripts and customize it then
 scaffold is not supposed to be used in that way

 On 2 Dez., 12:50, psybear83 psybea...@gmail.com wrote:
 Hey everybody

 I guess that's a newbie question, but I didn't find an answer yet...
 So: is there a way to only show certain fields of a model to the user
 when on the index or view page?

 Thanks
 Josh

 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@googlegroups.com
 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?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@googlegroups.com
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?hl=en


Re: $scaffold: When overriding the index() method, I get view for index not found! --psybear

2010-12-01 Thread Stephen
If you want to override the scaffold actions you can see the following file:

/cake/libs/scaffold.php

I would strongly advise *against* doing this, you should never have to edit
cake's core files and it will break your app if you ever need to update, I
think the best thing to do is to use bake and if need be customise bake

See:
http://bakery.cakephp.org/articles/rascoop/2010/06/02/custom-baking-with-cakephp-1-3

$scaffold is intended to be used as scaffolding, this is why you cannot
override the actions from the controller.

Hope this helps

On 1 December 2010 12:41, psybear83 psybea...@gmail.com wrote:

 Hey everybody

 I'm developing a small application that is only used in-house of a
 small company which should be able to be extended as fast as possible
 and everything should be dynamically magically handled as far as
 possible.

 All in all the app is needed for data manipulating, so it is a typical
 CRUD application - most of it could have been implemented easily using
 Microsoft Access or something like this, I guess. But now it's a
 CakePHP app, and I have to make it more dynamical.

 So far, every controller has its own view.ctp, though they all look
 the same and have the same features. So I want to replace them using a
 scaffold view. (I know that $scaffold isn't usually the way to go, but
 in the specific application I guess it is a very useful solution.)

 So I removed the old view.ctp of my ContractsController and added
 $scaffold to the ContractsController, but then CakePHP tells me, that
 the view could not be found! When I remove the view() method, then it
 works. Is there a way to override the index() method and still having
 $scaffold work?

 Thanks a lot
 Josh

 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@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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@googlegroups.com
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?hl=en


Re: scaffold isn't working

2010-03-24 Thread boobalan
Hi,
 The models file name should be singular form of the DB.
The problem is file name, after changing the filename it works as
scaffolding



On Jan 28, 3:17 am, BrendonKoz brendon...@hotmail.com wrote:
 Okay, I just re-read that.  I don't know what he meant, but my last
 reply will probably fix the issue.

 On Jan 27, 11:27 am, BrendonKoz brendon...@hotmail.com wrote:

  I believe he meant the $name property within the controller.

  var $name = 'Author';
  ...should be...
  var $name = 'Authors';

  On Jan 26, 11:11 am, euromark dereurom...@googlemail.com wrote:

   but it is supposed to be plural
   class BooksController extends AppController {

   On 26 Jan., 16:30, andrei.b andrei.bogdan.m...@gmail.com wrote:

I found the error. The name of the controllers was at the plural
instead of singular.

On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com wrote:

 I did that. The select looks like this:
 SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`,
 `Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE
 1 = 1 LIMIT 20

 I use Cake 1.2.5 and php 5.3.1 if this is relevant.

 On Jan 26, 4:50 pm, Jeremy Burns jeremybu...@me.com wrote:

  If it isn't already there, try turning debug to 2 as this clears 
  the model cache.

  You can find the setting, which looks like this:

  Configure::write('debug', 2);

  ...in app/config/core.php

  Jeremy Burns

  On 26 Jan 2010, at 14:47, andrei.b wrote:

   Hello,
   I have 2 tables: authors(id, name, email) and books(id, title,
   author_id).
   I've created models for authors and books:

   class Author extends AppModel {
      var $name = 'Author';
      var $hasMany = 'Book';
   }

   class Book extends AppModel {
      var $name = 'Book';
      var $belongsTo = 'Author';
   }

   And the 2 controllers:

   class AuthorsController extends AppController{
      var $name = 'Authors';
      var $scaffold;
   }

   class BooksController extends AppController {
    var $name = 'Books';
    var $scaffold;
   }

   When I runhttp://localhost/relationship/books/insteadofshowingat
   author the name of the autor it shows me the id of the author.
   Can somebody help me?

   Check out the new CakePHP Questions 
   sitehttp://cakeqs.organdhelpotherswiththeirCakePHP 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@googlegroups.com
   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.com For more options, visit 
   this group 
   athttp://groups.google.com/group/cake-php?hl=en-Hidequoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -

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@googlegroups.com
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?hl=en

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


Re: scaffold isn't working

2010-01-27 Thread BrendonKoz
I believe he meant the $name property within the controller.

var $name = 'Author';
...should be...
var $name = 'Authors';

On Jan 26, 11:11 am, euromark dereurom...@googlemail.com wrote:
 but it is supposed to be plural
 class BooksController extends AppController {

 On 26 Jan., 16:30, andrei.b andrei.bogdan.m...@gmail.com wrote:



  I found the error. The name of the controllers was at the plural
  instead of singular.

  On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com wrote:

   I did that. The select looks like this:
   SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`,
   `Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE
   1 = 1 LIMIT 20

   I use Cake 1.2.5 and php 5.3.1 if this is relevant.

   On Jan 26, 4:50 pm, Jeremy Burns jeremybu...@me.com wrote:

If it isn't already there, try turning debug to 2 as this clears the 
model cache.

You can find the setting, which looks like this:

Configure::write('debug', 2);

...in app/config/core.php

Jeremy Burns

On 26 Jan 2010, at 14:47, andrei.b wrote:

 Hello,
 I have 2 tables: authors(id, name, email) and books(id, title,
 author_id).
 I've created models for authors and books:

 class Author extends AppModel {
    var $name = 'Author';
    var $hasMany = 'Book';
 }

 class Book extends AppModel {
    var $name = 'Book';
    var $belongsTo = 'Author';
 }

 And the 2 controllers:

 class AuthorsController extends AppController{
    var $name = 'Authors';
    var $scaffold;
 }

 class BooksController extends AppController {
  var $name = 'Books';
  var $scaffold;
 }

 When I runhttp://localhost/relationship/books/insteadofshowingat
 author the name of the autor it shows me the id of the author.
 Can somebody help me?

 Check out the new CakePHP Questions 
 sitehttp://cakeqs.organdhelpotherswith 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@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this 
 group athttp://groups.google.com/group/cake-php?hl=en- Hide quoted 
 text -

 - Show quoted text -

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@googlegroups.com
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?hl=en


Re: scaffold isn't working

2010-01-27 Thread BrendonKoz
Okay, I just re-read that.  I don't know what he meant, but my last
reply will probably fix the issue.

On Jan 27, 11:27 am, BrendonKoz brendon...@hotmail.com wrote:
 I believe he meant the $name property within the controller.

 var $name = 'Author';
 ...should be...
 var $name = 'Authors';

 On Jan 26, 11:11 am, euromark dereurom...@googlemail.com wrote:



  but it is supposed to be plural
  class BooksController extends AppController {

  On 26 Jan., 16:30, andrei.b andrei.bogdan.m...@gmail.com wrote:

   I found the error. The name of the controllers was at the plural
   instead of singular.

   On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com wrote:

I did that. The select looks like this:
SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`,
`Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE
1 = 1 LIMIT 20

I use Cake 1.2.5 and php 5.3.1 if this is relevant.

On Jan 26, 4:50 pm, Jeremy Burns jeremybu...@me.com wrote:

 If it isn't already there, try turning debug to 2 as this clears the 
 model cache.

 You can find the setting, which looks like this:

 Configure::write('debug', 2);

 ...in app/config/core.php

 Jeremy Burns

 On 26 Jan 2010, at 14:47, andrei.b wrote:

  Hello,
  I have 2 tables: authors(id, name, email) and books(id, title,
  author_id).
  I've created models for authors and books:

  class Author extends AppModel {
     var $name = 'Author';
     var $hasMany = 'Book';
  }

  class Book extends AppModel {
     var $name = 'Book';
     var $belongsTo = 'Author';
  }

  And the 2 controllers:

  class AuthorsController extends AppController{
     var $name = 'Authors';
     var $scaffold;
  }

  class BooksController extends AppController {
   var $name = 'Books';
   var $scaffold;
  }

  When I runhttp://localhost/relationship/books/insteadofshowingat
  author the name of the autor it shows me the id of the author.
  Can somebody help me?

  Check out the new CakePHP Questions 
  sitehttp://cakeqs.organdhelpotherswiththeir 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@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this 
  group athttp://groups.google.com/group/cake-php?hl=en-Hide quoted 
  text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -

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@googlegroups.com
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?hl=en


Re: scaffold isn't working

2010-01-26 Thread Jeremy Burns
If it isn't already there, try turning debug to 2 as this clears the model 
cache.

You can find the setting, which looks like this:

Configure::write('debug', 2);

...in app/config/core.php

Jeremy Burns

On 26 Jan 2010, at 14:47, andrei.b wrote:

 Hello,
 I have 2 tables: authors(id, name, email) and books(id, title,
 author_id).
 I've created models for authors and books:
 
 class Author extends AppModel {
var $name = 'Author';
var $hasMany = 'Book';
 }
 
 class Book extends AppModel {
var $name = 'Book';
var $belongsTo = 'Author';
 }
 
 And the 2 controllers:
 
 class AuthorsController extends AppController{
var $name = 'Authors';
var $scaffold;
 }
 
 class BooksController extends AppController {
  var $name = 'Books';
  var $scaffold;
 }
 
 When I run http://localhost/relationship/books/ instead of showing at
 author the name of the autor it shows me the id of the author.
 Can somebody help me?
 
 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@googlegroups.com
 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?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@googlegroups.com
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?hl=en


Re: scaffold isn't working

2010-01-26 Thread andrei.b
I already did that. The response is:
SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`,
`Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE
1 = 1 LIMIT 20



On Jan 26, 4:50 pm, Jeremy Burns jeremybu...@me.com wrote:
 If it isn't already there, try turning debug to 2 as this clears the model 
 cache.

 You can find the setting, which looks like this:

 Configure::write('debug', 2);

 ...in app/config/core.php

 Jeremy Burns

 On 26 Jan 2010, at 14:47, andrei.b wrote:

  Hello,
  I have 2 tables: authors(id, name, email) and books(id, title,
  author_id).
  I've created models for authors and books:

  class Author extends AppModel {
     var $name = 'Author';
     var $hasMany = 'Book';
  }

  class Book extends AppModel {
     var $name = 'Book';
     var $belongsTo = 'Author';
  }

  And the 2 controllers:

  class AuthorsController extends AppController{
     var $name = 'Authors';
     var $scaffold;
  }

  class BooksController extends AppController {
   var $name = 'Books';
   var $scaffold;
  }

  When I runhttp://localhost/relationship/books/instead of showing at
  author the name of the autor it shows me the id of the author.
  Can somebody help me?

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group 
  athttp://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@googlegroups.com
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?hl=en


Re: scaffold isn't working

2010-01-26 Thread andrei.b
I found the error. The name of the controllers was at the plural
instead of singular.

On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com wrote:
 I did that. The select looks like this:
 SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`,
 `Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE
 1 = 1 LIMIT 20

 I use Cake 1.2.5 and php 5.3.1 if this is relevant.

 On Jan 26, 4:50 pm, Jeremy Burns jeremybu...@me.com wrote:

  If it isn't already there, try turning debug to 2 as this clears the model 
  cache.

  You can find the setting, which looks like this:

  Configure::write('debug', 2);

  ...in app/config/core.php

  Jeremy Burns

  On 26 Jan 2010, at 14:47, andrei.b wrote:

   Hello,
   I have 2 tables: authors(id, name, email) and books(id, title,
   author_id).
   I've created models for authors and books:

   class Author extends AppModel {
      var $name = 'Author';
      var $hasMany = 'Book';
   }

   class Book extends AppModel {
      var $name = 'Book';
      var $belongsTo = 'Author';
   }

   And the 2 controllers:

   class AuthorsController extends AppController{
      var $name = 'Authors';
      var $scaffold;
   }

   class BooksController extends AppController {
    var $name = 'Books';
    var $scaffold;
   }

   When I runhttp://localhost/relationship/books/insteadof showing at
   author the name of the autor it shows me the id of the author.
   Can somebody help me?

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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@googlegroups.com
   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.com For more options, visit this group 
   athttp://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@googlegroups.com
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?hl=en


Re: scaffold isn't working

2010-01-26 Thread euromark
but it is supposed to be plural
class BooksController extends AppController {



On 26 Jan., 16:30, andrei.b andrei.bogdan.m...@gmail.com wrote:
 I found the error. The name of the controllers was at the plural
 instead of singular.

 On Jan 26, 4:56 pm, andrei.b andrei.bogdan.m...@gmail.com wrote:

  I did that. The select looks like this:
  SELECT `Book`.`id`, `Book`.`isbn`, `Book`.`title`,
  `Book`.`description`, `Book`.`author_id` FROM `books` AS `Book` WHERE
  1 = 1 LIMIT 20

  I use Cake 1.2.5 and php 5.3.1 if this is relevant.

  On Jan 26, 4:50 pm, Jeremy Burns jeremybu...@me.com wrote:

   If it isn't already there, try turning debug to 2 as this clears the 
   model cache.

   You can find the setting, which looks like this:

   Configure::write('debug', 2);

   ...in app/config/core.php

   Jeremy Burns

   On 26 Jan 2010, at 14:47, andrei.b wrote:

Hello,
I have 2 tables: authors(id, name, email) and books(id, title,
author_id).
I've created models for authors and books:

class Author extends AppModel {
   var $name = 'Author';
   var $hasMany = 'Book';
}

class Book extends AppModel {
   var $name = 'Book';
   var $belongsTo = 'Author';
}

And the 2 controllers:

class AuthorsController extends AppController{
   var $name = 'Authors';
   var $scaffold;
}

class BooksController extends AppController {
 var $name = 'Books';
 var $scaffold;
}

When I runhttp://localhost/relationship/books/insteadofshowing at
author the name of the autor it shows me the id of the author.
Can somebody help me?

Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
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@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this 
group athttp://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@googlegroups.com
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?hl=en


Re: Scaffold and table names

2009-11-28 Thread Kerr
@John

* When the table is named invoice_statuses, the error message reads,
Error:  Database table invoicestatuses for model Invoicestatus was
not found.

* When the table is named invoicestatuses, the error message reads,
Error:  Database table invoice_statuses for model InvoiceStatus was
not found.

So as you can see, it's a catch-22 as when I name the table one way,
it looks for the other and vice versa.

Note that I'm using ACL and hadn't added any ACOs as I didn't have
methods yet in my controller.  I also didn't have any beforefilter in
my controller to allow any actions, bypassing Auth.  The issue was
fixed when I added the following:

function beforeFilter() {
parent::beforeFilter();
$this-Auth-allowedActions = array('*');
}

This worked fine with the table named as invoicestatuses, which was
its initial name.  While I'm glad I can now use scaffolding, I'm
unclear as to why this error message appears and is related to the
above Auth fix.  The model itself is simple, and since you asked here
is that code:

class InvoiceStatus extends AppModel {
var $name = 'InvoiceStatus';
var $hasMany = array(
'Invoice'
);
var $validate = array(
'name' = array('notempty')
);
}

@Dave - This is not a HABTM scenario, rather a simple lookup table
with name and ID key pairs.

On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:
 It sounds like you are trying to create a HABTM join table, if so, I
 recommend reading the manual on how to do this through CakePHP.  There
 should be no need to actually create a model for this table, and cake will
 handle all of the relationships for you =)

 http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

 http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

 On Fri, Nov 27, 2009 at 6:40 AM, John Andersen j.andersen...@gmail.comwrote:

  Which table does CakePHP say it can't find? Is it invoices_statuses
  or invoice_statusses?
  Show the error and maybe also the model definition!
  Enjoy,
     John

  On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
   Hi folks, I'm using CakePHP for a new project, and I am having a great
   time not having to do so much CRUD work!  That said, I want to set up
   a simple $scaffold based model, and I'm having trouble reconciling a
   table to a model.  My application handles client billing for a
   business, and I have a model named Invoice, with all the convention
   based names for tables, columns, controllers, etc.  Invoices must
   carry a status, and here is where I'm having some trouble.  Here is
   the layout of the assets in question:

   Table name: invoicestatuses (OR invoice_statuses)
   Model name: InvoiceStatus
   Model file name: invoice_status.php
   Controller name: InvoiceStatusesController
   Controller file name: invoicestatuses_controller.php

   CakePHP is able to find my model and controller, but it chokes on
   locating the table.  If I use the former table name, CakePHP throws an
   error saying it can't find the latter, and vice versa.  I've tried
   hardcoding either table in my model using the $table variable, and
   even $useTable (not sure if that would generally work anyway), but
   CakePHP always comes back telling me it can't find the table for my
   model.

   What am I doing wrong here?

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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@googlegroups.com
  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
   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@googlegroups.com
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?hl=en


Re: Scaffold and table names

2009-11-28 Thread John Andersen
Try specifying the tables name using:

   var $useTable = 'your tablename';

Enjoy,
   John

On Nov 28, 3:26 pm, Kerr hayl...@gmail.com wrote:
 @John

 * When the table is named invoice_statuses, the error message reads,
 Error:  Database table invoicestatuses for model Invoicestatus was
 not found.

 * When the table is named invoicestatuses, the error message reads,
 Error:  Database table invoice_statuses for model InvoiceStatus was
 not found.

 So as you can see, it's a catch-22 as when I name the table one way,
 it looks for the other and vice versa.

 Note that I'm using ACL and hadn't added any ACOs as I didn't have
 methods yet in my controller.  I also didn't have any beforefilter in
 my controller to allow any actions, bypassing Auth.  The issue was
 fixed when I added the following:

 function beforeFilter() {
     parent::beforeFilter();
         $this-Auth-allowedActions = array('*');

 }

 This worked fine with the table named as invoicestatuses, which was
 its initial name.  While I'm glad I can now use scaffolding, I'm
 unclear as to why this error message appears and is related to the
 above Auth fix.  The model itself is simple, and since you asked here
 is that code:

 class InvoiceStatus extends AppModel {
         var $name = 'InvoiceStatus';
         var $hasMany = array(
                 'Invoice'
         );
         var $validate = array(
                 'name' = array('notempty')
         );

 }

 @Dave - This is not a HABTM scenario, rather a simple lookup table
 with name and ID key pairs.

 On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:

  It sounds like you are trying to create a HABTM join table, if so, I
  recommend reading the manual on how to do this through CakePHP.  There
  should be no need to actually create a model for this table, and cake will
  handle all of the relationships for you =)

 http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

  http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

  On Fri, Nov 27, 2009 at 6:40 AM, John Andersen 
  j.andersen...@gmail.comwrote:

   Which table does CakePHP say it can't find? Is it invoices_statuses
   or invoice_statusses?
   Show the error and maybe also the model definition!
   Enjoy,
      John

   On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
Hi folks, I'm using CakePHP for a new project, and I am having a great
time not having to do so much CRUD work!  That said, I want to set up
a simple $scaffold based model, and I'm having trouble reconciling a
table to a model.  My application handles client billing for a
business, and I have a model named Invoice, with all the convention
based names for tables, columns, controllers, etc.  Invoices must
carry a status, and here is where I'm having some trouble.  Here is
the layout of the assets in question:

Table name: invoicestatuses (OR invoice_statuses)
Model name: InvoiceStatus
Model file name: invoice_status.php
Controller name: InvoiceStatusesController
Controller file name: invoicestatuses_controller.php

CakePHP is able to find my model and controller, but it chokes on
locating the table.  If I use the former table name, CakePHP throws an
error saying it can't find the latter, and vice versa.  I've tried
hardcoding either table in my model using the $table variable, and
even $useTable (not sure if that would generally work anyway), but
CakePHP always comes back telling me it can't find the table for my
model.

What am I doing wrong here?

   Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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@googlegroups.com
   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
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@googlegroups.com
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?hl=en


Re: Scaffold and table names

2009-11-28 Thread Dave
its actually var $uses = array('TABLENAME');

On Sat, Nov 28, 2009 at 9:53 AM, John Andersen j.andersen...@gmail.comwrote:

 Try specifying the tables name using:

   var $useTable = 'your tablename';

 Enjoy,
   John

 On Nov 28, 3:26 pm, Kerr hayl...@gmail.com wrote:
  @John
 
  * When the table is named invoice_statuses, the error message reads,
  Error:  Database table invoicestatuses for model Invoicestatus was
  not found.
 
  * When the table is named invoicestatuses, the error message reads,
  Error:  Database table invoice_statuses for model InvoiceStatus was
  not found.
 
  So as you can see, it's a catch-22 as when I name the table one way,
  it looks for the other and vice versa.
 
  Note that I'm using ACL and hadn't added any ACOs as I didn't have
  methods yet in my controller.  I also didn't have any beforefilter in
  my controller to allow any actions, bypassing Auth.  The issue was
  fixed when I added the following:
 
  function beforeFilter() {
  parent::beforeFilter();
  $this-Auth-allowedActions = array('*');
 
  }
 
  This worked fine with the table named as invoicestatuses, which was
  its initial name.  While I'm glad I can now use scaffolding, I'm
  unclear as to why this error message appears and is related to the
  above Auth fix.  The model itself is simple, and since you asked here
  is that code:
 
  class InvoiceStatus extends AppModel {
  var $name = 'InvoiceStatus';
  var $hasMany = array(
  'Invoice'
  );
  var $validate = array(
  'name' = array('notempty')
  );
 
  }
 
  @Dave - This is not a HABTM scenario, rather a simple lookup table
  with name and ID key pairs.
 
  On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:
 
   It sounds like you are trying to create a HABTM join table, if so, I
   recommend reading the manual on how to do this through CakePHP.  There
   should be no need to actually create a model for this table, and cake
 will
   handle all of the relationships for you =)
 
  http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
 
   http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
 
   On Fri, Nov 27, 2009 at 6:40 AM, John Andersen 
 j.andersen...@gmail.comwrote:
 
Which table does CakePHP say it can't find? Is it invoices_statuses
or invoice_statusses?
Show the error and maybe also the model definition!
Enjoy,
   John
 
On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
 Hi folks, I'm using CakePHP for a new project, and I am having a
 great
 time not having to do so much CRUD work!  That said, I want to set
 up
 a simple $scaffold based model, and I'm having trouble reconciling
 a
 table to a model.  My application handles client billing for a
 business, and I have a model named Invoice, with all the convention
 based names for tables, columns, controllers, etc.  Invoices must
 carry a status, and here is where I'm having some trouble.  Here is
 the layout of the assets in question:
 
 Table name: invoicestatuses (OR invoice_statuses)
 Model name: InvoiceStatus
 Model file name: invoice_status.php
 Controller name: InvoiceStatusesController
 Controller file name: invoicestatuses_controller.php
 
 CakePHP is able to find my model and controller, but it chokes on
 locating the table.  If I use the former table name, CakePHP throws
 an
 error saying it can't find the latter, and vice versa.  I've tried
 hardcoding either table in my model using the $table variable, and
 even $useTable (not sure if that would generally work anyway), but
 CakePHP always comes back telling me it can't find the table for my
 model.
 
 What am I doing wrong here?
 
Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
 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@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com
 cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.comFor
 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@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  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 

Re: Scaffold and table names

2009-11-28 Thread Kerr
I noted in my initial post that I'd tried $useTable to no avail,
though I did not

I don't see in the API where $uses is a valid option in this scenario,
however I do see $useTable.

http://api.cakephp.org/class/model

Looking at the source of /cake/libs/model.php, I see that $useTable is
declared as a string on line 55 (using 1.2.5), and so I'd believe that
John's recomendation, which is what I tried to begin with, would work
fine.  Regardless, it does not.  I'm able to use scaffolding with the
table named as invoicestatuses, though Cake seems to ignore if I try
to force the table name to invoice_statuses like so:

var $useTable = 'invoice_statuses';

..

On Nov 28, 11:13 am, Dave davidcr...@gmail.com wrote:
 its actually var $uses = array('TABLENAME');

 On Sat, Nov 28, 2009 at 9:53 AM, John Andersen j.andersen...@gmail.comwrote:

  Try specifying the tables name using:

    var $useTable = 'your tablename';

  Enjoy,
    John

  On Nov 28, 3:26 pm, Kerr hayl...@gmail.com wrote:
   @John

   * When the table is named invoice_statuses, the error message reads,
   Error:  Database table invoicestatuses for model Invoicestatus was
   not found.

   * When the table is named invoicestatuses, the error message reads,
   Error:  Database table invoice_statuses for model InvoiceStatus was
   not found.

   So as you can see, it's a catch-22 as when I name the table one way,
   it looks for the other and vice versa.

   Note that I'm using ACL and hadn't added any ACOs as I didn't have
   methods yet in my controller.  I also didn't have any beforefilter in
   my controller to allow any actions, bypassing Auth.  The issue was
   fixed when I added the following:

   function beforeFilter() {
       parent::beforeFilter();
           $this-Auth-allowedActions = array('*');

   }

   This worked fine with the table named as invoicestatuses, which was
   its initial name.  While I'm glad I can now use scaffolding, I'm
   unclear as to why this error message appears and is related to the
   above Auth fix.  The model itself is simple, and since you asked here
   is that code:

   class InvoiceStatus extends AppModel {
           var $name = 'InvoiceStatus';
           var $hasMany = array(
                   'Invoice'
           );
           var $validate = array(
                   'name' = array('notempty')
           );

   }

   @Dave - This is not a HABTM scenario, rather a simple lookup table
   with name and ID key pairs.

   On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:

It sounds like you are trying to create a HABTM join table, if so, I
recommend reading the manual on how to do this through CakePHP.  There
should be no need to actually create a model for this table, and cake
  will
handle all of the relationships for you =)

   http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

On Fri, Nov 27, 2009 at 6:40 AM, John Andersen 
  j.andersen...@gmail.comwrote:

 Which table does CakePHP say it can't find? Is it invoices_statuses
 or invoice_statusses?
 Show the error and maybe also the model definition!
 Enjoy,
    John

 On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
  Hi folks, I'm using CakePHP for a new project, and I am having a
  great
  time not having to do so much CRUD work!  That said, I want to set
  up
  a simple $scaffold based model, and I'm having trouble reconciling
  a
  table to a model.  My application handles client billing for a
  business, and I have a model named Invoice, with all the convention
  based names for tables, columns, controllers, etc.  Invoices must
  carry a status, and here is where I'm having some trouble.  Here is
  the layout of the assets in question:

  Table name: invoicestatuses (OR invoice_statuses)
  Model name: InvoiceStatus
  Model file name: invoice_status.php
  Controller name: InvoiceStatusesController
  Controller file name: invoicestatuses_controller.php

  CakePHP is able to find my model and controller, but it chokes on
  locating the table.  If I use the former table name, CakePHP throws
  an
  error saying it can't find the latter, and vice versa.  I've tried
  hardcoding either table in my model using the $table variable, and
  even $useTable (not sure if that would generally work anyway), but
  CakePHP always comes back telling me it can't find the table for my
  model.

  What am I doing wrong here?

 Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
  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@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com
  

Re: Scaffold and table names

2009-11-28 Thread Kerr
Sorry guys, please ignore, though I did not, in the first sentence
of my latest reply.  :)

On Nov 28, 11:49 am, Kerr hayl...@gmail.com wrote:
 I noted in my initial post that I'd tried $useTable to no avail,
 though I did not

 I don't see in the API where $uses is a valid option in this scenario,
 however I do see $useTable.

 http://api.cakephp.org/class/model

 Looking at the source of /cake/libs/model.php, I see that $useTable is
 declared as a string on line 55 (using 1.2.5), and so I'd believe that
 John's recomendation, which is what I tried to begin with, would work
 fine.  Regardless, it does not.  I'm able to use scaffolding with the
 table named as invoicestatuses, though Cake seems to ignore if I try
 to force the table name to invoice_statuses like so:

 var $useTable = 'invoice_statuses';

 ..

 On Nov 28, 11:13 am, Dave davidcr...@gmail.com wrote:

  its actually var $uses = array('TABLENAME');

  On Sat, Nov 28, 2009 at 9:53 AM, John Andersen 
  j.andersen...@gmail.comwrote:

   Try specifying the tables name using:

     var $useTable = 'your tablename';

   Enjoy,
     John

   On Nov 28, 3:26 pm, Kerr hayl...@gmail.com wrote:
@John

* When the table is named invoice_statuses, the error message reads,
Error:  Database table invoicestatuses for model Invoicestatus was
not found.

* When the table is named invoicestatuses, the error message reads,
Error:  Database table invoice_statuses for model InvoiceStatus was
not found.

So as you can see, it's a catch-22 as when I name the table one way,
it looks for the other and vice versa.

Note that I'm using ACL and hadn't added any ACOs as I didn't have
methods yet in my controller.  I also didn't have any beforefilter in
my controller to allow any actions, bypassing Auth.  The issue was
fixed when I added the following:

function beforeFilter() {
    parent::beforeFilter();
        $this-Auth-allowedActions = array('*');

}

This worked fine with the table named as invoicestatuses, which was
its initial name.  While I'm glad I can now use scaffolding, I'm
unclear as to why this error message appears and is related to the
above Auth fix.  The model itself is simple, and since you asked here
is that code:

class InvoiceStatus extends AppModel {
        var $name = 'InvoiceStatus';
        var $hasMany = array(
                'Invoice'
        );
        var $validate = array(
                'name' = array('notempty')
        );

}

@Dave - This is not a HABTM scenario, rather a simple lookup table
with name and ID key pairs.

On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:

 It sounds like you are trying to create a HABTM join table, if so, I
 recommend reading the manual on how to do this through CakePHP.  There
 should be no need to actually create a model for this table, and cake
   will
 handle all of the relationships for you =)

http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

 http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

 On Fri, Nov 27, 2009 at 6:40 AM, John Andersen 
   j.andersen...@gmail.comwrote:

  Which table does CakePHP say it can't find? Is it 
  invoices_statuses
  or invoice_statusses?
  Show the error and maybe also the model definition!
  Enjoy,
     John

  On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
   Hi folks, I'm using CakePHP for a new project, and I am having a
   great
   time not having to do so much CRUD work!  That said, I want to set
   up
   a simple $scaffold based model, and I'm having trouble reconciling
   a
   table to a model.  My application handles client billing for a
   business, and I have a model named Invoice, with all the 
   convention
   based names for tables, columns, controllers, etc.  Invoices must
   carry a status, and here is where I'm having some trouble.  Here 
   is
   the layout of the assets in question:

   Table name: invoicestatuses (OR invoice_statuses)
   Model name: InvoiceStatus
   Model file name: invoice_status.php
   Controller name: InvoiceStatusesController
   Controller file name: invoicestatuses_controller.php

   CakePHP is able to find my model and controller, but it chokes on
   locating the table.  If I use the former table name, CakePHP 
   throws
   an
   error saying it can't find the latter, and vice versa.  I've tried
   hardcoding either table in my model using the $table variable, and
   even $useTable (not sure if that would generally work anyway), but
   CakePHP always comes back telling me it can't find the table for 
   my
   model.

   What am I doing wrong here?

  Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
   others
  with their CakePHP related questions.

  You received this message because you 

Re: Scaffold and table names

2009-11-28 Thread Dave
I apologize my mistake.  var $uses = array('MODELNAME'); is for the
controller.

On Sat, Nov 28, 2009 at 12:50 PM, Kerr hayl...@gmail.com wrote:

 Sorry guys, please ignore, though I did not, in the first sentence
 of my latest reply.  :)

 On Nov 28, 11:49 am, Kerr hayl...@gmail.com wrote:
  I noted in my initial post that I'd tried $useTable to no avail,
  though I did not
 
  I don't see in the API where $uses is a valid option in this scenario,
  however I do see $useTable.
 
  http://api.cakephp.org/class/model
 
  Looking at the source of /cake/libs/model.php, I see that $useTable is
  declared as a string on line 55 (using 1.2.5), and so I'd believe that
  John's recomendation, which is what I tried to begin with, would work
  fine.  Regardless, it does not.  I'm able to use scaffolding with the
  table named as invoicestatuses, though Cake seems to ignore if I try
  to force the table name to invoice_statuses like so:
 
  var $useTable = 'invoice_statuses';
 
  ..
 
  On Nov 28, 11:13 am, Dave davidcr...@gmail.com wrote:
 
   its actually var $uses = array('TABLENAME');
 
   On Sat, Nov 28, 2009 at 9:53 AM, John Andersen 
 j.andersen...@gmail.comwrote:
 
Try specifying the tables name using:
 
  var $useTable = 'your tablename';
 
Enjoy,
  John
 
On Nov 28, 3:26 pm, Kerr hayl...@gmail.com wrote:
 @John
 
 * When the table is named invoice_statuses, the error message
 reads,
 Error:  Database table invoicestatuses for model Invoicestatus was
 not found.
 
 * When the table is named invoicestatuses, the error message reads,
 Error:  Database table invoice_statuses for model InvoiceStatus
 was
 not found.
 
 So as you can see, it's a catch-22 as when I name the table one
 way,
 it looks for the other and vice versa.
 
 Note that I'm using ACL and hadn't added any ACOs as I didn't have
 methods yet in my controller.  I also didn't have any beforefilter
 in
 my controller to allow any actions, bypassing Auth.  The issue was
 fixed when I added the following:
 
 function beforeFilter() {
 parent::beforeFilter();
 $this-Auth-allowedActions = array('*');
 
 }
 
 This worked fine with the table named as invoicestatuses, which
 was
 its initial name.  While I'm glad I can now use scaffolding, I'm
 unclear as to why this error message appears and is related to the
 above Auth fix.  The model itself is simple, and since you asked
 here
 is that code:
 
 class InvoiceStatus extends AppModel {
 var $name = 'InvoiceStatus';
 var $hasMany = array(
 'Invoice'
 );
 var $validate = array(
 'name' = array('notempty')
 );
 
 }
 
 @Dave - This is not a HABTM scenario, rather a simple lookup table
 with name and ID key pairs.
 
 On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:
 
  It sounds like you are trying to create a HABTM join table, if
 so, I
  recommend reading the manual on how to do this through CakePHP.
  There
  should be no need to actually create a model for this table, and
 cake
will
  handle all of the relationships for you =)
 
 http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
 
  http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
 
  On Fri, Nov 27, 2009 at 6:40 AM, John Andersen 
j.andersen...@gmail.comwrote:
 
   Which table does CakePHP say it can't find? Is it
 invoices_statuses
   or invoice_statusses?
   Show the error and maybe also the model definition!
   Enjoy,
  John
 
   On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
Hi folks, I'm using CakePHP for a new project, and I am
 having a
great
time not having to do so much CRUD work!  That said, I want
 to set
up
a simple $scaffold based model, and I'm having trouble
 reconciling
a
table to a model.  My application handles client billing for
 a
business, and I have a model named Invoice, with all the
 convention
based names for tables, columns, controllers, etc.  Invoices
 must
carry a status, and here is where I'm having some trouble.
  Here is
the layout of the assets in question:
 
Table name: invoicestatuses (OR invoice_statuses)
Model name: InvoiceStatus
Model file name: invoice_status.php
Controller name: InvoiceStatusesController
Controller file name: invoicestatuses_controller.php
 
CakePHP is able to find my model and controller, but it
 chokes on
locating the table.  If I use the former table name, CakePHP
 throws
an
error saying it can't find the latter, and vice versa.  I've
 tried
hardcoding either table in my model using the $table
 variable, and
even $useTable (not sure if that would generally work
 anyway), but
CakePHP always comes back telling 

Re: Scaffold and table names

2009-11-28 Thread John Andersen
Can you confirm that CakePHP is finding and using your model and not
just using AppModel ?
Try to make a specific function in your model and call it from the
controller, to confirm that your model is being used!
Enjoy,
   John

On Nov 28, 7:50 pm, Kerr hayl...@gmail.com wrote:
 Sorry guys, please ignore, though I did not, in the first sentence
 of my latest reply.  :)

 On Nov 28, 11:49 am, Kerr hayl...@gmail.com wrote:

  I noted in my initial post that I'd tried $useTable to no avail,
  though I did not

  I don't see in the API where $uses is a valid option in this scenario,
  however I do see $useTable.

 http://api.cakephp.org/class/model

  Looking at the source of /cake/libs/model.php, I see that $useTable is
  declared as a string on line 55 (using 1.2.5), and so I'd believe that
  John's recomendation, which is what I tried to begin with, would work
  fine.  Regardless, it does not.  I'm able to use scaffolding with the
  table named as invoicestatuses, though Cake seems to ignore if I try
  to force the table name to invoice_statuses like so:

  var $useTable = 'invoice_statuses';

  ..

  On Nov 28, 11:13 am, Dave davidcr...@gmail.com wrote:

   its actually var $uses = array('TABLENAME');

   On Sat, Nov 28, 2009 at 9:53 AM, John Andersen 
   j.andersen...@gmail.comwrote:

Try specifying the tables name using:

  var $useTable = 'your tablename';

Enjoy,
  John

On Nov 28, 3:26 pm, Kerr hayl...@gmail.com wrote:
 @John

 * When the table is named invoice_statuses, the error message reads,
 Error:  Database table invoicestatuses for model Invoicestatus was
 not found.

 * When the table is named invoicestatuses, the error message reads,
 Error:  Database table invoice_statuses for model InvoiceStatus was
 not found.

 So as you can see, it's a catch-22 as when I name the table one way,
 it looks for the other and vice versa.

 Note that I'm using ACL and hadn't added any ACOs as I didn't have
 methods yet in my controller.  I also didn't have any beforefilter in
 my controller to allow any actions, bypassing Auth.  The issue was
 fixed when I added the following:

 function beforeFilter() {
     parent::beforeFilter();
         $this-Auth-allowedActions = array('*');

 }

 This worked fine with the table named as invoicestatuses, which was
 its initial name.  While I'm glad I can now use scaffolding, I'm
 unclear as to why this error message appears and is related to the
 above Auth fix.  The model itself is simple, and since you asked here
 is that code:

 class InvoiceStatus extends AppModel {
         var $name = 'InvoiceStatus';
         var $hasMany = array(
                 'Invoice'
         );
         var $validate = array(
                 'name' = array('notempty')
         );

 }

 @Dave - This is not a HABTM scenario, rather a simple lookup table
 with name and ID key pairs.

 On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:

  It sounds like you are trying to create a HABTM join table, if so, I
  recommend reading the manual on how to do this through CakePHP.  
  There
  should be no need to actually create a model for this table, and 
  cake
will
  handle all of the relationships for you =)

 http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

  http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

  On Fri, Nov 27, 2009 at 6:40 AM, John Andersen 
j.andersen...@gmail.comwrote:

   Which table does CakePHP say it can't find? Is it 
   invoices_statuses
   or invoice_statusses?
   Show the error and maybe also the model definition!
   Enjoy,
      John

   On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
Hi folks, I'm using CakePHP for a new project, and I am having a
great
time not having to do so much CRUD work!  That said, I want to 
set
up
a simple $scaffold based model, and I'm having trouble 
reconciling
a
table to a model.  My application handles client billing for a
business, and I have a model named Invoice, with all the 
convention
based names for tables, columns, controllers, etc.  Invoices 
must
carry a status, and here is where I'm having some trouble.  
Here is
the layout of the assets in question:

Table name: invoicestatuses (OR invoice_statuses)
Model name: InvoiceStatus
Model file name: invoice_status.php
Controller name: InvoiceStatusesController
Controller file name: invoicestatuses_controller.php

CakePHP is able to find my model and controller, but it chokes 
on
locating the table.  If I use the former table name, CakePHP 
throws
an
error saying it can't find the latter, and vice versa.  I've 
tried

Re: Scaffold and table names

2009-11-28 Thread Kerr
Yes, my model is being found.  I set up a method named test both in
the model and controller, and it's being picked up.

On Nov 28, 12:41 pm, John Andersen j.andersen...@gmail.com wrote:
 Can you confirm that CakePHP is finding and using your model and not
 just using AppModel ?
 Try to make a specific function in your model and call it from the
 controller, to confirm that your model is being used!
 Enjoy,
    John

 On Nov 28, 7:50 pm, Kerr hayl...@gmail.com wrote:

  Sorry guys, please ignore, though I did not, in the first sentence
  of my latest reply.  :)

  On Nov 28, 11:49 am, Kerr hayl...@gmail.com wrote:

   I noted in my initial post that I'd tried $useTable to no avail,
   though I did not

   I don't see in the API where $uses is a valid option in this scenario,
   however I do see $useTable.

  http://api.cakephp.org/class/model

   Looking at the source of /cake/libs/model.php, I see that $useTable is
   declared as a string on line 55 (using 1.2.5), and so I'd believe that
   John's recomendation, which is what I tried to begin with, would work
   fine.  Regardless, it does not.  I'm able to use scaffolding with the
   table named as invoicestatuses, though Cake seems to ignore if I try
   to force the table name to invoice_statuses like so:

   var $useTable = 'invoice_statuses';

   ..

   On Nov 28, 11:13 am, Dave davidcr...@gmail.com wrote:

its actually var $uses = array('TABLENAME');

On Sat, Nov 28, 2009 at 9:53 AM, John Andersen 
j.andersen...@gmail.comwrote:

 Try specifying the tables name using:

   var $useTable = 'your tablename';

 Enjoy,
   John

 On Nov 28, 3:26 pm, Kerr hayl...@gmail.com wrote:
  @John

  * When the table is named invoice_statuses, the error message reads,
  Error:  Database table invoicestatuses for model Invoicestatus was
  not found.

  * When the table is named invoicestatuses, the error message reads,
  Error:  Database table invoice_statuses for model InvoiceStatus was
  not found.

  So as you can see, it's a catch-22 as when I name the table one way,
  it looks for the other and vice versa.

  Note that I'm using ACL and hadn't added any ACOs as I didn't have
  methods yet in my controller.  I also didn't have any beforefilter 
  in
  my controller to allow any actions, bypassing Auth.  The issue was
  fixed when I added the following:

  function beforeFilter() {
      parent::beforeFilter();
          $this-Auth-allowedActions = array('*');

  }

  This worked fine with the table named as invoicestatuses, which 
  was
  its initial name.  While I'm glad I can now use scaffolding, I'm
  unclear as to why this error message appears and is related to the
  above Auth fix.  The model itself is simple, and since you asked 
  here
  is that code:

  class InvoiceStatus extends AppModel {
          var $name = 'InvoiceStatus';
          var $hasMany = array(
                  'Invoice'
          );
          var $validate = array(
                  'name' = array('notempty')
          );

  }

  @Dave - This is not a HABTM scenario, rather a simple lookup table
  with name and ID key pairs.

  On Nov 27, 5:04 pm, Dave davidcr...@gmail.com wrote:

   It sounds like you are trying to create a HABTM join table, if 
   so, I
   recommend reading the manual on how to do this through CakePHP.  
   There
   should be no need to actually create a model for this table, and 
   cake
 will
   handle all of the relationships for you =)

  http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

   http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

   On Fri, Nov 27, 2009 at 6:40 AM, John Andersen 
 j.andersen...@gmail.comwrote:

Which table does CakePHP say it can't find? Is it 
invoices_statuses
or invoice_statusses?
Show the error and maybe also the model definition!
Enjoy,
   John

On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
 Hi folks, I'm using CakePHP for a new project, and I am 
 having a
 great
 time not having to do so much CRUD work!  That said, I want 
 to set
 up
 a simple $scaffold based model, and I'm having trouble 
 reconciling
 a
 table to a model.  My application handles client billing for a
 business, and I have a model named Invoice, with all the 
 convention
 based names for tables, columns, controllers, etc.  Invoices 
 must
 carry a status, and here is where I'm having some trouble.  
 Here is
 the layout of the assets in question:

 Table name: invoicestatuses (OR invoice_statuses)
 Model name: InvoiceStatus
 Model file name: invoice_status.php
 Controller name: InvoiceStatusesController

Re: Scaffold and table names

2009-11-27 Thread John Andersen
Which table does CakePHP say it can't find? Is it invoices_statuses
or invoice_statusses?
Show the error and maybe also the model definition!
Enjoy,
   John


On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
 Hi folks, I'm using CakePHP for a new project, and I am having a great
 time not having to do so much CRUD work!  That said, I want to set up
 a simple $scaffold based model, and I'm having trouble reconciling a
 table to a model.  My application handles client billing for a
 business, and I have a model named Invoice, with all the convention
 based names for tables, columns, controllers, etc.  Invoices must
 carry a status, and here is where I'm having some trouble.  Here is
 the layout of the assets in question:

 Table name: invoicestatuses (OR invoice_statuses)
 Model name: InvoiceStatus
 Model file name: invoice_status.php
 Controller name: InvoiceStatusesController
 Controller file name: invoicestatuses_controller.php

 CakePHP is able to find my model and controller, but it chokes on
 locating the table.  If I use the former table name, CakePHP throws an
 error saying it can't find the latter, and vice versa.  I've tried
 hardcoding either table in my model using the $table variable, and
 even $useTable (not sure if that would generally work anyway), but
 CakePHP always comes back telling me it can't find the table for my
 model.

 What am I doing wrong here?

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@googlegroups.com
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?hl=en


Re: Scaffold and table names

2009-11-27 Thread Dave
It sounds like you are trying to create a HABTM join table, if so, I
recommend reading the manual on how to do this through CakePHP.  There
should be no need to actually create a model for this table, and cake will
handle all of the relationships for you =)

http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM

On Fri, Nov 27, 2009 at 6:40 AM, John Andersen j.andersen...@gmail.comwrote:

 Which table does CakePHP say it can't find? Is it invoices_statuses
 or invoice_statusses?
 Show the error and maybe also the model definition!
 Enjoy,
John


 On Nov 25, 3:12 pm, Kerr hayl...@gmail.com wrote:
  Hi folks, I'm using CakePHP for a new project, and I am having a great
  time not having to do so much CRUD work!  That said, I want to set up
  a simple $scaffold based model, and I'm having trouble reconciling a
  table to a model.  My application handles client billing for a
  business, and I have a model named Invoice, with all the convention
  based names for tables, columns, controllers, etc.  Invoices must
  carry a status, and here is where I'm having some trouble.  Here is
  the layout of the assets in question:
 
  Table name: invoicestatuses (OR invoice_statuses)
  Model name: InvoiceStatus
  Model file name: invoice_status.php
  Controller name: InvoiceStatusesController
  Controller file name: invoicestatuses_controller.php
 
  CakePHP is able to find my model and controller, but it chokes on
  locating the table.  If I use the former table name, CakePHP throws an
  error saying it can't find the latter, and vice versa.  I've tried
  hardcoding either table in my model using the $table variable, and
  even $useTable (not sure if that would generally work anyway), but
  CakePHP always comes back telling me it can't find the table for my
  model.
 
  What am I doing wrong here?

 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@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  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@googlegroups.com
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?hl=en


Re: scaffold

2009-03-23 Thread Alejandro Weintz Aguilar

Thank you guys, moving forward to Bake


On Sat, 2009-03-21 at 06:43 -0700, BrianRehg wrote:
 You can manually override the scaffolding by creating your own custom
 actions(update, delete etc) within the controller. You can bake these
 actions or you manually add them yourself. You will also be required
 to bake or manually create the views ,if you are overriding the
 dynamic scaffolding. I would never use dynamic scaffolding in a
 production environment. I don't use it in a dev environment - I bake
 everything.
 
 On Mar 21, 5:46 am, Johnny joh...@codynamic.com wrote:
  Scaffold is not supposed to be used in production environments.
  Use bake instead to physically create the model,view and controller
  files and edit those according to your needs.
 
  On Mar 20, 5:54 pm, Alejandro Weintz Aguilar
 
  alejan...@pixelestudios.com wrote:
   Hello, I am build a large proyect catalogs of product, like the scaffold
   feautures of Cake but need on UPDATE action to update a
   delete(varchar(1) field on the database not to delete the record. Also
   when it querys the record list to show all the record but the one with
   the delete field set to 1.
 
   The question is can I redefine scaffold functions?
 
   ty.
   --
   
   PixelEstudios.com
   Alejandro Weintz Aguilar.
   Tel: (506)25920328
   alejan...@pixelestudios.com
  
-- 

PixelEstudios.com
Alejandro Weintz Aguilar.
Tel: (506)25920328
alejan...@pixelestudios.com


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: scaffold

2009-03-21 Thread Johnny

Scaffold is not supposed to be used in production environments.
Use bake instead to physically create the model,view and controller
files and edit those according to your needs.

On Mar 20, 5:54 pm, Alejandro Weintz Aguilar
alejan...@pixelestudios.com wrote:
 Hello, I am build a large proyect catalogs of product, like the scaffold
 feautures of Cake but need on UPDATE action to update a
 delete(varchar(1) field on the database not to delete the record. Also
 when it querys the record list to show all the record but the one with
 the delete field set to 1.

 The question is can I redefine scaffold functions?

 ty.
 --
 
 PixelEstudios.com
 Alejandro Weintz Aguilar.
 Tel: (506)25920328
 alejan...@pixelestudios.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: scaffold

2009-03-21 Thread BrianRehg

You can manually override the scaffolding by creating your own custom
actions(update, delete etc) within the controller. You can bake these
actions or you manually add them yourself. You will also be required
to bake or manually create the views ,if you are overriding the
dynamic scaffolding. I would never use dynamic scaffolding in a
production environment. I don't use it in a dev environment - I bake
everything.

On Mar 21, 5:46 am, Johnny joh...@codynamic.com wrote:
 Scaffold is not supposed to be used in production environments.
 Use bake instead to physically create the model,view and controller
 files and edit those according to your needs.

 On Mar 20, 5:54 pm, Alejandro Weintz Aguilar

 alejan...@pixelestudios.com wrote:
  Hello, I am build a large proyect catalogs of product, like the scaffold
  feautures of Cake but need on UPDATE action to update a
  delete(varchar(1) field on the database not to delete the record. Also
  when it querys the record list to show all the record but the one with
  the delete field set to 1.

  The question is can I redefine scaffold functions?

  ty.
  --
  
  PixelEstudios.com
  Alejandro Weintz Aguilar.
  Tel: (506)25920328
  alejan...@pixelestudios.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold in RC3

2008-10-07 Thread Chen

sorry, I found that I used the old version dispather.php. And now is
OK

On Oct 7, 8:40 pm, Chen [EMAIL PROTECTED] wrote:
 Hello there,
   Recently I upgrade my cake lib to 1.2rc3, then I can visit the
 pages which don't exist exactly but inscaffoldname array like
 'index', 'edit' and so on.
   For example in 1.2 rc2, if you 
 visithttp://mysite.com/users/orhttp://mysite.com/users/index, you will get an 
 error message with 404
 not found. But inrc3, you can see the page which generate byscaffold.
   Does anyone has met the same with me?
   Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold

2008-09-03 Thread fabio . sfuncia

Scaffold is wonderfuland cake is very flexible (gymnast :D) framework ;)

I suggest to exclude field with beforeRender (controller) + array_diff:

//example to exclude created  modified

function beforeRender(){
if ($this-action=='index'){

$this-viewVars['scaffoldFields']=array_diff($this-viewVars['scaffoldFields'],array('created','modified'));
}
return true;
}

//if you want custom scaffold views
1- copy default scaffold views: index, view,edit  from
cake/libs/view/scaffolds/  to your app/views/pluralName/
2- rename index=scaffold.index,view=scaffold.view,edit=scaffold.edit
3- edit scaffold views as you prefer.



/fiblan


On Tue, Sep 2, 2008 at 4:22 PM, hydra12 [EMAIL PROTECTED] wrote:

 The easiest way to do this is to bake your application and have bake
 create the default views for you.  Then you can go in and edit those
 views any way you want.  Otherwise, scaffolding is pretty much non-
 editable.  I think you can edit the scaffold templates, but I don't
 know how to do that.

 On Sep 2, 4:02 am, Ranjana Sriavastava [EMAIL PROTECTED]
 wrote:
 Hello

 I want remove some fields from scaffold views. which type that possible pls
 help me.

 thanks

 Ranjana
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold

2008-09-02 Thread hydra12

The easiest way to do this is to bake your application and have bake
create the default views for you.  Then you can go in and edit those
views any way you want.  Otherwise, scaffolding is pretty much non-
editable.  I think you can edit the scaffold templates, but I don't
know how to do that.

On Sep 2, 4:02 am, Ranjana Sriavastava [EMAIL PROTECTED]
wrote:
 Hello

 I want remove some fields from scaffold views. which type that possible pls
 help me.

 thanks

 Ranjana
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold Templates in 1.2 ?

2008-02-10 Thread Julio Protzek
Sorry Leo, I don't know :(

2008/2/9, Leo Brown [EMAIL PROTECTED]:


 Julio

 Any idea what revision this was introduced in?

 Version 6000 didnt have it, but revision 6311 does. The reason i was
 hoping to know is there there seem to be some session-related bugs in
 6311.

 Thanks guys

 On Feb 7, 4:46 am, Julio Vinicius [EMAIL PROTECTED] wrote:
  Hi Wood, i hope this answer is not to late...
 
  The tempdos is wrong. They already changed on the svn and it will be
  online soon.
 
  So to customize a scaffolded view fo a specific controller they say
  you need to place you file here:
  /app/views/posts/scaffold/index.scaffold.ctp
 
  But rather, you need to put it here:
  /app/views/posts/scaffold.index.ctp
 
  And to customize a view scaffold for all your controllers, they say
  the place is here:
  /app/views/scaffolds/index.ctp
 
  But the right place is:
  /app/views/scaffold/index.scaffold.ctp
 
  Hopes this helps others.
 
  The lack of good, consistent and updated documentation is the worst
  problem on CakePHP today.
 
  Note: Happy Birthday to me :D
 
  Cheers,
  Julio Vinicius Protzek
 
  On 1 fev, 20:49, the_woodsman [EMAIL PROTECTED] wrote:
 
 
 
   Ha ha,
 
   Nice one Chris, I probably deserved that.
 
   But listen, I did have a misnamed file in that drectory: previously
   calledscaffold.index.ctp, now renamed, as per thetempdocs, to
   index.scaffold.ctp
 
   I've put this file in /app/views/scaffold, again as per the docs.
 
   I have a controller/model combo, called contracts, which doesn't even
   have a folder in views, so it can't be overriding scaffolding
   templates itself (?).
 
   When I go to /contracts in the browser, I get a standard index list,
   which gets the titleScaffold:: Index :: Contracts, but as my
   template indexscaffoldfile is blank, I'd expect there to be a blank
   page here instead
 
   If I'm being an idiot with a typo or something, It wouldn't be the
   first time... but seriously, has anyone actually got this working? any
   clues??
 
   Thanks,
   Wood
 
   On Feb 1, 6:24 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
 
On Feb 1, 2008 12:45 PM, the_woodsman [EMAIL PROTECTED]
 wrote:
 
 Please, don't tell me to RTFM (http://manual.cakephp.org/chapter/
 scaffolding), as that page has been wrong for yonks ( I think over
 a
 year, even though this ticket is only a month old -
 https://trac.cakephp.org/ticket/3789),
 and it's not for 1.2 anyway!
 
How about you RTOFM (Read The Other F** Manual) over
 athttp://tempdocs.cakephp.orgtoseeif the answer might be in there.
 
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling
 snakes...
@TheKeyBoard:http://www.littlehart.net/atthekeyboard- Hide quoted
 text -
 
  - Show quoted text -

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold Templates in 1.2 ?

2008-02-09 Thread Leo Brown

Julio

Any idea what revision this was introduced in?

Version 6000 didnt have it, but revision 6311 does. The reason i was
hoping to know is there there seem to be some session-related bugs in
6311.

Thanks guys

On Feb 7, 4:46 am, Julio Vinicius [EMAIL PROTECTED] wrote:
 Hi Wood, i hope this answer is not to late...

 The tempdos is wrong. They already changed on the svn and it will be
 online soon.

 So to customize a scaffolded view fo a specific controller they say
 you need to place you file here:
 /app/views/posts/scaffold/index.scaffold.ctp

 But rather, you need to put it here:
 /app/views/posts/scaffold.index.ctp

 And to customize a view scaffold for all your controllers, they say
 the place is here:
 /app/views/scaffolds/index.ctp

 But the right place is:
 /app/views/scaffold/index.scaffold.ctp

 Hopes this helps others.

 The lack of good, consistent and updated documentation is the worst
 problem on CakePHP today.

 Note: Happy Birthday to me :D

 Cheers,
 Julio Vinicius Protzek

 On 1 fev, 20:49, the_woodsman [EMAIL PROTECTED] wrote:



  Ha ha,

  Nice one Chris, I probably deserved that.

  But listen, I did have a misnamed file in that drectory: previously
  calledscaffold.index.ctp, now renamed, as per thetempdocs, to
  index.scaffold.ctp

  I've put this file in /app/views/scaffold, again as per the docs.

  I have a controller/model combo, called contracts, which doesn't even
  have a folder in views, so it can't be overriding scaffolding
  templates itself (?).

  When I go to /contracts in the browser, I get a standard index list,
  which gets the titleScaffold:: Index :: Contracts, but as my
  template indexscaffoldfile is blank, I'd expect there to be a blank
  page here instead

  If I'm being an idiot with a typo or something, It wouldn't be the
  first time... but seriously, has anyone actually got this working? any
  clues??

  Thanks,
  Wood

  On Feb 1, 6:24 pm, Chris Hartjes [EMAIL PROTECTED] wrote:

   On Feb 1, 2008 12:45 PM, the_woodsman [EMAIL PROTECTED] wrote:

Please, don't tell me to RTFM (http://manual.cakephp.org/chapter/
scaffolding), as that page has been wrong for yonks ( I think over a
year, even though this ticket is only a month old 
-https://trac.cakephp.org/ticket/3789),
and it's not for 1.2 anyway!

   How about you RTOFM (Read The Other F** Manual) over 
   athttp://tempdocs.cakephp.orgtoseeif the answer might be in there.

   --
   Chris Hartjes
   Internet Loudmouth
   Motto for 2008: Moving from herding elephants to handling snakes...
   @TheKeyBoard:http://www.littlehart.net/atthekeyboard- Hide quoted text -

 - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold Templates in 1.2 ?

2008-02-06 Thread Julio Vinicius

Hi Wood, i hope this answer is not to late...

The tempdos is wrong. They already changed on the svn and it will be
online soon.

So to customize a scaffolded view fo a specific controller they say
you need to place you file here:
/app/views/posts/scaffold/index.scaffold.ctp

But rather, you need to put it here:
/app/views/posts/scaffold.index.ctp

And to customize a view scaffold for all your controllers, they say
the place is here:
/app/views/scaffolds/index.ctp

But the right place is:
/app/views/scaffold/index.scaffold.ctp

Hopes this helps others.

The lack of good, consistent and updated documentation is the worst
problem on CakePHP today.

Note: Happy Birthday to me :D

Cheers,
Julio Vinicius Protzek

On 1 fev, 20:49, the_woodsman [EMAIL PROTECTED] wrote:
 Ha ha,

 Nice one Chris, I probably deserved that.

 But listen, I did have a misnamed file in that drectory: previously
 calledscaffold.index.ctp, now renamed, as per thetempdocs, to
 index.scaffold.ctp

 I've put this file in /app/views/scaffold, again as per the docs.

 I have a controller/model combo, called contracts, which doesn't even
 have a folder in views, so it can't be overriding scaffolding
 templates itself (?).

 When I go to /contracts in the browser, I get a standard index list,
 which gets the titleScaffold:: Index :: Contracts, but as my
 template indexscaffoldfile is blank, I'd expect there to be a blank
 page here instead

 If I'm being an idiot with a typo or something, It wouldn't be the
 first time... but seriously, has anyone actually got this working? any
 clues??

 Thanks,
 Wood

 On Feb 1, 6:24 pm, Chris Hartjes [EMAIL PROTECTED] wrote:

  On Feb 1, 2008 12:45 PM, the_woodsman [EMAIL PROTECTED] wrote:

   Please, don't tell me to RTFM (http://manual.cakephp.org/chapter/
   scaffolding), as that page has been wrong for yonks ( I think over a
   year, even though this ticket is only a month old 
   -https://trac.cakephp.org/ticket/3789),
   and it's not for 1.2 anyway!

  How about you RTOFM (Read The Other F** Manual) over 
  athttp://tempdocs.cakephp.orgtosee if the answer might be in there.

  --
  Chris Hartjes
  Internet Loudmouth
  Motto for 2008: Moving from herding elephants to handling snakes...
  @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold Templates in 1.2 ?

2008-02-01 Thread Chris Hartjes

On Feb 1, 2008 12:45 PM, the_woodsman [EMAIL PROTECTED] wrote:

 Please, don't tell me to RTFM (http://manual.cakephp.org/chapter/
 scaffolding), as that page has been wrong for yonks ( I think over a
 year, even though this ticket is only a month old - 
 https://trac.cakephp.org/ticket/3789),
 and it's not for 1.2 anyway!

How about you RTOFM (Read The Other F** Manual) over at
http://tempdocs.cakephp.org to see if the answer might be in there.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold improuvement

2007-12-05 Thread Josenivaldo Benito Junior
Completando as dicas do Bill esse artigo mostra algumas automágicas do
cake:

http://cake.insertdesignhere.com/posts/view/15

Abraço,
Benito

On 11/24/07, Bill [EMAIL PROTECTED] wrote:

 Olá Benito,

 dá uma olhada neste link:

 http://www.donutczar.com/blog/?p=3

 Aí você encontra os novos helpers do cake 1.2

 Para usar  input, tem 3 formas praticamente

 $form-input
 $form-inputs
 $form-text

 Acho q irá te ajudar.

 Grande abraço

 Bill

  Olá Galera,
 
  Só avisando que o problema com o webroot na URL foi resolvido no
  webroot/index.php acertando corretamente as variavias (Thanks to
  cake bake from 1,2 version).
 
  Na versão 1.2 do Cake notei que a view gerada pelo cake bake tem
  um monte de $html-input, mas não tem os divs de required e como no
  1.1. Só que o HTML gerado (view source no browser) possui esses
 
 . Presumo então que o $html-input trate os campos required ou
  não incluindo os
  durante a renderização. Pergunto, é possível
  atribuir um ID a cada
  desses campos?
 
  Abraço,
  Benito
  ps: Spark, realmente o Cake 1.2 vale a pena! Valeu
 
 
 


--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: scaffold error

2007-12-02 Thread Indian Baker

Hi,
From the look of it I'm assuming you are using a Has And Belongs To
Many (HABTM) relation. For scaffolding to work properly your table
names, and foreign key relations have to strictly follow the cake
conventions, and your models need to have the correct relations put in
 Would you like to paste your actual database schema, models and , to
help understand the problem better?

Regards
Vinci


On Nov 30, 11:10 pm, Luke [EMAIL PROTECTED] wrote:
 I am not sure what I did, but for some reason the edit action isn't
 working in any of my controllers. It keeps telling me Invalid id for
 Order::edit(). Why would it be doing that? Here is an example
 controller:

 ?php
 class OrderItemsController extends AppController {

 var $name = 'OrderItems';
 var $uses = array('OrderItem', 'Order');
 var $helpers = array('Html', 'Form' );
 var $scaffold;

 }

 ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold error

2007-11-30 Thread Luke

it outputs app\controllers\orders_controller.php (line 41) and an
empty yellow box.

I am on version 1.2.0.5875 pre-beta

On Nov 30, 12:27 pm, Dardo Sordi Bogado [EMAIL PROTECTED]
wrote:
 what version?

 Try debug($this-data) in beforeFilter;

 2007/11/30, Luke [EMAIL PROTECTED]:



  I am not sure what I did, but for some reason the edit action isn't
  working in any of my controllers. It keeps telling me Invalid id for
  Order::edit(). Why would it be doing that? Here is an example
  controller:

  ?php
  class OrderItemsController extends AppController {

  var $name = 'OrderItems';
  var $uses = array('OrderItem', 'Order');
  var $helpers = array('Html', 'Form' );
  var $scaffold;

  }
  ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold error

2007-11-30 Thread Dardo Sordi Bogado

what version?

Try debug($this-data) in beforeFilter;

2007/11/30, Luke [EMAIL PROTECTED]:

 I am not sure what I did, but for some reason the edit action isn't
 working in any of my controllers. It keeps telling me Invalid id for
 Order::edit(). Why would it be doing that? Here is an example
 controller:

 ?php
 class OrderItemsController extends AppController {

 var $name = 'OrderItems';
 var $uses = array('OrderItem', 'Order');
 var $helpers = array('Html', 'Form' );
 var $scaffold;

 }
 ?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold improuvement

2007-11-24 Thread Bill
Olá Benito,

dá uma olhada neste link:

http://www.donutczar.com/blog/?p=3

Aí você encontra os novos helpers do cake 1.2

Para usar  input, tem 3 formas praticamente

$form-input
$form-inputs
$form-text

Acho q irá te ajudar.

Grande abraço

Bill

 Olá Galera,

 Só avisando que o problema com o webroot na URL foi resolvido no
 webroot/index.php acertando corretamente as variavias (Thanks to
 cake bake from 1,2 version).

 Na versão 1.2 do Cake notei que a view gerada pelo cake bake tem
 um monte de $html-input, mas não tem os divs de required e como no
 1.1. Só que o HTML gerado (view source no browser) possui esses

. Presumo então que o $html-input trate os campos required ou
 não incluindo os
 durante a renderização. Pergunto, é possível
 atribuir um ID a cada
 desses campos?

 Abraço,
 Benito
 ps: Spark, realmente o Cake 1.2 vale a pena! Valeu

 
--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: scaffold Component : Scaffold::__scaffold

2007-10-15 Thread Gwoo

once you add var $scaffold you should not do anything else.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold not working for belongsTo join with underscore in name

2007-07-27 Thread bingomanatee

I found the error myself -- a bad name value in the ItemType model
class. sorry...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold in admin

2007-04-19 Thread hydra12

I'm not sure if I understand exactly what you want, but here goes: if
you want to scaffold your admin_ views but not any of your other
views, I don't think you can (officially).  When you scaffold a
controller, it scaffolds everything (I think).  What you can do is use
bake to create your basic controllers and views.  This builds the
scaffolding for you, and you can then modify the code.

I hope that helps.
hydra12


On Apr 19, 12:07 pm, LLoBu [EMAIL PROTECTED] wrote:
 I´m using CAKE_ADMIN to protect admin scaffold.

 I don´t know how to use in, for example:

 class Travels_Controller extends AppController {
   function index(){
 // show all travels
   }

   function show_one($id){
 // controller to show one travel
   }

   function admin_travels(){
 // here i´d like scaffolding
   }

 }

 I´m wasting a lot of time trying to scaffold inside an admin method, I
 hope someone would help me to do this and other sections like fly
 tickets and another.

 That´s my opinion, but I´m openmind to other solutions, because it´s
 simple, I just need to show  three sections and administrator to
 scaffold them.

 Thanks to everyone.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold insert: session problem

2007-04-17 Thread bono

Solved, I had validate_empty in id field :) thanks John!

PS. There is no way to edit own post titles here? Would be nice habit
to put some status marks to them (Solved:  Scaffold  insert: session
problem)

On Apr 17, 12:08 am, John David Anderson [EMAIL PROTECTED]
wrote:
 On Apr 16, 2007, at 1:59 PM, bono wrote:





  Lots of same kind of question but didn't find the answer. I have table
  like this:

  CREATE TABLE 'users' (
  'id' INT( 10 ) NOT NULL AUTO_INCREMENT ,
  'username' VARCHAR( 40 ) NOT NULL ,
  'password' VARCHAR( 40 ) NOT NULL ,
  'email' VARCHAR( 255 ) NOT NULL ,
  'first_name' VARCHAR( 40 ) NOT NULL ,
  'last_name' VARCHAR( 40 ) NOT NULL ,
  PRIMARY KEY ('id`),
  UNIQUE KEY 'username' ('username'),
  UNIQUE KEY 'email' ('email')
  ) TYPE = MYISAM ;

  and I have baked default scaffold controller and view. When I try to
  add new user Please correct errors below. error message is shown all
  the time even though all fields are correctly entered and no error
  messages are showing.

  It comes from here (scaffold.php line 317):
  if (isset($this-controller-Session)  $this-controller-Session-
  valid != false) {
$this-controller-Session-setFlash(__('Please correct errors
  below.', true));
  }

  I have tried all three session saving methods buts it makes no
  difference. Environment is OS X 10.4.9, cakephp 1.2.0.4798alpha, php 5
  and MySQL 5.

  Any suggestions?

 Can you show us what your model looks like?

 You might want to comment out the validation rules in the model just
 to see if that is what is causing the problems.

 -- John




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold insert: session problem

2007-04-16 Thread John David Anderson


On Apr 16, 2007, at 1:59 PM, bono wrote:


 Lots of same kind of question but didn't find the answer. I have table
 like this:

 CREATE TABLE 'users' (
 'id' INT( 10 ) NOT NULL AUTO_INCREMENT ,
 'username' VARCHAR( 40 ) NOT NULL ,
 'password' VARCHAR( 40 ) NOT NULL ,
 'email' VARCHAR( 255 ) NOT NULL ,
 'first_name' VARCHAR( 40 ) NOT NULL ,
 'last_name' VARCHAR( 40 ) NOT NULL ,
 PRIMARY KEY ('id`),
 UNIQUE KEY 'username' ('username'),
 UNIQUE KEY 'email' ('email')
 ) TYPE = MYISAM ;

 and I have baked default scaffold controller and view. When I try to
 add new user Please correct errors below. error message is shown all
 the time even though all fields are correctly entered and no error
 messages are showing.

 It comes from here (scaffold.php line 317):
 if (isset($this-controller-Session)  $this-controller-Session-
 valid != false) {
   $this-controller-Session-setFlash(__('Please correct errors
 below.', true));
 }

 I have tried all three session saving methods buts it makes no
 difference. Environment is OS X 10.4.9, cakephp 1.2.0.4798alpha, php 5
 and MySQL 5.

 Any suggestions?

Can you show us what your model looks like?

You might want to comment out the validation rules in the model just  
to see if that is what is causing the problems.

-- John



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold with Cake-1.2.0.4798alpha

2007-04-09 Thread [EMAIL PROTECTED]

I realized that I had a default.ctp file that was not setup correctly.
I removed it and the scaffold functionality worked perfectly.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold view and edit actions not workign when var $uses is used

2007-02-14 Thread lynda

Hi,
I have the exactly same problem when I use $uses = array('Book',
'Question'); Index.thtml display the resulst, but not edit.thtml and
view.thtml. For example
function view($id){
$this-Question-question_id = $id;
$question = $this-Question-read();
$this-set('question', $question);

}

in my view.thtml,
h1?php print $question['Question']['question_name']; ?/h1
pTitle: ?php print $question['Question']['question_title']; ?/p
Can anyone help this? If I don't use $uses, everything is fine.

Best Regards
Lynda

On Dec 28 2006, 2:11 am, sawa [EMAIL PROTECTED] wrote:
 Hi,
 I noticed that with latest php (5.2) scaffold is not workign well if I
 put var $uses= array('testmodel1','testmodel2') in my controller.
 View and Edit actions display pages only with field titles but without
 title values
 When removed, it works as expected.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: scaffold view and edit actions not workign when var $uses is used

2007-02-14 Thread lynda

Hi, I finally got around of this by using find() instead of read().
 function view($id){
$condition = question_id = .$id.;
$question = $this-Question-find($condition);
$this-set('question', $question);

}
Therefore, the result will show in view.thtml
Best Regards
Lynda
On Feb 14, 11:30 am, lynda [EMAIL PROTECTED] wrote:
 Hi,
 I have the exactly same problem when I use $uses=array('Book',
 'Question'); Index.thtml display the resulst, but not edit.thtml and
 view.thtml. For example
 function view($id){
 $this-Question-question_id = $id;
 $question= $this-Question-read();
 $this-set('question', $question);

 }

 in my view.thtml,
 h1?php print $question['Question']['question_name']; ?/h1
 pTitle: ?php print $question['Question']['question_title']; ?/p
 Can anyone help this? If I don't use $uses, everything is fine.

 Best Regards
 Lynda

 On Dec 28 2006, 2:11 am, sawa [EMAIL PROTECTED] wrote:

  Hi,
  I noticed that with latest php (5.2) scaffold is not workign well if I
  put var $uses=array('testmodel1','testmodel2') in my controller.
  View and Edit actions display pages only with field titles but without
  title values
  When removed, it works as expected.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold problems - inconsistent actions (add/create, edit/update)

2007-01-17 Thread the_woodsman


Ooop, my bad -  this appears to be standard behaviour for scaffolding,
and my real problem is that *all* redirects fail, something to do with
trying to integrate cake's session into an exisitng PHP session.

http://groups.google.com/group/cake-php/browse_thread/thread/bbf3ea95aeb88497?hl=en


Ignore this post... although if you have any ideas for my session issue
(appears to be causing infinte redirects) pls tell me!

Thanks,
Woody


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Scaffold: A few more features

2006-10-31 Thread Jose da Silva

Ok,
I agree with your scaffolf point of view, i think the bake feature is
just fine for 99% of cases.

regards
jose


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: A few more features

2006-10-31 Thread [EMAIL PROTECTED]

John David Anderson (_psychic_) wrote:

 I think a feature like this would entice new users to use their
 scaffolding more than is needed.

 If you'd like to start customizing what is shown, and how things are
 presented, it's time to bake.

 -- John

John,

What about extensions to Bake? The current version is wonderful, and I
would love to have some more code generation. Many more templates could
be implemented. I looked at the Bake code and it appeared to me (and I
may be wrong) that it is highly specific to the existing templates and
not easily extensible as currently written.

Should I be waiting for a future Cake release which includes more code
generation, or should I be writing my own?

There are open source code generation tools. For example,

http://freshmeat.net/projects/codeworker/

though I haven't tried to customize any of the generators yet.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: A few more features

2006-10-30 Thread nate

What John said.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: A few more features

2006-10-30 Thread jdownton

I do like the idea of extending the ability of scaffolding.  I use cake
for work so anything that saves time lets me sleep more ;)

Personally if one could put in the option to hide a field from
scaffolding (like 'id') and format the rows and columns a little more
cleanly it would mean I wouldn't have to bake so quickly.

I've just found that users always want to change a field, add a field,
delete a field and this process doesn't seem to stop and once I've
baked my views it means going into the index/add/view/edit templates to
add/delete a field.

These are just my thoughts and I am still learning :)

-Jeff  btw. Hi Jose, you remember me?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: A few more features

2006-10-30 Thread Larry E. Masters aka PhpNut
Scaffold should not be used for production settings, I have said this since I added it to cake. If you want the automagicness that scaffold provides, use bake and edit the files that are created. I will not add any more functionality to scaffold that is not already there. 
You can already use methods that are available to extend scaffold on your own.Controller::_beforeScaffold()Controller::_afterScaffoldSave()Controller::_afterScaffoldSaveError()Controller::_scaffoldError()
And you already have the ability to override the core templates used for scaffold by creating your own views.app/views/scaffold/scaffold.*.thtmlor app/views/*/scaffold.*.thtmlWith all of this available to you, doing what you need can be done already without having to add it to the core.
-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @accesspublic*/On 10/30/06, 
jdownton [EMAIL PROTECTED] wrote:
I do like the idea of extending the ability of scaffolding.I use cakefor work so anything that saves time lets me sleep more ;)Personally if one could put in the option to hide a field fromscaffolding (like 'id') and format the rows and columns a little more
cleanly it would mean I wouldn't have to bake so quickly.I've just found that users always want to change a field, add a field,delete a field and this process doesn't seem to stop and once I'vebaked my views it means going into the index/add/view/edit templates to
add/delete a field.These are just my thoughts and I am still learning :)-Jeffbtw. Hi Jose, you remember me? 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Scaffold: A few more features

2006-10-30 Thread Jeff Downton

Thanks phpnut, I understand the purpose of scaffolding better and
thanks nate for the style suggestion, both are of great help.

-Jeff


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold Error

2006-09-19 Thread nate

Try this:

public $name = HelpCategories;

Sorry if the name thing wasn't completely clear.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold Error

2006-09-19 Thread Brian French

it should be: 

 class HelpCategoriesController extends AppController
 {
public $name = HelpCategories;
var $scaffold;
var $useDbConfig = wwa;
 }

where $name doesnt have 'Controller' in the string.

it should be named: app/controllers/help_categories_controller.php

Syl wrote:
 G'day -

 I am having trouble getting the scaffolding to work with my cake
 installation.  Here is my code :

  class HelpCategoriesController extends AppController
  {
   public $name = HelpCategoriesController;
   var $scaffold;
   var $useDbConfig = wwa;

  }

 Pretty basic, nothing fancy - But here is the result I am getting :

 ==
 Notice: Undefined property: HelpPagesController::$table in
 C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 599

 Notice: Undefined property: HelpPagesController::$alias in
 C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 600

 Warning: array_search() [function.array-search]: Wrong datatype for
 second argument in
 C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 600

 Warning: Invalid argument supplied for foreach() in
 C:\wamp\www\WebWantAds\cake\libs\controller\controller.php on line 603

 Fatal error: Call to undefined method HelpPagesController::findAll() in
 C:\wamp\www\WebWantAds\cake\libs\controller\scaffold.php on line 148
 ==

 Doesn't scaffolding take care of all of this ?

 Syl


 

   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold Error

2006-09-19 Thread Brian French

nate beat me :-p

nate wrote:
 Try this:

 public $name = HelpCategories;

 Sorry if the name thing wasn't completely clear.


 

   

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold Error

2006-09-19 Thread Syl

Wow !  You guys are fast :-)

Thanks !!  That did it :-)

S


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: scaffold troubles with non conventional name

2006-07-06 Thread Repsah
Hmm, speaking language... why use a plural for a model name when it should be singular? Isn't soggettus the singular for soggetti? So I would expect the model class to be Soggettus and the controller to be SoggettiContoller. I know, not a solution for your question, just... uno che ha fatto il liceo scientifico e spera di ricordarsi qualcosa di latino.
On 7/6/06, bracchetto [EMAIL PROTECTED] wrote:
this is the error i get:Notice: Undefined property: Soggettus in[...]cake/libs/controller/scaffold.php on line 399well, i think that the problem could be that i use italian classname,or because i use postgres.
Where can i specify that the model name is not Soggettus but Soggetti?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Scaffold dropdown

2006-06-21 Thread Kit

Never mind I figured it out...of course right after I post the question.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold vs. Baking

2006-05-29 Thread jgoforth

my version.txt says 1.0.1.2708 which as far as I know is the most
recent released version.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold vs. Baking

2006-05-29 Thread AD7six

Might be worth your time looking again ;)

http://cakeforge.org/frs/?group_id=23release_id=96

AD7six


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold vs. Baking

2006-05-29 Thread Larry E. Masters aka PhpNut
Latest version is 1.1.3.2967Released a few days ago.-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @accesspublic*/
On 5/29/06, jgoforth [EMAIL PROTECTED] wrote:
my version.txt says 1.0.1.2708 which as far as I know is the mostrecent released version. 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Scaffold vs. Baking

2006-05-26 Thread Larry E. Masters aka PhpNut
Are you using the latest version of Cake?-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @accesspublic*/
On 5/26/06, jgoforth [EMAIL PROTECTED] wrote:
Maybe I have missed something along the way, but my initialunderstanding of what the bake tool did was basically creating hardcopy versions of what scaffolding does on the fly. After having usedit, this seems to have been an incorrect understanding.
I set up my database and everything was working find in scaffolding, soI went in and used the bake tool to create everything, but I keeprunning into things that don't work in the baked version. Specifically
right now, dates in forms don't end up getting saved to the database,despite the fact that everything else does. Any thoughts on that matterwould be appreciated, but my real question is why are the two different
in the first place? Is any difference between the two a bug or was myoriginal assumption incorrect? 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Scaffold (prompt forms)

2006-05-23 Thread nate

Again, you can't.  I will refer you to my reply from your previous
scaffold-related post.  Scaffold is for *prototyping*, not *building*
applications.  If you want to customize the scaffold view, bake it.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: scaffold validate erros

2006-05-22 Thread nate

You can't.  If you need functionality beyond what scaffold provides,
you should build out that part of your application.  The new Bake
utility allows you to generate scaffold files, which should give you a
good starting point.

Scaffold is for rapid *prototyping*, not actual application building,
and as such is purposely kept to a useful minimum in terms of features
and functionality.

X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.11.88.14 with SMTP id l14mr44474cwb;
Mon, 22 May 2006 13:08:43 -0700 (PDT)
X-Google-Token: K9tkWAwM-Z-_2lcY25GzoKMaCYS-
Received: from 71.232.44.107 by g10g2000cwb.googlegroups.com with HTTP;
Mon, 22 May 2006 20:08:43 + (UTC)
From: nate [EMAIL PROTECTED]
To: Cake PHP cake-php@googlegroups.com
Subject: Re: scaffold validate erros
Date: Mon, 22 May 2006 20:08:43 -
Message-ID: [EMAIL PROTECTED]
In-Reply-To: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 
(KHTML, like Gecko) Safari/417.9.3,gzip(gfe),gzip(gfe)
Mime-Version: 1.0
Content-Type: text/plain

You can't.  If you need functionality beyond what scaffold provides,
you should build out that part of your application.  The new Bake
utility allows you to generate scaffold files, which should give you a
good starting point.

Scaffold is for rapid *prototyping*, not actual application building,
and as such is purposely kept to a useful minimum in terms of features
and functionality.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: How to draw a SELECT OPTION for a filed having parent_id with the same Table

2006-05-10 Thread Kotekar

Hey,

I got this message:

Warning: uses(CORE_PATHcake\libs\bake.php): failed to open stream: No
such file or directory in E:\s
ites\cakephp\cake\basics.php on line 393

Fatal error: uses(): Failed opening required
'CORE_PATHcake\libs\bake.php' (include_path='.;C:\php5\
pear') in E:\sites\cakephp\cake\basics.php on line 393


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: How to draw a SELECT OPTION for a filed having parent_id with the same Table

2006-05-09 Thread John Zimmerman [gmail]
Will it work if you use 'categories_id' instead of 'parent_id'?Following the cake conventions this might make sense.On 5/8/06, Kotekar 
[EMAIL PROTECTED] wrote:categories TABLE- id- name- parent_id
While Add New Category,i need the SELECT OPTION to draw the values ofpresent Category List to choose if the New one is Sub Category ofpresented one.Can any one help, to find out how to build the association to this.
Thanx in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Scaffold: How to draw a SELECT OPTION for a filed having parent_id with the same Table

2006-05-09 Thread Mika

sorry that was supposed to be  bake.php was broken.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: How to draw a SELECT OPTION for a filed having parent_id with the same Table

2006-05-09 Thread Kotekar

Hi Mika,

It seems to be broken, it didn't worked.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold: How to draw a SELECT OPTION for a filed having parent_id with the same Table

2006-05-09 Thread clemos

hi

it's not a problem with mysql itself (otherwise, it would return
something like unable to connect)
I'm no expert (and all this depends on the way you 'upgraded' php4 to
php5), but maybe it comes from a wrong setup of php5.
in php.ini (the one for php5), in the extension (module) section I
have had to uncomment (or add, I don't remember) :
extension=php_mysql.dll
maybe it's particular for me (because I run php5 as a cgi, still php4
by default), but I think mysql was built in php4, not php5,
something like that.

anyway, it's OT ;)

++
clemos

On 5/9/06, Spark [EMAIL PROTECTED] wrote:

  i tried it last night, and I got this message:

   _  _  ___  _  _ ___ ___   _  _ 
 ||__| |_/  |___ |__] |__| |__]|__] |__| |_/  |___
 |___ |  | | \_ |___ ||  | |   |__] |  | | \_ |___
 ---
 [M]odel
 [C]ontroller
 [V]iew

 Please select a class to Bake: (M/V/C)
  m
 ---
 Model Bake:
 ---

 Fatal error: Call to undefined function mysql_connect() in
 D:\webroot\cake\cake\libs\model\dbo\dbo_mysql.php on line 116


  I'm running winXP, easyphp 1.8 , upgraded everything (php 5, mysql 5,
 phpmyadmin, etc), and i'm NOT running mysql as a service. is it
 essencial ? mysql is also on the Path.


  thank you
  spark!

 On 5/9/06, Mika [EMAIL PROTECTED] wrote:
 
  What response did you get?
 
 
  
 


 --
 [web] http://synapsisdi.com.br
 [livesets] http://djspark.com.br

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Scaffold without standard conventions.

2006-04-10 Thread Mika

I'm sure it would help if you either set the table name in the Model
(useTable:
http://api.cakephp.org/class_model.html#699e150b922e2ef4bb51cf7d46fef0ea)

or use the inflections.php file in your app/config folder
(http://api.cakephp.org/inflections_8php.html)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---