Re: CakePHP 2.1 pagination routing (Help)

2012-03-07 Thread mikeottinger
Just came across this issue myself. Is this a bug? Without the beforeFilter 
change, my pagination links would never change, they'd always stay at 1.

Thanks for the very helpful reply..

On Thursday, March 1, 2012 3:07:11 PM UTC-8, Salines wrote:
>
> You save my life :)  Thank You.
>

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


using $this->Model->validationErrors across associations

2012-01-02 Thread mikeottinger
Hi all, just a quick question. I have a simple model association between a 
Work and Image model with a one-to-many association between the two. When I 
call saveAll on the Work model it'll save the associated images as well. 
But when validation errors occur on the Work and images, it seems that 
$this->Work->validationErrors will only give me the validation errors of 
the work model and not the images. Is there a way, from the controller, to 
get in one shot all of the validation errors across all the associations? 
Or do I need to go digging into each model for them individually?

Thanks in advance!

-- 
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: schema shell for cakephp 2 - migrate new tables?

2011-12-20 Thread mikeottinger
Excellent, I'd come across this but didn't notice a port to cakephp 2.0 had 
been done. This is exactly what I'm looking for. 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


schema shell for cakephp 2 - migrate new tables?

2011-12-17 Thread mikeottinger
After playing around with the schema shell functionality in cakephp 2, I 
can't see how new tables are migrated as part of snapshots.

Entire schemas can be created (wiping out data) with the 'cake schema 
create' command. But I can't see how I'd be able to add a model and a 
corresponding table in my local environment, create a snapshot and get that 
new table into a new environment. I'm always getting errors like:

Database table orders for model Order was not found

Does the schema shell and its migration functionality not support this?

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


Re: js/css compression helpers for cakephp 2.0

2011-11-30 Thread mikeottinger
Thanks guys, I'll give Mark Story's plugin a try 
(https://github.com/markstory/asset_compress/tree/2.0). This supports YUI 
Compression which I was particularly looking for. Thanks for the info.

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


js/css compression helpers for cakephp 2.0

2011-11-29 Thread mikeottinger
Hi All, I've been looking at cakephp 2.0 and wondered if any of the 
existing plugins written previously for js/css compression worked with 
cakephp 2.0. Does anyone have any plugins or techniques in general they can 
share on this?

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


Re: Corrupted app/tmp/cache/views/ Files

2011-08-30 Thread mikeottinger
Thanks so much for looking into these. The reason I only included the 
persistent cache files was because I noticed that when I moved these files 
out, refreshed the page, I could see a properly rendered site. If I put 
these files back into the persistent folder, and refreshed the page again, 
I'd get the white page again. So the problem was completely reproducible 
with the persistent cache files. I have plans to migrate these sites up to 
1.3, hopefully this issue has been addressed. Thanks again.

-- 
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: Corrupted app/tmp/cache/views/ Files

2011-08-30 Thread mikeottinger
I've just had this happen again, actually on a dev site which allowed me a 
little more time to collect files before clearing the files. I hopped up on 
the server and tar'd up the persistent folder under apps/tmp/cache which I 
determined was the culprit. I've gone through each of the files in this tar, 
this appears to be some sort of json formatted data. Nothing jumps out at 
me. I'm attaching this tar to my posting here, in case anyone has more 
experience with these files. Again, I'm running cakephp 1.2.7. I'm wondering 
if I could post this tar to someone at the cakephp dev team, this problem 
strikes at random and I don't seem to have any way to avoid it. Any ideas on 
this would be greatly appreciated.

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


persistent.tar.gz
Description: Binary data


Re: schema generate only works with force flag

2011-08-27 Thread mikeottinger
wow... okay, I got to the bottom of this. After taking on an old school 
"echo ..." debugging session into the bowels of cakephp I discovered that a 
call to get_class_vars for my model was not returning any properties. This 
caused the generate function to skip my model. What solved it... using the 
longer opening tag "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


schema generate only works with force flag

2011-08-27 Thread mikeottinger
Hi All, I'm running 1.3.6 and I'm getting myself familiar with the schema 
generate feature. I have a simple controller and model created that works 
fine. I attempt to run cake schema generate and I get the following output:

Generating Schema...
Schema file: schema.php generated

When I open the schema.php file, I see the following:

http://book.cakephp.org/view/1524/Generating-and-using-Schema-files. Or 
perhaps I'm doing something wrong?

Any tips on this would greatly be appreciated.


-- 
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: Corrupted app/tmp/cache/views/ Files

2011-06-01 Thread mikeottinger
I've been experiencing this issue on two sites I have in production.
They'll randomly cause only white pages to appear, I'm running version
1.2.7 in both sites, and they're both running on debian. This issue
seems to come out of the blue, and a simple deleting of the cache
files solves it. I'd love to get to the bottom of this as it seems the
only way I find out is when the clients frantically call me.

Thanks!

On Apr 19, 6:30 am, luke BAKING barker  wrote:
> Hey Dwayne did you get this resolved or find out why? I am having a
> similar issue with some cake sites. And using File caching - default
> as defined in the core.php. I am only caching some actions, in the
> controller.
>
> On Mar 15, 8:57 pm, Dwayne  wrote:
>
>
>
>
>
>
>
> > I've run into the followingproblemsporadically on different sites we
> > have running on top of Cake: A client will report in that some page or
> > other isn't loading, when it's examined the page will be a blank
> > screen. Turning on debug will give a PHP syntax error in the cachedfilein 
> > app/tmp/cache/views/. It appears that thefilewas not
> > completely written to disk, and therefore is invalid. Deleting 
> > thatfilefixes theproblem.
>
> > I'm not sure how these files are becoming corrupted, though. 
> > Theproblemseems mostly random, but it is tied in to server load. When
> > the server is heavily loaded this will happen more frequently. Today a
> > client reported aproblemagain. The cachedfilehad been created at
> > 2:25AM, but there were records in the DB created closer to noon that
> > couldn't have been created if that page were broken.
>
> > Some additional details: the sites that have thisproblemare running
> > a custom CMS we've written on top of Cake. This makes use of a
> > modified version requestAction() to load parts of a page. I'm not sure
> > if that could have an effect or not. Thecachefiles generated are
> > enormous as well, so scanning through them to see how they work hasn't
> > done me much good. I don't know if that's typical of Cake or specific
> > to our CMS.
>
> > Has anyone else experienced aproblemlike this? Searching for
> > "corruptedcache" in this group doesn't return anything that seems
> > directly related, nor does searching for "cakephp corruptedcache" in
> > google. I'm still a bit unclear on exactly how Cake's caching works
> > under the hood, but at a surface level the caching works except for
> > when the files themselves are busted.
>
> > Any ideas on how to prevent or detect this? Ideally I'd rather this
> > didn't happen, but if I can at least prevent things from needing a
> > user to contact our client that a page is down and then have the
> > client contact me that would be a significant improvement.

-- 
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: Logging levels in cake 1.2x

2010-12-27 Thread mikeottinger
Yeah I played around with that setting as well, never changed
anything. All I seem to be able to do is separate logging into
different files based on my log statement, but I can't turn off debug
logging.

Thanks!

On Dec 27, 1:20 am, Vivi Vivi  wrote:
> look at
> define('LOG_ERROR', 2);
>
> On 12/27/10, mikeottinger  wrote:
>
>
>
> > Hi All, playing with logging levels in my cake 1.2.7 app, I notice
> > that even if I set this:
>
> > Configure::write('debug', 0);
>
> > I still get debug statements written to the debug.log. Is there really
> > no way to turn these off? My concern is that for areas of my app where
> > I want to apply a lot of debug logging, I'll be building up debug logs
> > on my production server. Any ideas on how to address this? I
> > understand cake 1.3x applies levels better than 1.2x.
>
> > Thanks!
>
> > 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 at
> >http://groups.google.com/group/cake-php?hl=en
>
> --
> Vivihttp://photos.vr-3d.net

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


Logging levels in cake 1.2x

2010-12-26 Thread mikeottinger
Hi All, playing with logging levels in my cake 1.2.7 app, I notice
that even if I set this:

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

I still get debug statements written to the debug.log. Is there really
no way to turn these off? My concern is that for areas of my app where
I want to apply a lot of debug logging, I'll be building up debug logs
on my production server. Any ideas on how to address this? I
understand cake 1.3x applies levels better than 1.2x.

Thanks!

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: Timestamp values not returning the time

2010-12-21 Thread mikeottinger
Ah yep, I had an afterFind function buried in that model that I'd
forgotten about that was messing with the created field. Sorry, ID 10
T error.

On Dec 21, 12:14 pm, cricket  wrote:
> On Tue, Dec 21, 2010 at 3:01 PM, mikeottinger  wrote:
>
> > I'm seeing this value using a line like $this->log($created); I'm
> > pretty certain it's more than just formatting because the output of
> > the sorting looked wrong.
>
> It's definitely formatting. A MySQL date column shouldn't look like
> that. Something somewhere is formatting the date or you've got
> formatted strings in the DB itself. Probably the reason the sorting is
> wrong is that it's a string, not a date.
>
> Check the DB directly (from terminal if possible). Use DESCRIBE to
> check the table columns. If the dates all look good then check the
> data Cake returns. Use die(debug($data)).
>
> Also, what does the SQL query look like?

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: Timestamp values not returning the time

2010-12-21 Thread mikeottinger

I'm seeing this value using a line like $this->log($created); I'm
pretty certain it's more than just formatting because the output of
the sorting looked wrong.

Thanks!

On Dec 21, 11:23 am, cricket  wrote:
> On Tue, Dec 21, 2010 at 10:03 AM, mikeottinger  wrote:
> > Hi Guys,
>
> > I really haven't seen any posts that describe my simple problem. I
> > have some rows in the database with the standard created and modified
> > "magi-columns". I need to retrieve a grouping of these rows and sort
> > them by their created date. A lot of these rows are created within
> > minutes of each other, so comparing by their time is important. If I
> > run a SQL statement within phpmyadmin (it's a mysql5 database) I see
> > results like: 2010-11-17 05:43:07. But a find through my Model shows:
> > 11/17/2010 but no time! Any help on this would be greatly appreciated.
> > I'm running cakephp 1.2.7 and php 5.3.2 and the mysqli extension.
>
> Where are you seeing this date? It's been formatted somewhere to look
> like that. Try debugging your data. It should look the same as in the
> database.

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


Timestamp values not returning the time

2010-12-21 Thread mikeottinger
Hi Guys,

I really haven't seen any posts that describe my simple problem. I
have some rows in the database with the standard created and modified
"magi-columns". I need to retrieve a grouping of these rows and sort
them by their created date. A lot of these rows are created within
minutes of each other, so comparing by their time is important. If I
run a SQL statement within phpmyadmin (it's a mysql5 database) I see
results like: 2010-11-17 05:43:07. But a find through my Model shows:
11/17/2010 but no time! Any help on this would be greatly appreciated.
I'm running cakephp 1.2.7 and php 5.3.2 and the mysqli extension.

Thanks!

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


Using the same validation method for create and update modes

2010-10-29 Thread mikeottinger
Hello, I thought I was being clever by defining a custom validation
method called validateUploadedFileExtensions which accepts a couple or
parameters. In my Image model's validation I would then reuse this
method for two rules for a model's field, like this:
'image' => array(
'imageExtension' => array(
'rule' => array('validateUploadedFileExtensions', 'image', true),
'message' => 'Invalid image extension',
'last' => false,
'on' => 'create'
   ),
   'imageExtension' => array(
'rule' => array('validateUploadedFileExtensions', 'image', false),
'message' => 'Invalid image extension',
'last' => false,
'on' => 'update'
   ),
...

But, if I'm validating a collection of Image models as children to a
parent object, and some of the images are new (validating by create)
and some are updates (validating by update), only the validation for
creates are called. Is this a bug, or did they never intend for the
same validation method to be re-used like this?

Thanks in advance.

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


Using schema shell to add a new table

2010-05-31 Thread mikeottinger
Hi Folks, I've seen similar posts to this, but I'm still not having
any luck. I'm playing with the schema shell feature for the first time
on an existing app written in cakephp 1.2.7. I've generated a
schema.php file with an accurate depiction of my mysql database schema
using cake schema generate. Now I'd like to simulate that a separate
developer has added a table to the schema. So I copy the schema.php as
schema_2.php, add a new array definition representing a fake table
called street:

var $streets = array(
'id' => array('type' => 'integer', 'null' => false, 'default' =>
NULL, 'key' => 'primary'),
'name' => array('type' => 'string', 'null' => true, 'default' =>
NULL, 'length' => 50),
'type' => array('type' => 'string', 'null' => true, 'default' =>
NULL),
'created' => array('type' => 'datetime', 'null' => true, 
'default'
=> NULL),
'modified' => array('type' => 'datetime', 'null' => true, 
'default'
=> NULL),
'indexes' => array('PRIMARY' => array('column' => 'id', 
'unique' =>
1))
);

I also created a model for this table in street.php:



I then try this: cake schema run update -dry -s 2. But this for some
reason assumes the street table already exists and indicates that it
will ALTER the table, which is obviously not what I want to do. I also
tried cake schema run create -dry -s 2. This is much more drastic, it
wants to drop all my tables then re-create them, something I
definitely don't want to do.

I'm running:
php 5.3
cakephp 1.2.7
apache2
mysql 5.1.47
mac os x (snow leopard)

Any ideas would be greatly appreciated. Thanks in advance.

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: ideas for handling user added images

2010-05-21 Thread mikeottinger
Thanks for the advice guys. I've taken the path of least resistance
and left everything in the webroot/img directory. I simply make my www
directory the target of an svn export. So...

svn export --force  www

This will output my svn repo to www and the --force flag ensures I
don't wipe out the user added images.

Thanks again!

On May 21, 11:15 am, John Andersen  wrote:
> You can place them outside the application folder, just use Apache
> Alias to map them in under the webroot.
>
> Alias /usr_img "file path to the user image folder"
>
> Enjoy,
>    John
>
> On May 21, 8:27 am,mikeottinger wrote:
>
>
>
> > Hi All,
>
> >   I have a site that allows the user, through an admin section, the
> > ability to upload his own images to the site, a very poor man's CMS if
> > you will. This has all worked pretty well but for one annoying aspect
> > that I finally want to address. Currently all uploaded images are
> > placed in app/webroot/img where they're used with the html helpers.
> > Why I don't like this approach is that these files get mixed in with
> > files under source control. My production server is basically an SVN
> > checkout of the application. Everything is perfectly in synch with SVN
> > except for these user uploaded images. What I had in mind was setting
> > aside a directory outside of the cakephp app instance and have my
> > image paths point to there. This doesn't work because this outside
> > directory is not a document root to the web server. I suppose I could
> > setup a separate host configuration within apache and place them in
> > its document root. Long story short, has anyone devised any better
> > ways to keep user generated content out of the application's directory
> > structure?
>
> > Thanks in advance.
>
> > 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 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


ideas for handling user added images

2010-05-20 Thread mikeottinger
Hi All,

  I have a site that allows the user, through an admin section, the
ability to upload his own images to the site, a very poor man's CMS if
you will. This has all worked pretty well but for one annoying aspect
that I finally want to address. Currently all uploaded images are
placed in app/webroot/img where they're used with the html helpers.
Why I don't like this approach is that these files get mixed in with
files under source control. My production server is basically an SVN
checkout of the application. Everything is perfectly in synch with SVN
except for these user uploaded images. What I had in mind was setting
aside a directory outside of the cakephp app instance and have my
image paths point to there. This doesn't work because this outside
directory is not a document root to the web server. I suppose I could
setup a separate host configuration within apache and place them in
its document root. Long story short, has anyone devised any better
ways to keep user generated content out of the application's directory
structure?

Thanks in advance.

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: fresh install of cakephp 1.3, Fatal Error: Call to a member function cd()

2010-05-06 Thread mikeottinger
Fantastic, thanks for the follow through on this.

On May 6, 5:16 pm, Graham Weldon  wrote:
> Please see the resolution / explanation on Ticket 
> #672http://cakephp.lighthouseapp.com/projects/42648-cakephp-1x/tickets/672
>
> <http://cakephp.lighthouseapp.com/projects/42648-cakephp-1x/tickets/672>
> --
> Cheers,
> Graham Weldonhttp://grahamweldon.com
> e. gra...@grahamweldon.com
>
> On Fri, May 7, 2010 at 7:25 AM, Dave Stevens wrote:
>
>
>
> > I encountered this today and the fix is actually quite simple:
>
> > In /app/config/core.php on line 242, set a default time zone. PHP >=
> > 5.3 produce a warning if this is not set, which appears to be tripping
> > cake up.
>
> > On May 6, 9:27 am, mikeottinger  wrote:
> > > Great, thanks Graham, I'll follow this bug.
>
> > > On May 5, 11:40 pm, Graham Weldon  wrote:
>
> > > > Hmm, thanks for noticing this.
>
> > > > I've filed a bug on your behalf, and we'll look at this shortly.
> >http://cakephp.lighthouseapp.com/projects/42648-cakephp-1x/tickets/672
>
> > > > Cheers,
> > > > Graham Weldonhttp://grahamweldon.com
> > > > e. gra...@grahamweldon.com
> > > > p. (+61) 0407 017 293
>
> > > > On Thu, May 6, 2010 at 4:24 PM, mikeottinger 
> > wrote:
> > > > > So I downgraded php to 5.2.13 and cakephp 1.3 seems to be happy with
> > > > > this. This leads me to my next question, is there some sort of
> > cakephp-
> > > > > to-php compatibility matrix out there? Something like this doesn't
> > > > > seem readily available anywhere.
>
> > > > > Thanks!
>
> > > > > On May 3, 7:14 am, mikeottinger  wrote:
> > > > > > I should mention I'm on apache2, php 5.3.2 as well.
>
> > > > > > On May 2, 11:16 pm,mikeottinger wrote:
>
> > > > > > > Hi Guys,
>
> > > > > > > I saw one post on this that seemed to peter out...  I've a fresh
> > > > > > > install of 1.3, I'm running this in my own installations of
> > apache,
> > > > > > > php and mysql on mac osx snow leopard. All of which run fine
> > aside
> > > > > > > from cakephp. Yet, when I bring up the install in my browser I'm
> > > > > > > confronted with:
>
> > > > > > > Fatal error: Call to a member function cd() on a non-object in /
> > > > > > > Library/WebServer/Documents/cakephptest/cake/libs/cache/file.php
> >  on
> > > > > > > line 244
>
> > > > > > > At first I had the errors with the cache directories not being
> > > > > > > writable. But as soon as I clear that up, I get this. Any ideas
> > out
> > > > > > > there on this? I could go with MAMP if need be, but out of
> > principle,
> > > > > > > I feel I *should* be able to get this working with the
> > configuration I
> > > > > > > currently have.
>
> > > > > > > Thanks in advance.
>
> > > > > > > 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
> > 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 sitehttp://cakeqs.organdhelp
> > others
> 

Re: fresh install of cakephp 1.3, Fatal Error: Call to a member function cd()

2010-05-06 Thread mikeottinger
Great, thanks Graham, I'll follow this bug.

On May 5, 11:40 pm, Graham Weldon  wrote:
> Hmm, thanks for noticing this.
>
> I've filed a bug on your behalf, and we'll look at this 
> shortly.http://cakephp.lighthouseapp.com/projects/42648-cakephp-1x/tickets/672
>
> Cheers,
> Graham Weldonhttp://grahamweldon.com
> e. gra...@grahamweldon.com
> p. (+61) 0407 017 293
>
>
>
> On Thu, May 6, 2010 at 4:24 PM, mikeottinger  wrote:
> > So I downgraded php to 5.2.13 and cakephp 1.3 seems to be happy with
> > this. This leads me to my next question, is there some sort of cakephp-
> > to-php compatibility matrix out there? Something like this doesn't
> > seem readily available anywhere.
>
> > Thanks!
>
> > On May 3, 7:14 am, mikeottinger  wrote:
> > > I should mention I'm on apache2, php 5.3.2 as well.
>
> > > On May 2, 11:16 pm,mikeottinger wrote:
>
> > > > Hi Guys,
>
> > > > I saw one post on this that seemed to peter out...  I've a fresh
> > > > install of 1.3, I'm running this in my own installations of apache,
> > > > php and mysql on mac osx snow leopard. All of which run fine aside
> > > > from cakephp. Yet, when I bring up the install in my browser I'm
> > > > confronted with:
>
> > > > Fatal error: Call to a member function cd() on a non-object in /
> > > > Library/WebServer/Documents/cakephptest/cake/libs/cache/file.php  on
> > > > line 244
>
> > > > At first I had the errors with the cache directories not being
> > > > writable. But as soon as I clear that up, I get this. Any ideas out
> > > > there on this? I could go with MAMP if need be, but out of principle,
> > > > I feel I *should* be able to get this working with the configuration I
> > > > currently have.
>
> > > > Thanks in advance.
>
> > > > 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.comFor
> > > >  more options, visit this group athttp://
> > groups.google.com/group/cake-php?hl=en
>
> > > 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.comFor
> > >  more options, visit this group athttp://
> > groups.google.com/group/cake-php?hl=en
>
> > 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.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> 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: fresh install of cakephp 1.3, Fatal Error: Call to a member function cd()

2010-05-05 Thread mikeottinger
So I downgraded php to 5.2.13 and cakephp 1.3 seems to be happy with
this. This leads me to my next question, is there some sort of cakephp-
to-php compatibility matrix out there? Something like this doesn't
seem readily available anywhere.

Thanks!

On May 3, 7:14 am, mikeottinger  wrote:
> I should mention I'm on apache2, php 5.3.2 as well.
>
> On May 2, 11:16 pm,mikeottinger wrote:
>
>
>
> > Hi Guys,
>
> > I saw one post on this that seemed to peter out...  I've a fresh
> > install of 1.3, I'm running this in my own installations of apache,
> > php and mysql on mac osx snow leopard. All of which run fine aside
> > from cakephp. Yet, when I bring up the install in my browser I'm
> > confronted with:
>
> > Fatal error: Call to a member function cd() on a non-object in /
> > Library/WebServer/Documents/cakephptest/cake/libs/cache/file.php  on
> > line 244
>
> > At first I had the errors with the cache directories not being
> > writable. But as soon as I clear that up, I get this. Any ideas out
> > there on this? I could go with MAMP if need be, but out of principle,
> > I feel I *should* be able to get this working with the configuration I
> > currently have.
>
> > Thanks in advance.
>
> > 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 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: fresh install of cakephp 1.3, Fatal Error: Call to a member function cd()

2010-05-03 Thread mikeottinger
I should mention I'm on apache2, php 5.3.2 as well.

On May 2, 11:16 pm, mikeottinger  wrote:
> Hi Guys,
>
> I saw one post on this that seemed to peter out...  I've a fresh
> install of 1.3, I'm running this in my own installations of apache,
> php and mysql on mac osx snow leopard. All of which run fine aside
> from cakephp. Yet, when I bring up the install in my browser I'm
> confronted with:
>
> Fatal error: Call to a member function cd() on a non-object in /
> Library/WebServer/Documents/cakephptest/cake/libs/cache/file.php  on
> line 244
>
> At first I had the errors with the cache directories not being
> writable. But as soon as I clear that up, I get this. Any ideas out
> there on this? I could go with MAMP if need be, but out of principle,
> I feel I *should* be able to get this working with the configuration I
> currently have.
>
> Thanks in advance.
>
> 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


fresh install of cakephp 1.3, Fatal Error: Call to a member function cd()

2010-05-02 Thread mikeottinger
Hi Guys,

I saw one post on this that seemed to peter out...  I've a fresh
install of 1.3, I'm running this in my own installations of apache,
php and mysql on mac osx snow leopard. All of which run fine aside
from cakephp. Yet, when I bring up the install in my browser I'm
confronted with:

Fatal error: Call to a member function cd() on a non-object in /
Library/WebServer/Documents/cakephptest/cake/libs/cache/file.php  on
line 244

At first I had the errors with the cache directories not being
writable. But as soon as I clear that up, I get this. Any ideas out
there on this? I could go with MAMP if need be, but out of principle,
I feel I *should* be able to get this working with the configuration I
currently have.

Thanks in advance.

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: return data from ajax controller without using an element

2009-09-27 Thread mikeottinger

very cool Miles, I'll definitely give this a spin.

On Sep 27, 11:29 am, Miles J  wrote:
> http://www.milesj.me/resources/script/ajax-handler-component
>
> On Sep 27, 10:21 am, mikeottinger  wrote:
>
> > Excellent, works like a charm, Thanks!
>
> > On Sep 27, 9:51 am, brian  wrote:
>
> > > I believe you can do:
>
> > > $this->autoRender = $this->layout = false;
> > > echo $new_order;
> > > exit;
>
> > > On Sun, Sep 27, 2009 at 3:14 AM, mikeottinger  
> > > wrote:
>
> > > > Hi All,
>
> > > > Very simple question, I have a controller called by an ajax call that
> > > > will return a single number for its response. I couldn't find a way to
> > > > return just that value without going through the process of creating
> > > > an element for it and doing something like this:
>
> > > > $this->set('value', $new_order);
> > > > $this->render('/elements/sort_edit_form', 'ajax');
>
> > > > The contents of the sort_edit_form.ctp are mind-numbingly simple:
>
> > > > 
>
> > > > Anyway to bypass the use of an element and simply return the value
> > > > straight back? Or is this how cakephp insists on doing things?
>
> > > > Thanks in advance.
>
>
--~--~-~--~~~---~--~~
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: return data from ajax controller without using an element

2009-09-27 Thread mikeottinger

Excellent, works like a charm, Thanks!

On Sep 27, 9:51 am, brian  wrote:
> I believe you can do:
>
> $this->autoRender = $this->layout = false;
> echo $new_order;
> exit;
>
> On Sun, Sep 27, 2009 at 3:14 AM, mikeottinger  wrote:
>
> > Hi All,
>
> > Very simple question, I have a controller called by an ajax call that
> > will return a single number for its response. I couldn't find a way to
> > return just that value without going through the process of creating
> > an element for it and doing something like this:
>
> > $this->set('value', $new_order);
> > $this->render('/elements/sort_edit_form', 'ajax');
>
> > The contents of the sort_edit_form.ctp are mind-numbingly simple:
>
> > 
>
> > Anyway to bypass the use of an element and simply return the value
> > straight back? Or is this how cakephp insists on doing things?
>
> > Thanks in advance.
>
>
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



return data from ajax controller without using an element

2009-09-27 Thread mikeottinger

Hi All,

Very simple question, I have a controller called by an ajax call that
will return a single number for its response. I couldn't find a way to
return just that value without going through the process of creating
an element for it and doing something like this:

$this->set('value', $new_order);
$this->render('/elements/sort_edit_form', 'ajax');

The contents of the sort_edit_form.ctp are mind-numbingly simple:



Anyway to bypass the use of an element and simply return the value
straight back? Or is this how cakephp insists on doing things?

Thanks in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



insert elements using javascript

2009-09-20 Thread mikeottinger

Hi All,

  This is sort of an open question, I have a need to insert a section
of a form into a page using javascript. I'd like to leverage elements
for this. Basically, refer to the element from my javascript and have
the ability to replace variables in it. This is something Rails
supports through its RJS framework. Any ideas on whether this is
possible? Has anyone implemented something similar. I'm really trying
to avoid creating a long nasty javascript variable that builds up this
form.

Thanks!
--~--~-~--~~~---~--~~
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: Validation Help

2009-09-15 Thread mikeottinger

Hi Dave, you might check your spelling real quick: minLenght should be
minLength. That's probably why your length validation is always
passing.

On Sep 15, 8:30 am, "Dave Maharaj :: WidePixels.com"
 wrote:
> I am finally getting around to implementing the validation rules but seem to
> be not quite understanding it or something.
>
> I have this set up to validate Username:
> 
> 'username' => array(
>              'user-notempty' => array(
>                   'rule' => array(
>                       'minLenght', 8),
>                   'required' => true,
>                   'allowEmpty' => false,
>                   'last' => true,
>                   'message' => 'User name must be a minimun of 8
> characters.'),
>              'user-unique' => array(
>                 'rule' => array('checkUnique', 'username'),
>                 'message' => 'Username taken. Use another')),
> 
>
> Now it checks the unique factor just fine if there is a match when I test it
> but if i enter a Username that is less than 8 characters it does nothing in
> validation. It passes as OK.
>
> I also can not seem to validate fields that are not  in a database such as
> when I want to change the password. User enters new password in new_pass
> field and new_confirm in new_confirm field. There are no fields in the db
> for these fields but i added :
>
> 'new_confirm' => array(
>              'notempty' => array(
>                   'rule' => array(
>                       'minLenght', 8),
>                   'required' => true,
>                   'allowEmpty' => false,
>                   'message' => 'Please confirm your password.'
>                   )
>              ),
>
> 'new_pass' => array(
>              'notempty' => array(
>                   'rule' => array(
>                       'minLenght', 8),
>                   'required' => true,
>                   'allowEmpty' => false,
>                   'message' => 'Please enter a password with minimum 8
> characters.'
>                   )
>              ),
>
> I read the cookbook validation section and it makes sense to me but
> obviously am doing something wrong.
>
> Ideas where I went wrong?
>
> Thanks
>
> Dave
--~--~-~--~~~---~--~~
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: how to handle general form errors?

2009-09-15 Thread mikeottinger

Thanks Brian for the info. So I actually already use the
FormHelper::error(). Let me paste in some code below to show what I
have and what I'm shooting for. Everything below works, it's just not
quite what I want;

In my user model I'd like to associate the mustMatchRule with the form
submission as a whole, not associated with any particular field. Back
in my struts and spring mvc days with java, you could create field-
specific validations much like CakePHP provides. But there was also
this notion of a global form error, for the scenario where something
about your submission was wrong but it wasn't necessarily confined to
a specific field. I could then, in my markup, render just these global
types of errors completely aside from field specific errors. For
example these global errors could be rendered alongside the submit
button rather than alongside a particular field. Does CakePhp support
anything like this?

Thanks again

//user.php's validation
var $validate = array(
'username' => array(
'notEmptyRule' => array(
'rule' => 'notempty',
'message' => 'missing username'
)
),
'password' => array(
'notEmptyRule' => array(
'rule' => 'notempty',
'message' => 'missing password'
)
),
'password2' => array(
'notEmptyRule' => array(
'rule' => 'notempty',
'message' => 'missing password confirm'
),
'mustMatchRule' => array(
'rule' => 'comparePasswords',
'message' => 'passwords must match'
)
)
);

// my view


create('User', array('action' => 'add'));?>

label('username', 'Username'); ?>
text('username'); ?>

error('username', array('wrap' => 'p', 'class' =>
'error')); ?>

label('password', 'Password'); ?>
password('password', array('style' => 
'margin-bottom:
2px')); ?>

error('password', array('wrap' => 'p', 'class' =>
'error')); ?>

label('password2', 'Confirm Password', 
array('style' =>
'margin-bottom: 15px')); ?>
password('password2'); ?>

error('password2', array('wrap' => 'p', 'class' =>
'last_error')); ?>

end('Submit');?>



On Sep 15, 5:19 am, brian  wrote:
> Use FormHelper::error(). If there is no error for a particular filed,
> it'll return null. So, you can do something like:
>
> error(...) ?>
>
> http://api.cakephp.org/class/form-helper#method-FormHelpererror
>
> On Mon, Sep 14, 2009 at 11:29 PM, mikeottinger  wrote:
>
> > Thanks for the reply. So in your code, this validation is associated
> > with password, so wherever I decide to render validation errors for
> > password, this would be shown there. What if I wanted to render this
> > validation error separately from other field validations? Ultimately,
> > I'd like validation errors for a particular field to be along side the
> > field in question, I'd like more general validation errors such as
> > password mismatch or data uniqueness to be shown in a separate area of
> > the form. Is there a way to render an error for a field, *for* a
> > particular message?
>
> > Thanks again.
>
> > On Sep 14, 8:03 pm, Miles J  wrote:
> >> Add this to your AppModel.
>
> >> /**
> >>  * Validates two inputs against each other
> >>  * @param array $data
> >>  * @param string $confirmField
> >>  * @return boolean
> >>  */
> >> function isMatch($data, $confirmField) {
> >>         $data = array_values($data);
> >>         $var1 = $data[0];
> >>         $var2 = (isset($this->data[$this->name][$confirmField])) ? 
> >> $this->data
> >> [$this->name][$confirmField] : '';
>
> >>

Re: how to handle general form errors?

2009-09-14 Thread mikeottinger

Thanks for the reply. So in your code, this validation is associated
with password, so wherever I decide to render validation errors for
password, this would be shown there. What if I wanted to render this
validation error separately from other field validations? Ultimately,
I'd like validation errors for a particular field to be along side the
field in question, I'd like more general validation errors such as
password mismatch or data uniqueness to be shown in a separate area of
the form. Is there a way to render an error for a field, *for* a
particular message?

Thanks again.

On Sep 14, 8:03 pm, Miles J  wrote:
> Add this to your AppModel.
>
> /**
>  * Validates two inputs against each other
>  * @param array $data
>  * @param string $confirmField
>  * @return boolean
>  */
> function isMatch($data, $confirmField) {
>         $data = array_values($data);
>         $var1 = $data[0];
>         $var2 = (isset($this->data[$this->name][$confirmField])) ? $this->data
> [$this->name][$confirmField] : '';
>
>         return ($var1 === $var2);
>
> }
>
> Then add the validation rule to your Model.
>
> 'password' => array(
>         'isMatch' => array(
>                 'rule' => array('isMatch', 'confirmPassword'),
>                 'message' => 'Your confirmed password does not match'
>         )
> )
>
> Hope that helps.
>
> On Sep 14, 6:26 pm, mikeottinger  wrote:
>
> > Hi All,
>
> >   My apologies if this has been discussed before, giving a search of
> > the forum didn't reveal anything. I'd think this would be easy. I'm
> > attempting the classic validation of two password fields to ensure
> > they're identical. I could get this to work by associating a custom
> > validation method with the password or password2 field. But this
> > doesn't seem the appropriate way to go about doing this. I'd like to
> > handle the validation as a general error to the form in total not a
> > specific, field. Form errors really only deal with a specific field.
>
> > If this isn't possible, can I create the notion of a 'virtual' field
> > that I can associate this validation with?
>
> > Any advice would be greatly appreciated.
>
> > Thanks!
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



how to handle general form errors?

2009-09-14 Thread mikeottinger

Hi All,

  My apologies if this has been discussed before, giving a search of
the forum didn't reveal anything. I'd think this would be easy. I'm
attempting the classic validation of two password fields to ensure
they're identical. I could get this to work by associating a custom
validation method with the password or password2 field. But this
doesn't seem the appropriate way to go about doing this. I'd like to
handle the validation as a general error to the form in total not a
specific, field. Form errors really only deal with a specific field.

If this isn't possible, can I create the notion of a 'virtual' field
that I can associate this validation with?

Any advice would be greatly appreciated.

Thanks!
--~--~-~--~~~---~--~~
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: CakePHP 1.2 Missing Database Table

2009-09-05 Thread mikeottinger

Oh boy, what a difference a night of sleep makes. I went to grab the
model for my missing database table and the problem jumped right at
me:

var $useDbConfig = 'local';

was found at the top of the work.php model, I switched it to 'default'
and voila, it worked. So *this* is another solution for the Missing
Database Table problem as well.

Thanks a lot guys, I hope this is helpful to a fellow newbie such as
myself.

On Sep 5, 4:34 am, Teh Treag  wrote:
> Are your database connection settings different on your production and
> development servers?  Do you have other models that work?
>
> On Sep 5, 1:55 am, mikeottinger  wrote:
>
> > Hi All,
>
> >   I just deployed the beginnings of a new site onto a little
> > development space up on my host server. Everything works great in my
> > local environment. But upon deploy, I see this:
>
> > Missing Database Table
> > Error:  Database table works for model Work was not found.
>
> > I've searched google, and almost every hit mentions clearing files out
> > of tmp/cache/models and tmp/cache/persistent. I've done this, but it
> > still gives me this error. The table it's complaining about is
> > definitely there, I went to the MySQL admin section and saw it there.
>
> > Any ideas on this?
>
> > Oh, I'm running PHP5 as well.
>
> > Thanks in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



CakePHP 1.2 Missing Database Table

2009-09-04 Thread mikeottinger

Hi All,

  I just deployed the beginnings of a new site onto a little
development space up on my host server. Everything works great in my
local environment. But upon deploy, I see this:

Missing Database Table
Error:  Database table works for model Work was not found.

I've searched google, and almost every hit mentions clearing files out
of tmp/cache/models and tmp/cache/persistent. I've done this, but it
still gives me this error. The table it's complaining about is
definitely there, I went to the MySQL admin section and saw it there.

Any ideas on this?

Oh, I'm running PHP5 as well.

Thanks in advance.
--~--~-~--~~~---~--~~
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: textmate snippets not working

2009-09-02 Thread mikeottinger

Hi All,

   So I ditched the bundle and went searching for another source. Lo
and behold I found this:

   http://www.etoxified.com/cakephp-bundle-for-textmate

   It requires git, but I downloaded it refreshed my bundles and
voila, it worked. I'm running textmate 1.5.8, I'm wondering if there
are compatibility issues with this and version of the CakePHP bundle
available through the svn url above. Sort of a shot in the dark in
terms of explanation, but I'm at a loss as to why I couldn't get it
working before. Hopefully this is helpful to others.

Thanks.

On Sep 2, 7:47 am, mikeottinger  wrote:
> Thanks for the help. Yes, there's one bundle, it was a typo. And I
> removed it and reinstalled it within /Library/Application Support/
> TextMate/Bundles like this:
>
> svn cohttp://svn.textmate.org/trunk/Review/Bundles/PHP%20Cake.tmbundle/
>
> I then fired up TextMate, but alas, still no luck. I went into the
> bundle's Snippet directory and listed the permissions there:
>
> -rw-r--r--
>
> Don't these need to be executable?
>
> Thanks again.
>
> On Sep 2, 3:36 am, Martin Westin  wrote:
>
> > Bundles? Unless that's a typo, you might need to stick with one bundle
> > for CakePHP or you might get some conflict.
>
> > I have this 
> > onehttp://svn.textmate.org/trunk/Review/Bundles/PHP%20Cake.tmbundle
> > installed in ~/Library/Application Support/TextMate/Bundles/
>
> > It works as it should for me. "dat" will expand to "$this->data['…']"
> > for example.
>
> > I have a vague memory of some bundle causing me problems because of
> > file permissions. Try chmodding your bundle (which is one of these
> > Apple faux-directories) to make sure Textmate can do it's thing. If
> > you check it out using subversion they should be ok but you never
> > know.
>
> > On Sep 2, 8:15 am, mikeottinger  wrote:
>
> > > Hi All, I've scoured the web and had no luck, I've installed the
> > > bundles for cakephp, I've set the file type for my php file to HTML
> > > (PHP Cake), yet none of the snippets work for me. For instance, I try
> > > typing dat then hitting tab and nothing happens. Is there something
> > > else I'm missing perhaps? Is this not a fully supported bundle
> > > anymore?
>
> > > Thanks in advance.
--~--~-~--~~~---~--~~
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: textmate snippets not working

2009-09-02 Thread mikeottinger

Thanks for the help. Yes, there's one bundle, it was a typo. And I
removed it and reinstalled it within /Library/Application Support/
TextMate/Bundles like this:

svn co http://svn.textmate.org/trunk/Review/Bundles/PHP%20Cake.tmbundle/

I then fired up TextMate, but alas, still no luck. I went into the
bundle's Snippet directory and listed the permissions there:

-rw-r--r--

Don't these need to be executable?

Thanks again.

On Sep 2, 3:36 am, Martin Westin  wrote:
> Bundles? Unless that's a typo, you might need to stick with one bundle
> for CakePHP or you might get some conflict.
>
> I have this 
> onehttp://svn.textmate.org/trunk/Review/Bundles/PHP%20Cake.tmbundle
> installed in ~/Library/Application Support/TextMate/Bundles/
>
> It works as it should for me. "dat" will expand to "$this->data['…']"
> for example.
>
> I have a vague memory of some bundle causing me problems because of
> file permissions. Try chmodding your bundle (which is one of these
> Apple faux-directories) to make sure Textmate can do it's thing. If
> you check it out using subversion they should be ok but you never
> know.
>
> On Sep 2, 8:15 am, mikeottinger  wrote:
>
> > Hi All, I've scoured the web and had no luck, I've installed the
> > bundles for cakephp, I've set the file type for my php file to HTML
> > (PHP Cake), yet none of the snippets work for me. For instance, I try
> > typing dat then hitting tab and nothing happens. Is there something
> > else I'm missing perhaps? Is this not a fully supported bundle
> > anymore?
>
> > Thanks in advance.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



textmate snippets not working

2009-09-02 Thread mikeottinger

Hi All, I've scoured the web and had no luck, I've installed the
bundles for cakephp, I've set the file type for my php file to HTML
(PHP Cake), yet none of the snippets work for me. For instance, I try
typing dat then hitting tab and nothing happens. Is there something
else I'm missing perhaps? Is this not a fully supported bundle
anymore?

Thanks in advance.

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