Re: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2012-01-13 Thread burntcake
Thanks for all the replies, feedback and suggestions.  My biggest
problem right now is that I'm about to start a new web app for my
company (time is of the essence, needless to say), and I have, broadly
speaking, 2 ways of doing it.  I can reuse some of our old, poorly-
structured codebase and build on that, or I could start with something
new and do it right, once and for all, using a smart 'platform' like
Cake.  But I'm having a lot of difficulty convincing my boss
(reasonably technical, but not a programmer) that spending a lot of
time trying to get to grips with a new method that could potentially
make future development a lot speedier, and cheaper, is a better move
than hacking something together quickly by reusing most of the ugly
code we have, but code that will make the dollars roll in in a few
weeks, not months.

This is my biggest problem with Cake right now, and I'm sure I'm not
alone.  Wider corporate/enterprise adoption, by making the learning
curve less painful and frustrating, would benefit everyone, not least
the guys who have put in all the sweat and blood to make what's there
already.  All that's missing is accurate docs, tutorials and examples
for the latest version.  I know there's a ton of work in that, but it
seems to me to be a crying shame to put all the effort into the
development of the platform, then make it hard for people to actually
use and adopt.

Glen.

-- 
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: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2012-01-12 Thread burntcake
@jeremyharris
>There are video tutorials here: http://tv.cakephp.org/
>You can also sign up for training classes here: http://training.cakephp.org/

- thanks, that sounds like a very good idea, I guess there's a Q&A
part in those courses?

@100rk
> Don't use CakePHP 2.1-alpha (codebase and/or documentation) yet -
> learn latest stable.

- the $this->fetch('content') line is in the 2.0 docs?
http://book.cakephp.org/2.0/en/views.html#view-layouts

-- 
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: Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2012-01-12 Thread burntcake
Thanks Jeremy.  I really didn't want to come off negative (how can I
when I'm getting this thing for free, paid for by other people's hard
work), I just wanted to put a noob's perspective out there.

It's really frustrating to walk into dark caves so often when you're
trying to learn something new, and when you think you've found a way
out, it's another dead end.

If I ever get any level of skill with Cake I will most definitely add
to or update the docs.

I haven't given up on Cake, but I'm wondering if Cake 1 would be a
wiser choice for now.

Thanks,

Glen.

On Jan 12, 7:23 pm, jeremyharris  wrote:
> Double underscore functions are translating functions, which allow you to
> internationalize your application. (You can always look at the code to try
> and figure out what it does - it's also a great way to learn!)
>
> Cake is a large project, so there will always be things missing from the
> docs. Feel free to contribute as you figure things out and find what's
> missing. There are a few books on CakePHP 1.3 (Mariano's comes to mind),
> but CakePHP 2 is very new so you won't find any. And you're right,
> generally you don't see books because they become dated quickly.
>
> If you have little questions like "what does __d()" do, you can always ask
> on IRC. Most people are pretty helpful.
>
> Don't give up hope! We're all always trying to improve CakePHP with better
> docs and user contributed content. It's all created on volunteer time so
> it's important to understand there's only so much the core team can do.
>
> -jeremy

-- 
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


Cake 2: Very confusing docs/tutorials... Is there another foolproof source?

2012-01-12 Thread burntcake
Hi all,

Sorry if this is another dumb post, but I get the feeling that the
tutorials and docs are written with experienced Cake people in mind,
rather than Cake novices.

For example, after completing the Blog tutorial, it suggests reading
up on Layouts, which I did next.

At http://book.cakephp.org/2.0/en/views.html#view-layouts it says,
"When you create a layout, you need to tell CakePHP where to place the
code for your views. To do so, make sure your layout includes a place
for $this->fetch('content')".  So I replace my /app/View/Layouts/
default.ctp (that I copied from the /lib/Cake/View/Layouts) with the
suggested layout shown on that page, and now my Blog app craps out.
Then I revert to the good version and it works again.  Ok, not to
worry, I'll go on.

So, I take a look at /app/View/Layouts/default.ctp (that I copied from
the /lib/Cake/View/Layouts) and search for the essential part, $this-
>fetch('content').  But, it's nowhere to be seen.  In fact, fetch()
does not seem to be defined anywhere at all in the whole bundle, and I
can't find a definition for fetch() in the PHP docs either?  So, now
I'm wondering if the docs are BS as default.ctp that comes bundled
with Cake doesn't even have any mention of this seemingly essential
line?

Then I take another look at /app/View/Layouts/default.ctp to see if I
can figure it out what it does.  The very first line is
$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php
framework');
There are no comments at all to go with it.  So I try to look up what
__d() does and I get this from the docs:
__d  Allows you to override the current domain for a single message
lookup.  Clear as mud.

No explanation of what's meant by domain or message.  Are we talking
about dotcoms here, or a set of values?  The latter, I assume, but I
can only imagine how many non-English speakers scratch their head til
it bleeds after reading that.  And still I'm really not sure what
__d() does.

I'm sorry if this reads very negatively, and I greatly appreciate the
work done by the CakePHP teams and volunteers, but I'm sure Cake would
be adopted a lot more widely if it was friendlier to novices (I'm
certainly not a PHP novice, but I'm new to Cake).

99% of the tutorials out there are written for the last version of
Cake, and don't work for Cake 2 (no doubt they can easily be adapted
for Cake 2, but for a novice, they should work 100% when copying and
pasting...  A novice can't be expected to adapt someone else's code,
just when they're learning it).  I think I would advise noobs to start
off with Cake 1, as there's a lot more stuff out there for it, and
it's very hard to figure out what's going on in Cake 2, especially if
you wander astray for a moment, and Google won't help much either.  I
know no one buys a book to learn this stuff anymore, but even if you
wanted to, you couldn't.

Just some initial thoughts, I hope it starts to get better...

Glen.

-- 
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: How to EDIT default layout in CakePHP 2.0.5?

2012-01-12 Thread burntcake
yep, seems obvious in hindsight...  I was following the the blog
tutorial but it seems to assume prior knowledge of the last version of
Cake...

On Jan 11, 5:14 pm, AD7six  wrote:

>
> out of curiosity - did the idea to simply look for the file
> default.ctp in your project not arise?
>
> AD

-- 
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: How to EDIT default layout in CakePHP 2.0.5?

2012-01-11 Thread burntcake
Thanks for your replies, I was looking in the app dir as specified (I
don't have an APP) dir, not in lib/Cake/View/Layouts...  I'm not sure
why the default page specifies a (seemingly) different dir.

Thanks,

Glen.

-- 
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


How to EDIT default layout in CakePHP 2.0.5?

2012-01-11 Thread burntcake
Hi all,

I want to change the default layout in 2.0.5 but the only instruction
I can find is to "create: APP/View/Layouts/default.ctp".

But I want to edit the existing one, so that I can see clearly how
it's already structured, not to define my own brand new one from
scratch.

It seems this was easily done in previous versions, but I have not
been able to find how it's done in version 2?

Any help would be appreciated!

Thanks,

Glen.

-- 
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: The view for PostsController::index() was not found

2012-01-06 Thread burntcake
Heh, tell me about it...  And to think I thought all those 101
mistakes were behind me :)

On Jan 6, 2:51 pm, Jeremy Burns | Class Outfit
 wrote:
> We've all been there. Often the most complex gnarled and horrible bugs turn 
> out to be down to punctuation.
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 6 Jan 2012, at 14:49:35, burntcake wrote:
>
>
>
>
>
>
>
> > My God, that's embarrassing  I guess I didn't follow the
> > tutorial to the *letter* after all..
>
> > I could probably have spent another week without finding that - I had
> > named it index.cpt instead of index.ctp
>
> > Apologies for the dumb mistake, and my sincerest gratitude for your
> > help and eagle eyes!!
>
> > A million thanks Jeremy!
>
> > Glen
>
> > On Jan 6, 2:42 pm, Jeremy Burns | Class Outfit
> >  wrote:
> >> Is it just that view that's causing the issue or is it every view?
>
> >> This is probably a typo, but at times you are referring to the file 
> >> extension cpt rather than ctp (which is the correct one).
>
> >> Jeremy Burns
> >> Class Outfit
>
> >>http://www.classoutfit.com
>
> >> On 6 Jan 2012, at 14:08:38, burntcake wrote:
>
> >>> Hi all,
>
> >>> I'm brand new to Cake (but not PHP) and this is my first post here.
> >>> I've been trying to get the Blog example working -
> >>>http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html
>
> >>> However, having followed the instructions to the letter, I'm getting
> >>> the following errors:
>
> >>> Error: The view for PostsController::index() was not found.
>
> >>> Error: Confirm you have created the file: /mysite/web/content/app/View/
> >>> Posts/index.ctp
>
> >>> Notice: If you want to customize this error message, create app/View/
> >>> Errors/missing_view.ctp
> >>> Stack Trace
>
> >>> #0 /mysite/web/content/lib/Cake/View/View.php(360): View-
> >>>> _getViewFileName(NULL)
> >>> #1 /mysite/web/content/lib/Cake/Controller/Controller.php(900): View-
> >>>> render(NULL, NULL)
> >>> #2 /mysite/lib/Cake/Routing/Dispatcher.php(111): Controller->render()
> >>> #3 /mysite/web/content/lib/Cake/Routing/Dispatcher.php(86): Dispatcher-
> >>>> _invoke(Object(PostsController), Object(CakeRequest),
> >>> Object(CakeResponse))
> >>> #4 /mysite/web/content/app/webroot/index.php(96): Dispatcher-
> >>>> dispatch(Object(CakeRequest), Object(CakeResponse))
> >>> #5 {main}
>
> >>> Some extra info:
>
> >>> (1) 'mysite' is not the true path given in the error, I've edited it
> >>> for privacy purposes
> >>> (2) /mysite/web/content/app/View/Posts/index.ctp 100% exists
> >>> (3) index.cpt is spelled exactly that way, not Index.cpt or index.CPT
> >>> or any other variation
> >>> (4) I've tried various directory/file permissions, currently
> >>> permissions on all directories and files below and including 'content'
> >>> are set to 755
> >>> (5) I've spent many hours researching this particular problem but I
> >>> haven't found any solution
>
> >>> Any help would be much appreciated.
>
> >>> Thanks!
>
> >>> --
> >>> Our newest site for the community: CakePHP Video 
> >>> Tutorialshttp://tv.cakephp.org
> >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp 
> >>> 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 
> >>> athttp://groups.google.com/group/cake-php
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 
> > athttp://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: The view for PostsController::index() was not found

2012-01-06 Thread burntcake
My God, that's embarrassing  I guess I didn't follow the
tutorial to the *letter* after all..

I could probably have spent another week without finding that - I had
named it index.cpt instead of index.ctp

Apologies for the dumb mistake, and my sincerest gratitude for your
help and eagle eyes!!

A million thanks Jeremy!

Glen


On Jan 6, 2:42 pm, Jeremy Burns | Class Outfit
 wrote:
> Is it just that view that's causing the issue or is it every view?
>
> This is probably a typo, but at times you are referring to the file extension 
> cpt rather than ctp (which is the correct one).
>
> Jeremy Burns
> Class Outfit
>
> http://www.classoutfit.com
>
> On 6 Jan 2012, at 14:08:38, burntcake wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > I'm brand new to Cake (but not PHP) and this is my first post here.
> > I've been trying to get the Blog example working -
> >http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html
>
> > However, having followed the instructions to the letter, I'm getting
> > the following errors:
>
> > Error: The view for PostsController::index() was not found.
>
> > Error: Confirm you have created the file: /mysite/web/content/app/View/
> > Posts/index.ctp
>
> > Notice: If you want to customize this error message, create app/View/
> > Errors/missing_view.ctp
> > Stack Trace
>
> > #0 /mysite/web/content/lib/Cake/View/View.php(360): View-
> >> _getViewFileName(NULL)
> > #1 /mysite/web/content/lib/Cake/Controller/Controller.php(900): View-
> >> render(NULL, NULL)
> > #2 /mysite/lib/Cake/Routing/Dispatcher.php(111): Controller->render()
> > #3 /mysite/web/content/lib/Cake/Routing/Dispatcher.php(86): Dispatcher-
> >> _invoke(Object(PostsController), Object(CakeRequest),
> > Object(CakeResponse))
> > #4 /mysite/web/content/app/webroot/index.php(96): Dispatcher-
> >> dispatch(Object(CakeRequest), Object(CakeResponse))
> > #5 {main}
>
> > Some extra info:
>
> > (1) 'mysite' is not the true path given in the error, I've edited it
> > for privacy purposes
> > (2) /mysite/web/content/app/View/Posts/index.ctp 100% exists
> > (3) index.cpt is spelled exactly that way, not Index.cpt or index.CPT
> > or any other variation
> > (4) I've tried various directory/file permissions, currently
> > permissions on all directories and files below and including 'content'
> > are set to 755
> > (5) I've spent many hours researching this particular problem but I
> > haven't found any solution
>
> > Any help would be much appreciated.
>
> > Thanks!
>
> > --
> > Our newest site for the community: CakePHP Video 
> > Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd 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 
> > athttp://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


The view for PostsController::index() was not found

2012-01-06 Thread burntcake
Hi all,

I'm brand new to Cake (but not PHP) and this is my first post here.
I've been trying to get the Blog example working -
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html

However, having followed the instructions to the letter, I'm getting
the following errors:

Error: The view for PostsController::index() was not found.

Error: Confirm you have created the file: /mysite/web/content/app/View/
Posts/index.ctp

Notice: If you want to customize this error message, create app/View/
Errors/missing_view.ctp
Stack Trace

#0 /mysite/web/content/lib/Cake/View/View.php(360): View-
>_getViewFileName(NULL)
#1 /mysite/web/content/lib/Cake/Controller/Controller.php(900): View-
>render(NULL, NULL)
#2 /mysite/lib/Cake/Routing/Dispatcher.php(111): Controller->render()
#3 /mysite/web/content/lib/Cake/Routing/Dispatcher.php(86): Dispatcher-
>_invoke(Object(PostsController), Object(CakeRequest),
Object(CakeResponse))
#4 /mysite/web/content/app/webroot/index.php(96): Dispatcher-
>dispatch(Object(CakeRequest), Object(CakeResponse))
#5 {main}

Some extra info:

(1) 'mysite' is not the true path given in the error, I've edited it
for privacy purposes
(2) /mysite/web/content/app/View/Posts/index.ctp 100% exists
(3) index.cpt is spelled exactly that way, not Index.cpt or index.CPT
or any other variation
(4) I've tried various directory/file permissions, currently
permissions on all directories and files below and including 'content'
are set to 755
(5) I've spent many hours researching this particular problem but I
haven't found any solution

Any help would be much appreciated.

Thanks!

-- 
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