Re: Poll: what do you hate about CakePHP?

2009-05-20 Thread GreyCells
tomatically creating a text version (if text template is undefined). If you're creating a plain text email, you probably don't want/need an html version. On May 19, 8:13 pm, brian wrote: > On Tue, May 19, 2009 at 12:21 PM, GreyCells > wrote: > > > 4. Having to provide

Re: Poll: what do you hate about CakePHP?

2009-05-19 Thread GreyCells
Not so much hates, but frustrations when coding new apps (I'm sure you've heard them all before, Nate:) 1. Auth, Session and Email should all be fat models with a thin component interface if required. 2. More callbacks in Auth, Session and Email to allow logging + App specific behaviour. (via Ap

Re: Perfomance in CakePHP

2009-04-28 Thread GreyCells
sign and a replication strategy would be great places to start. Apologies, I can't remember who's sig it is, but the best advice I've heard on the topic is: "Just build it, damnit!" ~GreyCells On Apr 28, 12:06 pm, keyurvaghani wrote: > Hello folks, > Can anybody please

Apache segmentation fault on r7597

2008-09-18 Thread GreyCells
I'm experiencing a segmentation fault on Apache2 (LAMP) for r7597, but only if debug is set to 0. r7596 is fine. I've checked all file permissions that I can think of. I /think/ it's something to do with the require'd (rather than uses(...)) files being require'd more than once but I can't see any

Re: TIP :: checkUnique on Update solution

2008-01-25 Thread GreyCells
For 1.2 this functionality exists in Model->isUnique() and was updated to deal with updates. See http://api.cakephp.org/1.2/class_model.html#e631f2cba7ec7fff079d3a7b62c46f0e and https://trac.cakephp.org/ticket/2032 ~GreyCells On Jan 25, 7:17 pm, Josoroma <[EMAIL PROTECTED]> wrote: &g

Re: Propagating validationErrors from Behavior to View

2008-01-25 Thread GreyCells
s a bit kludgy, even though the two-model concept 'feels' right. ~GreyCells On Jan 25, 12:47 pm, grigri <[EMAIL PROTECTED]> wrote: > Controller, Model, View and Helper all have a class variable called > 'validationErrors'; > > When Model::invalidFields()

Propagating validationErrors from Behavior to View

2008-01-25 Thread GreyCells
l back to the View/form? I know I need to populate the View->validationErrors, but I don't want to interfere with the automagic error handling of the primary model. ~GreyCells --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

$View->renderLayout and $scripts_for_layout

2007-10-02 Thread GreyCells
ienced this and has found a different workaround. ~GreyCells --~--~-~--~~~---~--~~ 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 th

Re: About cakephp's performance

2007-07-11 Thread GreyCells
;s path as your data grows - just because it's not using an index on your dev data does not mean it will not on your prod data. In other words, make sure your volume test data reflects the distribution and cardinality of records in your prod data. ~GreyCells On Jul 11, 8:35 am, Marcus <[

Re: Generating unique TokenFields for SecurityComponent

2007-07-10 Thread GreyCells
;ve changed anything significant. If it comes back as I apply security to other pages, I'll dig a bit deeper. The magic of cake casts it's spell on me again :) ~GreyCells On Jul 10, 1:38 pm, GreyCells <[EMAIL PROTECTED]> wrote: > I appear yo be able to submit all forms in vario

Re: Generating unique TokenFields for SecurityComponent

2007-07-10 Thread GreyCells
me to investigate all the options yet. ~GreyCells On Jul 10, 11:50 am, AD7six <[EMAIL PROTECTED]> wrote: > On Jul 10, 10:53 am, GreyCells <[EMAIL PROTECTED]> wrote: > > > I'm starting to use the SecurityComponent in 1.2 mainly to ensure > > integrity of hidden fields

Generating unique TokenFields for SecurityComponent

2007-07-10 Thread GreyCells
tionally, it obviously means the document fails validation. Is this expected behaviour SecurityComponent, or have I missed (yet another) trick? ~GreyCells --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake P

Re: Flay and Other Markup Translation Tools

2007-07-05 Thread GreyCells
Thanks Geoff I had considered bbcode but (apparently) our target audience would be more familiar with a wiki-style markup (thanks Wikipedia:) The bakery helper is certainly good to know about tho'. ~GreyCells On Jul 5, 12:25 am, Geoff Ford <[EMAIL PROTECTED]> wrote: > BBCode i

Re: Render view without layout

2007-07-04 Thread GreyCells
I'd suggest you create an element containing the common markup from the first page and call $this->renderElement('my/element') from both pages. There may be other solutions, but this worksforme. On Jul 4, 5:07 pm, Contrid <[EMAIL PROTECTED]> wrote: > Hi there, > > Within my current view, I want

Flay and Other Markup Translation Tools

2007-07-04 Thread GreyCells
for the bakery. Textile is another obvious choice, but by default allows raw html (and my implementation/fix for that feels like a bit of a kludge). So... any recommendations for implementing a clean cake-ish solution for allowing untrusted users

Re: My view cache do not work?

2007-07-04 Thread GreyCells
it's multiple cache engines - I've only used the file cache engine so far and it does exactly what it says on the tin. If you /really/ want to cache views, then transform the data before caching it. ~GreyCells On Jul 4, 12:31 pm, Fordnox <[EMAIL PROTECTED]> wrote: >

Re: thread created count for cakephp sites

2007-05-02 Thread GreyCells
ads_running 1098' on a small site... ~GreyCells @Chris It appears connections are not always closed at end of script: http://uk2.php.net/mysql_connect (top comment) :) but cake seems to behave impecably. On May 2, 1:56 pm, redhex <[EMAIL PROTECTED]> wrote: > GaryCells: > My qu

Re: thread created count for cakephp sites

2007-05-02 Thread GreyCells
Google is your friend: http://www.google.co.uk/search?q=mysql+threads_created First hit: http://jeremy.zawodny.com/blog/archives/000173.html ...might help. ~GreyCells On May 2, 7:21 am, redhex <[EMAIL PROTECTED]> wrote: > Hi all, > I am doing monitoring for my site which is ca

Re: Saving empty fields to the DB.

2007-04-20 Thread GreyCells
$this->Person->set('name', null); before saving. ~GreyCells On Apr 20, 8:25 pm, Leandro Lucarella <[EMAIL PROTECTED]> wrote: > Hi! I'm having a problem when editing data. Let's say I have a persons > table, with id and name columns. I create a new row (

Re: Manual invalidate in 1.2

2007-04-19 Thread GreyCells
ch/ too short/weak etc. Then (again) if new_passwd and confirm_passwd fields are not empty, set the database passwd field to your hash in beforeSave(). ~GreyCells On Apr 19, 9:31 pm, hepper <[EMAIL PROTECTED]> wrote: > If some could explain hove to invalidate a field manual in the &g

Re: allowEmpty in validate

2007-04-19 Thread GreyCells
bases... ~GreyCells (aka TheDatabasePedant) On Apr 18, 11:59 pm, nate <[EMAIL PROTECTED]> wrote: > As of 1.2 current SVN: > > function beforeValidate() { >$this->data[$this->name] = Set::filter($this->data[$this->name], > true); >return true; >

Re: allowEmpty in validate

2007-04-19 Thread GreyCells
You should care about empty strings. An empty string is not null, so SELECT ... WHERE col IS NULL; will return a different record set to SELECT ... WHERE col = ''; It will also effectively invalidates any NOT NULL constraints on your database - an empty string is not null. ~GreyCells

Re: allowEmpty in validate

2007-04-18 Thread GreyCells
pends if you're a pedantic db developer or not :) ~GreyCells. On Apr 18, 10:18 pm, rtconner <[EMAIL PROTECTED]> wrote: > Wow did you pick an ambiguous name for that then. Holy misleading > batman. > > So how the heck do I do what I want to do? I can't help but think &g

Re: composed primary key

2007-04-18 Thread GreyCells
that: move all the > records to another (temp) table, truncate the table, and add the pre- > existing records back. That would reset the ID. > > GreyCells wrote: > > I think you mean compund primary key. See: > > >http://groups.google.com/group/cake-php/browse_thread/threa

Re: composed primary key

2007-04-18 Thread GreyCells
because mysql can't recycle sequences... ~GreyCells On Apr 18, 6:14 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Apr 18, 2007, at 10:08 AM, christianandradet wrote: > > > I don't know what to do, how do i define the composed primary

Re: Your client and cakePHP

2007-04-18 Thread GreyCells
7;d be very nervous allowing a third party to introduce potentially exploitable code into a production site. ~GreyCells On Apr 18, 5:55 pm, beetlecube <[EMAIL PROTECTED]> wrote: > For those who have done PHP development for a client, and used cakePHP > to build their sites, a question: &g

Re: Model SubTypes & Database Design

2007-04-18 Thread GreyCells
a pure design perspective - hence the multitude of ORM tools/projects out there. Just pick the simplest route first and refactor if it doesn't work out :) @gwoo: Are there any technical reasons why PrintAdvertisement cannot extend Advertisement? (i.e. framework complications rather that app c

Re: Problem with Model::afterSave() callback

2007-04-17 Thread GreyCells
Davide Why not just build the path when selecting the record? (afterFind() will do). You do not have to duplicate the record's id in the path column. If you must work around the framework lifecycle, then direct $model- >execute('UPDATE blah, blah') calls will work. ~GreyCell

Re: Writing a test case for controller->params (special characters truncate routes)

2007-04-16 Thread GreyCells
l me otherwise, I think this means '%26' cannot be used in cake urls unless they are in the query string. ~GreyCells On Apr 16, 8:16 pm, "GreyCells" <[EMAIL PROTECTED]> wrote: > When using urlencode (or rawurlencode), any keys set up in Routes > appear to truncate at

Writing a test case for controller->params (special characters truncate routes)

2007-04-16 Thread GreyCells
' =>''); $this->assertEqual($result, $expected); which passes, but the following appears in $this->params: [searchName] => Fred [url] => Array ( [url] => search/Fred [Barney] =>

Re: routing: custom sitename before EACH controller

2007-04-08 Thread GreyCells
I think this may be what you're looking for: http://groups.google.com/group/cake-php/browse_thread/thread/71be76876702c64d/268e6000dc8665d5?#268e6000dc8665d5 ~GreyCells On Apr 7, 10:41 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote: > I've read the article on routi

Re: How to generateList with more than more value per key?

2007-04-07 Thread GreyCells
http://groups.google.com/group/cake-php/browse_thread/thread/b32341e00a1324bb/916efdf548c20b68?lnk=gst&q=afterfind+fullname&rnum=1#916efdf548c20b68 On Apr 7, 12:43 pm, "zen" <[EMAIL PROTECTED]> wrote: > Hi, Cake noob here... > > I've been searching for a while for this... > but can't seem to find

Re: how to deal with $this->User->findById('3')['User']['name']

2007-04-07 Thread GreyCells
If you find you're writing the same old find($conditions, $fields) time after time, why not encapsulate it as a method on your User model class? e.g. : User->findMyUserStuff($userId); And you get extra 'DRY' points :) If you're just fetching one field then use $model-&g

Re: Dynamic Images

2007-04-05 Thread GreyCells
our /img/cache directory. If successful, redirect back to the original image or pipe the image straight back. This works extremely well for me, so I hope the functionality doesn't go away :) HTH ~GreyCells On Apr 5, 1:11 am, "rtconner" <[EMAIL PROTECTED]> wrote: > It seem

Re: Curious incidence of infinitely nested recurring views

2007-04-03 Thread GreyCells
Trac now raised as an enhancement ('cos it works OK if you get the datatypes right.. :) https://trac.cakephp.org/ticket/2340 ~GreyCells On Apr 3, 4:18 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > https://

Re: Curious incidence of infinitely nested recurring views

2007-04-03 Thread GreyCells
a big pile of pants on your screen when passing a non-array (however it is that I'm managing to do that :) ~GreyCells --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gro

Re: Curious incidence of infinitely nested recurring views

2007-04-03 Thread GreyCells
has occured in other installs. Having been on the receiving end of many, many 'it doesn't work' support calls, I prefer, at the very least, to work out how to replicate the issue before logging a bug. (or at least try my hardest to :) ~GreyCells On Apr 3, 4:18 pm, "Maria

Curious incidence of infinitely nested recurring views

2007-04-03 Thread GreyCells
have not yet been able to find the specific release that trigger this, as I can bring the libs bang up to date without any problems. Next time it occurs, I'll work backwards, one release at a time... Has anyone else experience this? GreyCells Warning (2): array_merge() [function.array-

Re: Foreign Keys and Cake Naming Conventions

2007-04-03 Thread GreyCells
visit your design - I work with schemas that have tens of thousands of tables/views and cannot think of a true 'link' table amongst them. HTH GreyCells On Apr 3, 3:18 am, "uk_maul" <[EMAIL PROTECTED]> wrote: > Here is an example of what I was trying to ask: >

Re: Accessor like command in CakePHP

2007-03-22 Thread GreyCells
y been retrieved via $this->Model->find() or comes from the controller- >data ) . Note that model->set has two ways of being used. If you create a form field 'Model/my_checkbox' this will be in the controllers data array - which is the same structure as the model data array so

Re: bug on $html->charset()

2007-03-22 Thread GreyCells
Hi gui Can I suggest you raise a bug report via https://trac.cakephp.org/ ? I'd do it for you, but you have not provided version info etc. ~GreyCells On Mar 22, 7:48 pm, "guigouz" <[EMAIL PROTECTED]> wrote: > HtmlHelper's charset() method generates something lik

Re: Thank You for CakePHP

2007-03-16 Thread GreyCells
re I can. I hope the community continues to > grow in a positive way. I'll second that. ~GreyCells --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send

Re: 1.2 Changes to $form->create()

2007-03-16 Thread GreyCells
etting the 'value' option stops the notice, but is probably not the right solution :) HTH ~GreyCells On Mar 16, 2:53 pm, "nate" <[EMAIL PROTECTED]> wrote: > Oh, to further clarify, you don't need to specify *both* 'action' and > 'url'. Ju

Re: 1.2 Changes to $form->create()

2007-03-16 Thread GreyCells
Sorry, that should've been "..'admin' has moved /from/ the middle of the URL..." On Mar 16, 3:20 pm, "GreyCells" <[EMAIL PROTECTED]> wrote: > Thanks Nate > > I originally thought that 'url' replaced action, but couldn't get

Re: 1.2 Changes to $form->create()

2007-03-16 Thread GreyCells
;admin' has moved to the middle of the URL (which breaks my routes expecting to see :myKey at the beginning), the form id has 'Edit' in the middle (which plays havoc with my JavaScript) and 'url' is displayed which (I don't think) is not a valid attribute for 'for

1.2 Changes to $form->create()

2007-03-16 Thread GreyCells
e undergoing some major changes (as you would expect) & is also raising a couple of php notices (for undefined 'id' and 'value'). If you'd like a ticket, let me know. ~GreyCells --~--~-~--~~~---~--~~ You received this message bec

Re: email form

2007-03-13 Thread GreyCells
This is not a bug - I thought it was too, but see: https://trac.cakephp.org/ticket/2026 You need to override loadInfo() in the model.. ~GreyCells On Mar 6, 11:47 am, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Ok can you do us bakers a favour and report this tohttps

Re: Flame On! DB recommendations

2007-03-10 Thread GreyCells
Chis' advice: "Just build it, damnit!" :) ~GreyCells On Mar 9, 7:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm in the planning stage of what will hopefully become my first non- > trivial web app. I'm trying to minimize future pai

Re: best practice multiple checkboxes

2007-03-02 Thread GreyCells
en looked at the 1.1 code (which I think is in HtmlHelper, not FormHelper), but there is no reason why you couldn't do the same thing in 1.1. Once the 1.2 FormHelper stabilizes a bit, I'll clean up the FormxHelper or better still, create a patch to integrate into the core if the devs wou

Re: Switch Element On/Off

2007-03-01 Thread GreyCells
ive :) Interesting discussion here: http://groups.google.com/group/cake-php/browse_thread/thread/7786024149ca244b/efeb2a04e537e6b1?lnk=gst&q=stutchbury+view&rnum=1#efeb2a04e537e6b1 ~GreyCells On Feb 28, 7:44 pm, "phirschybar" <[EMAIL PROTECTED]> wrote: > Hey all.. > >

Re: Include Js file in layouts

2007-02-28 Thread GreyCells
te the second arg 'false' on $javascript->link). ~GreyCells On Feb 21, 9:51 am, "CraZyLeGs" <[EMAIL PROTECTED]> wrote: > The head helper isn't part of the core. > it was written by rossoft and it's available in his blog > > On Feb 20, 9:33 am,

Re: findAll with NOT LIKE

2007-02-28 Thread GreyCells
There is also the function model->escapeField() e.g.: $this->Article->escapeField('text')." NOT LIKE '%cheese%'" A very useful function for those awkward SQL conditions. ~GreyCells On Feb 28, 12:00 pm, "jyrgen" <[EMAIL PROTECTED]> wrote:

Re: 1.2: isUnique - beforeValidate only on add, not on edit?

2007-02-27 Thread GreyCells
https://trac.cakephp.org/ticket/2032 might help. On Feb 27, 7:22 pm, "Cynthia" <[EMAIL PROTECTED]> wrote: > I found the cool new model::isUnique. It works great with > beforeValidate (as the example gave) but I can't get it to do anything > when I update a record. > > Setting it to beforeSave doe

Re: Model::save() and multicolumn primary key?

2007-02-27 Thread GreyCells
Gres etc - these change on update or replication) Application Keys (single column Primary Key constraints - in practice, these are immutable) Business Constraints (Unique Keys, Compound Primary Keys etc - these frequently change on update) Now, if you want to *know* which record you're

Re: Model::save() and multicolumn primary key?

2007-02-27 Thread GreyCells
lumns as part of the key, so only one combination can exist. . > > All IMO of course :), > > AD Ditto ~GreyCells --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to t

Re: Include Js file in layouts

2007-02-20 Thread GreyCells
If you're using 1.2, then take a look here: http://cake.insertdesignhere.com/posts/view/17 The HeadHelper functionality is implemented in the core. ~GreyCells On Feb 20, 8:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I want to include javascript file in layo

Re: 1.2 validation - This field cannot be left blank

2007-02-18 Thread GreyCells
ntegration of custom functions in the > built in validation would allow me to switch to 1.2 completely. I'll take > the random API changes for granted when i could do that now. > > Tijs > > > > GreyCells-2 wrote: > > > The way it appears to work now (I'm

Re: 1.2 validation - This field cannot be left blank

2007-02-18 Thread GreyCells
The way it appears to work now (I'm sure nate will correct me if I'm wrong) is to put your error messages in the model. Here is an example of an email validation: var $validate = array( 'email_address' => array( array('allowEmpty' => false ,'message' => 'Invalid email add

Re: Sending emails

2007-02-13 Thread GreyCells
If you are using $this->Email->send('Simple email content'); then you need to explicitly set the template to null. See: https://trac.cakephp.org/ticket/2105 ~GreyCells (Thought I'd sent this earlier, but it didn't show up...?) On Feb 13, 12:17 pm, "thequie

Re: Sending emails

2007-02-13 Thread GreyCells
If you are using $this->Email->send('Simple email content'); then you need to explicitly set the template to null. See: https://trac.cakephp.org/ticket/2105 ~GreyCells (Thought I'd sent this earlier, but it didn't show up) On Feb 13, 12:17 pm, "thequietlab"

Re: email component example

2007-02-13 Thread GreyCells
If you are using the send('simple text') then you must explicitly set the template to null first. See: https://trac.cakephp.org/ticket/2105 ~GreyCells On Feb 13, 10:55 am, Ámon Tamás <[EMAIL PROTECTED]> wrote: > Hello, > > I like to use the email component, but