Re: Can I filter on models deep in a 'contains' ?

2010-04-01 Thread rich...@home
You have to use $this->Model->bindModel() to help cake with the joins: http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM has some examples further down the page. On Apr 1, 4:05 pm, Zac Tolley wrote: > I've done complex selection before, the difference here is that is > seems to split th

Re: Split controller into many files

2010-04-01 Thread rich...@home
300kb sounds very large for even a complex controller. Don't forget: Fat Model, Skinny Controller Move all your controller queries into the model as methods, that should slim down the controllers a bit On Apr 1, 1:27 pm, euromark wrote: > sure > i did that with the user controller (used to be >

Re: recommendable to write view inside html tags?

2010-03-30 Thread rich...@home
A good rule of thumb is: anything that is shared between all pages goes in the layout On Mar 30, 3:10 pm, Jeremy Burns wrote: > My opinion... I think these tags belong inside the layout, and have layout > tags (div etc) in the view so that they appear inside the body tags rendered > by the layo

Re: Disabling passedArgs

2010-03-25 Thread rich...@home
It looks like the ':' delimiter is set in /cake/router.php around line 99: var $named = array( 'default' => array('page', 'fields', 'order', 'limit', 'recursive', 'sort', 'direction', 'step'), 'greedy' => true, 'separator' => ':',

Re: Find Output Thoughts (why the not remove ['ModelName'])

2010-03-25 Thread rich...@home
I'm with WebbedIT on this one. And besides, you can always do something like the following in your controller: $data = $this->Article->read(null, $id); $article = $data['Article']; $this->set(compact("article", "data")); and access $article['name'] etc. in your view. On Mar 24, 7:52 pm, Lucas

Re: HABTM with extra fields frustrations

2010-02-18 Thread rich...@home
Anyone got any ideas as to why I don't get the validation errors from HABTM relationships mentioned above? 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 "

Re: HABTM with extra fields frustrations

2010-02-16 Thread rich...@home
view is empty. Is this a bug? I see that Mark Story has been doing some work on something related ( http://cakephp.lighthouseapp.com/projects/42648/tickets/65-additional-fields-on-habtm-join-tables-wont-get-properly-validated ) and my version of CakePHP has his changes incorporated. On Feb 15

Re: HABTM with extra fields frustrations

2010-02-16 Thread rich...@home
"Tag.0.PostsTag.weight")?> input("Tag.1.PostsTag.tag_id", array("options"=> $tags))?> input("Tag.1.PostsTag.weight")?> end("Submit") ?> On Feb 16, 11:01 am, "rich...@home" wrote: > Many thanks for the reply. I

Re: HABTM with extra fields frustrations

2010-02-16 Thread rich...@home
Many thanks for the reply. I've successfully managed to get my HABTM models saving its extra field. Just for the record, if anyone else is looking for the answer: class Post extends AppModel { var $hasAndBelongsToMany = array( "Tag"=>array( "with"=

HABTM with extra fields frustrations

2010-02-15 Thread rich...@home
Hi all. I'm trying to get my head around HABTM associations with extra fields in the join table, but without much success. So, its confessional debugging time :-) I'm using latest stable release of Cake 1.2.6. Here's what I have so far... My understanding is that if I want to use additional fie

Re: CakePHP backend + Flash frontend

2010-02-09 Thread rich...@home
You could put your flash front in in the root (www.mydomain.com) and then install cake at www.mydomain.com/intranet On Feb 9, 1:20 pm, VitillO wrote: > Hello, im kinda new in Cake, i've always been developing Flash sites > and now im using Cake for the backends (or CMS) for this sites. But im > h

Re: Retrieve data in a model from another unassociated model

2010-02-04 Thread rich...@home
Never mind, found it :-) For anyone else looking for the answer here it is... In model: function foo() { $Setting = ClassRegistry::init('Setting'); $first_class_cost = $Setting->findValue("1st Class"); } On Feb 4, 4:50 pm, "rich...@home" wrote: > H

Retrieve data in a model from another unassociated model

2010-02-04 Thread rich...@home
Hi all. I have a stand-alone (not associated with any other model) Setting model that contains key/value pairs containing user editable values used throughout my app (VAT rate, postal costs etc.) I'd like to get at this Setting data inside another model method (Order::calculateTotal() for example

Re: interesting session problem - session is lost and recovers again randomly

2010-02-02 Thread rich...@home
Are you using IE? And making Ajax calls? or launching applets? I had this problem for the last few days. The fix is to set Configure::write('Session.checkAgent', false); in core.php The reason is: IE sometimes uses a different user agent string when doing ajax calls, and so will any ap

Is HABTM slightly broke in 1.3?

2009-12-17 Thread rich...@home
Seems the edit form multi-select for HABTM relationships doesn't populate previously selected options as it does in 1.2.5. The selected values are in the data returned by Model->read() but the form doesn't show them as selected. Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Strange FormHelper behavior

2009-10-01 Thread rich...@home
or alternatively: create("Model", array("action"=>$this->action)) ?> On Sep 29, 8:11 pm, "euromark (munich)" wrote: > this is the correct way to go: > > echo $form->create('Model',array('url'=>'/'.$this->params['url'] > ['url'])); > > On 29 Sep., 15:00, Django Janny wrote: > > > > > I think yo

Re: javascript link in default.ctp

2009-09-30 Thread rich...@home
AppController doesn't go in the cake/ folder, it goes in your app folder: /app/app_controller.php class AppController extends Controller { var $helpers = array("Html", "Form", "Javascript"); } On Sep 30, 9:17 am, lorenx wrote: > m, ok... > i raised the issue just because the cookbook sa

Re: Translate field names

2009-09-25 Thread rich...@home
No, you only want to translate the label, not the field name : echo $form->input("field_name", array("label"=>__("field_name"))); On Sep 25, 9:19 am, emmexx wrote: > On 25 Set, 02:18, brian wrote: > > > __('field_name') > > Do you mean that I can use in a view something like the following? > >

Re: isUnique Validation for Multiple Fields

2009-09-14 Thread rich...@home
I wrote one a while back and posted it to this group. can't seem to find it now, but here's a link to it stored elsewhere: http://markmail.org/message/nleqrkgtm2ji6sfe On Sep 14, 11:10 am, Shaun wrote: > I have a table called comment_ratings where users can rate comments up > or down.  It look

Re: Help

2009-08-27 Thread rich...@home
Just to clarify mike's point: in your controller: $conditions = array("Property.zip" => $this->data); should be: $conditions = array("Property.zip" => $this->data['Property'] ['zip']); On Aug 26, 10:15 pm, mike karthauser wrote: > hi > you should turn on debug=2 and have a look at your query

Re: Dying on blank white page

2009-08-21 Thread rich...@home
Also worth remembering to clear the app/tmp directories (just the files, leave the directory structures intact) when you upload On Aug 21, 9:22 am, Bert Van den Brande wrote: > I've had blank pages when : > * .htaccess was not working as it should, due to restrictions from > Apache (it needed Al

Re: Differing validation on add and edit methods

2009-08-21 Thread rich...@home
Jonathan Snook posted some very useful code to add this functionality: http://snook.ca/archives/cakephp/multiple_validation_sets_cakephp/ Works like a charm :-) On Aug 20, 5:58 pm, DavidH wrote: > Hi > > Is there a simple way to do this? I have a UsersController and User > method that does a d

Re: If-else within a foreach cycle

2009-08-21 Thread rich...@home
} > > This works! I just can't say how much I am grateful for your help! > However I still don't understand why my code was wrong... > > About your second way: > > $post = $this->Post->read(null, $var); > $post['Post']['options'] = value1; >

Re: If-else within a foreach cycle

2009-08-20 Thread rich...@home
Shouldn't that be: foreach($posts as $p) { if ($p['Post']['id'] == $var) { $p['Post']['options'] = value1; } else { $p['Post']['options'] = value 2; } $this->Post->save($p); } also, if you are just matching against the id, you could just writ

Re: Database Date/Time Functions?

2009-08-19 Thread rich...@home
or... 'conditions'=>array( "Bar.created' >= (NOW() - interval '7 days')" ) On Aug 19, 6:23 am, Elmo wrote: > I would like to use the built in database date/time functions as part > of a 'conditions'. How is this done? > > i.e.: select foo from bar where created >= (NOW() - interval '7 > day

Re: Allowed memory size exhausted - on clean cakephp install

2009-08-17 Thread rich...@home
You can find out the location of the php.ini file your setup is using by creating a php page somewhere with the following line: wrote: > If you had no configuration file your server wouldn't work. > > It will be called php.ini and could be located in any number of places > depending on exactly w

Re: Security.salt

2009-08-14 Thread rich...@home
Any value you like, usually something unique to your site. A random sequence of numbers/text is usually recommended. It's used as a 'seed' for the various hashing functioned used in CakePHP. On Aug 14, 9:20 am, Arun VS wrote: > Hi all members i am new to Cake PHP. I had installCake PHP 1.2.4.82

Re: How to add a style to individual select options?

2009-08-12 Thread rich...@home
Not out of the box, no. There's nothing stopping you creating a ColourPickerHelper of your own though. On Aug 12, 1:45 pm, DavidH wrote: > Hi > > Is there any way of passing style settings for each select option when > using $form->select? > > I've a drop down that allows users to choose a col

Re: login: Auth not setting Session flash

2009-08-03 Thread rich...@home
flash('auth'); ?> http://book.cakephp.org/view/564/Displaying-Auth-Error-Messages On Aug 2, 9:16 pm, brian wrote: > Failed logins are not getting Auth's msg displayed. I've done this > before but I'm about out of ideas why this isn'tworking. Can someone > take a look at this and tell me what I

Re: "approved" field for a model

2009-07-29 Thread rich...@home
Here's a quick tutorial I posted on using containable with paginate: http://richardathome.com/blog/cakephp-pagination-containable On Jul 29, 3:17 pm, JamesF wrote: > well to answer your question about paginate and containable, you can > set 'contain' paramaters on $paginate along with conditio

Re: Form with saving of true/false/null

2009-07-29 Thread rich...@home
I'd use a drop down select instead of an option group. This should do the trick: input("Model.field", array("options"=>array(""=>"No information on subject", true=>"True", false=>"False))); ?> On Jul 29, 12:29 pm, Kanten wrote: > Is there really noone, that can help me with this one? > > Than

Re: isUnique is generating an invalid query and I have no idea why :-(

2009-07-28 Thread rich...@home
Sorted it... I'd made a tiny modification to cake core (dbo_source) to fix another issue. Note to self: Serves you right! On Jul 28, 11:25 am, "rich...@home" wrote: > Bit of an odd one this, and it has only started happening recently in > an application I'm buildin

isUnique is generating an invalid query and I have no idea why :-(

2009-07-28 Thread rich...@home
Bit of an odd one this, and it has only started happening recently in an application I'm building... I'm using CakePHP 1.2.3.8166 The following validation rule: var $validate = array( "name"=>array( "required"=>array(

Re: does anyone try to use cakephp with drupal?

2009-07-23 Thread rich...@home
There's Drake (Drupal CakePHP Bridge) but it hasn't been updated in a long time and there's no port for Drupal 6 :-( http://dev.sypad.com/projects/drake/ Other than that, what exactly are you trying to achieve? On Jul 23, 8:30 am, leon zhang wrote: > does anyone try to use cakephp with drupal?

Re: unique id of computer

2009-07-19 Thread rich...@home
It's worth noting that binp's code will return the mac address of the SERVER, not the client requesting the page. On Jul 18, 6:54 pm, bino dev wrote: >  HiDeeps, > > Chk out this code. > ob_start(); // Turn on output buffering > system(’ipconfig /all’); //Execute external program to display outp

Re: Data Validation - What's wrong?

2009-07-17 Thread rich...@home
Should be: var $validate = array( "module_data" => array( "module_dataRule1" => array( "rule" => "notEmpty", "message" => "empty", "required" => true

Re: views management

2009-07-15 Thread rich...@home
no need to use different directories :-) Check out 'admin routing' in the docs: http://book.cakephp.org/view/544/Prefix-Routing This enables you to make special views for your administrators. For example, the views for a post controller would look like: app/views/posts/ admin_add.ctp admin_edi

Re: Correct Way to save HTML code to database

2009-07-15 Thread rich...@home
"What kind of field are you using to store HTML?" As your new to MySQL its worth emphasising that text fields with the datatype of varchar have a maximum length. Your data may be getting truncated as it's too long to fit in the varchar field. Have you tried increasing the size of the field in th

Re: Save method not working,working only on inserts

2009-07-03 Thread rich...@home
$this->data['Resource']['ID']=1000; should be: $this->data['Resource']['id']=1000; (Models are CapitalisedNoSpaces, fields are all lowercase_underscore) On Jul 3, 6:03 am, sajjan wrote: > Thank you Miles! > > Hmm.. I had tried this and it did not work,but if I put both the lines > below toget

Re: Validate

2009-06-30 Thread rich...@home
I was thinking about this the other day. There are a few validation rules I use in pretty much every controller, such as 'required'. The following *should* work (untested): in AppModel: var $rule['required'] = array( "rule"=>array("minLength", 1), "message"=>"cannot be blank", "requ

Re: Time redirection in cakePHP ?

2009-06-30 Thread rich...@home
CakePHP is still PHP, header() works just fine :-) On Jun 29, 8:49 pm, "Techinfocomp.com" wrote: > header("refresh:5; url='pagetoredirect.php'"); > > we can use this if we want to redirect our page in 5 second , > > is there any way to redirect page in 5 second in cakephp ? > > if yes please let

Re: app attempting to insert records rather than update

2009-06-18 Thread rich...@home
Forget about storing the id in a session and just include the field in the form. Cake will automatically hide it from the user. On Jun 18, 8:55 am, Jon Chin wrote: > I'm building a scholarship application using Cake.  I have an > Application model and a Merit model and I'm using a wizard compone

Re: 500 Internal Server Error

2009-06-12 Thread rich...@home
*Might* be an out of memory error: Try increasing the size that PHP is allowed to consume in your php.ini file. You will need to restart Apache for the change to be registered. Search for "memory_limit" (without the quotes). *Might* be a cached path problem: delete all the files in the app/tm

Re: Showing 2 paginated list in a same page.

2009-06-10 Thread rich...@home
I got this working using AJAX using this bakery article as a starting point: http://bakery.cakephp.org/articles/view/easy-ajax-pagination-using-jquery On Jun 5, 1:24 pm, Cjo wrote: > Hi all, > > I have requirement where I have to show two paginated list in the User > Home page. > > I have bee

Re: Sub templating

2009-06-10 Thread rich...@home
or alternatively (not tested, may not work), create a subscribers folder in elements: app/ views/ elements/ subscribers/ subview1.ctp subview2.ctp and in your view: element("subscribers/subview1); ?> That way you'll keep your subviews whi

Re: Confirmable Behavior: is there something similar?

2009-06-05 Thread rich...@home
I think the way CakePHP handles the delete links is very bad practice tbh. The delete action should be through a POST not a get. Also, protecting it with Javascript doesn't help if your site is being spidered... A better approach is to create your own delete($id) method AppController (so its avai

Re: Drake, still functioning?

2009-06-05 Thread rich...@home
Looks like development has stalled on Drake, it doesn't support the latest version of Drupal :-( On Jun 4, 6:20 pm, jwerd wrote: > I am curious if anyone has used the new CakePHP 1.2.3.8166 Stable with > Drake, or rather, is it still the solution to combine Cake with > Drupal? > > TIA > Jake --~

Re: Cache Views?

2009-06-02 Thread rich...@home
Are you using IE? IE has an annoying habbit of caching ajax responses, and the only reliable way to get round it is to append a random string to the end of the request url as an additional parameter. /controller/model/param1/param2/my_random_param/ On Jun 2, 5:59 am, "Dave Maharaj :: WidePixels

Re: Count array

2009-05-29 Thread rich...@home
or count($this->data['Entry']) On May 29, 4:13 am, Marcelo Andrade wrote: > On Thu, May 28, 2009 at 11:05 PM, Dave Maharaj :: WidePixels.com > > wrote: > > > Whats the easiest way to count the number of items in an array? I use the > > data in the array so its more than just a count. > > > I si

Re: users/edit function cake changes the password even when no password is provided

2009-05-28 Thread rich...@home
If you are using the Auth component, Auth will hash the blank password. The workaround I've found for this is to use a dummy password field (e.g. new_password) instead of the real password field, then in your controller::save() do if (!empty($this->data) { if (!empty($this->data['Model']['n

Re: Possible Bug? $this->find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
I'll try and get a test case done at work tomorrow. That said, I've never written a unit test before but I can post the code required to duplicate it easily... On 28 May, 17:51, Gwoo wrote: > test case? this could be a problem with the proper defaults not being > set for the table. --~--~---

Re: set and field of more words

2009-05-28 Thread rich...@home
Close, it should be: postOfTheMonths :-) On May 28, 9:11 am, fain182 wrote: > > I'm having some trouble figuring out what the problem is here. Could > > you clarify why you want a variable name with spaces? > > ok, i want to have a form->input() that make me a select, for example, > if the fie

Re: Possible Bug? $this->find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
eing cast from a null to a string somewhere before this code is being executed and the absolutely equal (===) is failing because the datatype of a null string is different to the null its being compared to. Should I ticket this? On May 28, 3:22 pm, "rich...@home" wrote: > In the mod

Re: Possible Bug? $this->find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
Sorry, should have made that a bit more clear: The value is coming from a form posting. The value is a PHP null in the form post array so the condition is actually: $price = $this->Price->find("first", array( "conditions"=>array( "Price.product_id"=>$data['OrderDetail']['

Possible Bug? $this->find for NULL values uses wrong syntax

2009-05-28 Thread rich...@home
In the model: $this->find("first", array( "conditions"=>array( "OrderDetail.id"=>"" ) ; Produces the following SQL where clause: WHERE `OrderDetail`.`id` = NULL That will never match any records (comparing anything directly with NULL always results in NULL,

Re: 400 Bad Request when URL contains %

2009-05-26 Thread rich...@home
Still struggling with this one. After a bit more rigorous testing the above doesn't work :-( Anyone who has fixed this issue want to share their wisdom? :-) On May 14, 4:39 pm, "rich...@home" wrote: > After even more testing: > > Add the following to Ap

Re: Un-needed Controllers

2009-05-21 Thread rich...@home
No, you can't. If you remove them you will get a controller not found error when you go to your bookmarks pages On a side note, you can remove the $uses line as CakePHP automatically adds the model associated with the controller (unless your AppController explicitly sets $uses = array() ) On May

Re: Poll: what do you hate about CakePHP?

2009-05-21 Thread rich...@home
One minor niggle-ette for me: I hate how form helpers $form->create() doesn't default to the current actions (it defaults to add). I always end up having to type: create("User", array("action"=>$this->action)) ?> oh, and another: $html->css() defaults to inline, it should default to putting it

Re: displaying records in index through specific field content

2009-05-20 Thread rich...@home
$data = $this->Model->find("all", array( "conditions"=>array( "RelatedModel.field"=>$value ) )); ? On May 20, 7:55 pm, programguru wrote: > My situation is simple, but I have yet to find a solution that actually does > what I need. > > And I am not sure at what level the data requirements shoul

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
de(urlencode($value)); } Fixes the pagination links Brain too tired to worry about the long term problems this might introduce right now... On May 14, 4:06 pm, "rich...@home" wrote: > Edit after more testing: > > Still not good, paginator links doen't

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
Edit after more testing: Still not good, paginator links doen't double encode so it breaks when a pagination link is clicked :-( On May 14, 3:42 pm, "rich...@home" wrote: > More investigation: There's a related ticket open: > > https://trac.cakephp.org/ticket/

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
} } return $url; } - takes posted form data and returns a url array suitable for passing into $this->redirect($url); On May 14, 3:08 pm, "rich...@home" wrote: > I'm back trying to fix this issue and it's starting to be a bit of a > p

Re: 400 Bad Request when URL contains %

2009-05-14 Thread rich...@home
I'm back trying to fix this issue and it's starting to be a bit of a pain :-( This is definitely a problem with the default CakePHP setup because if I create a simple php file: index.php: http://example.com/index.php?a=% and don't get a bad request (even though technically it IS a malformed url)

Re: really really lost

2009-05-12 Thread rich...@home
It sounds like they have a dev version of the site tucked away in the webroot. Live site -> http://www.example.com/ Dev site -> http://www.example/com/dev/ On May 12, 2:56 am, Braydenstyles wrote: > my previous devs had a working website live for us but now the devs > are gone and i've been tr

Re: No multiple select. Why?

2009-05-10 Thread rich...@home
If you don't want to add them by hand ever time. I've written a function that will do it for you: http://www.richardathome.com/blog/cakephp-auto-populating-foreign-key-dropdown-fields On May 8, 3:16 pm, brian wrote: > Did you fetch a list of Users in your controller? FormHelper can only > work

Re: How to load jquery from google in cakephp

2009-05-08 Thread rich...@home
link("http://www.google.com/jsapi";); echo $javascript->codeBlock("google.load('jquery', '1.2.3');"); ?> or alternatively: link("http://jqueryjs.googlecode.com/files/ jquery-1.3.2.min.js") ?> On May 8, 10:35 am, dnoop wrote: > I just wanted to load jquery from google  like > > http://www.goo

Re: CakePHP or Symfony Which is the Best?

2009-05-08 Thread rich...@home
Define your criteria for 'best' ;-) On May 8, 12:41 pm, Sarika wrote: > Hi Friends, > > Which PHP framework is the best? Symfony or CakePHP > What are the advantages and disadvantages over one another. > All of you, please share your opinion. > Thank you. > > Regards, > Sarika --~--~-~--

Re: Problems with hidden input on submit

2009-05-07 Thread rich...@home
Can you post your form code and controller action code? On May 7, 1:06 pm, lucas wrote: > Hi, i have this problem that is killing me slowly jeje, in my view a > have about 14 or 15 hidden inputs cause i need them in the edit > action. But when i submit the page, one of them is not submitted and

Re: Is it possible to set the index of a select box after populating it with find('list')?

2009-05-05 Thread rich...@home
You can pre-populate the $this->data array: In your controller method: $this->data['Model']['field'] = 1; (where 1 is value you want to pre-select) or, in the view: input("field", array("options"=>$options, "default"=>1) ? > On May 4, 9:56 pm, qwanta wrote: > In the controller I do a find(

Re: index view values showing as id value and not string value

2009-05-05 Thread rich...@home
You'll need to post your code before anyone has a hope of helping you here ;-) On May 5, 6:13 am, programguru wrote: > does anyone know why the values being pulled into my index view are id values > as opposed to the literal string value of the field? > -- > View this message in > context:http:

Re: Required form field NOT marked with "required" CSS class

2009-04-29 Thread rich...@home
"need the opposite: IF the field is present, it must NOT be empty (and it must be unique). " IF it doesn't have to be present, its NOT a required field ;-) To make CakePHP add the required classes you must include the addition rule "required"=>true e.g. var $validate = array( 'name' => array

Re: Tips for cutting queries and load time?

2009-04-27 Thread rich...@home
If I remember correctly, the ARO/ACO tables are not indexed by default (this may have changed in later versions of cake). On Apr 25, 10:08 pm, Miles J wrote: > Make sure you have indexes set on your database. --~--~-~--~~~---~--~~ You received this message because

Re: /app/plugins/content/vendors/js/tiny_mce doesn't work properly

2009-04-27 Thread rich...@home
I've got tinymce working in a cake app, but I didn't put the code in /app/plugins/content/vendors/j s/tiny_mce I put it in /app/webroot/js/tiny_mce On Apr 26, 3:49 pm, Evert wrote: > When I create a link to tiny_mce.js the javascript file is found, no > problems there. > But when I initialize

Re: input name data[_method]

2009-04-27 Thread rich...@home
See my solution to an allmost identical problem: http://groups.google.com/group/cake-php/browse_thread/thread/51aec944f860a708/89496a7d5f64542a?q=#89496a7d5f64542a On Apr 27, 10:48 am, Telegu wrote: > nobody can help me? > > On Apr 18, 4:02 pm, Telegu wrote: > > > yes to save my data correctl

Re: contain HABTM

2009-04-25 Thread rich...@home
You don't need contain, unless you want the post data too: $this->Post->Subject->find("all", array( "conditions"=>array( "Subject.post_id"=>$post_id ) ); If you do need the post data, brian's solution should work just fine. On Apr 25, 5:21 am, brian wrote: > This doesn't work? > > $thi

Re: Plugin for MySQL Workbench: Who to contact?

2009-04-25 Thread rich...@home
I downloaded the 5.1 Beta OSS and installed the plugin. Created a schema no problems, but only for copying to the clipboard (no biggy tbh) :-) Unfortunately, there seems to be a bug in 5.1(not the plugin) that stops exports from producing inserts (for inital seeding of the database). So its bac

Re: Plugin for MySQL Workbench: Who to contact?

2009-04-24 Thread rich...@home
I never even KNEW there was a CakePHP plugin for WB! Damn, that's going to save me even more time! :-) On Apr 23, 3:01 pm, Karsten Wutzke wrote: > I'm referring to > > http://forums.mysql.com/read.php?155,258646,258824#msg-258824 > > The CakePHP plugin for MySQL Workbench is supposed to be wor

Re: Newbie requires help! :)

2009-04-13 Thread rich...@home
Looks good. All I can suggest is to triple check you've named your files correctly (case matters) and put them in the correct place. On Apr 13, 7:21 pm, Beedge wrote: > Hi all. > I recently decided that I got to get trained up in using a php > framework as up till now Ive been handcoding everyt

Re: Change App Base URL

2009-04-11 Thread rich...@home
I'm guessing you still have all the old directory information cached. go to app/tmp/ and remove all the files in all the subfolders but leave the subfolders intact. On Apr 11, 12:58 pm, AD7six wrote: > On Apr 11, 12:36 pm, CapeTownGuy wrote: > > > Hi, > > > I installed an application in the ro

AppController not loaded for missing controller pages

2009-04-08 Thread rich...@home
In my AppController, I set a bunch of view variables in the beforeFilter() {} callback. I use these view variables ($authUser) in the layout to for e.g. a welcome block. If the user goes to a page that doesn't exist, then AppController isn't loaded at all and these view variables aren't populat

Re: 400 Bad Request when URL contains %

2009-04-04 Thread rich...@home
It's getting passed by a form search form submission as a GET request. On Apr 4, 12:12 am, Miles J wrote: > Why is the % there in the first place? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Re: 400 Bad Request when URL contains %

2009-04-03 Thread rich...@home
Yup, I know it should be url encoded. But if you URL encode it, it STILL produces a 400 error because it STILL contains a '%' Strange that the only CakePHP site that I can find that copes with it without an error is the CakePHP website. http://cakephp.org/pages/% So, what are they doing right t

Re: Why is it so hard to find answers on cakephp trouble?

2009-03-26 Thread rich...@home
If your original post doesn't get any attention it may be because the problem hasn't been explained well enough for someone to help. There's nothing stopping you coming back to a question to add a bit more clarification :-) This also has the added benefit that sometimes, as you clarify the probl

Re: Validating based on different fields

2009-03-26 Thread rich...@home
You can use your own validation functions in your model for this: class Article extends AppModel { var $validate = array( "name"=>array( "rule"=>"myRule", "message"=>"you failed myRule!" ) ); function myRule($data) { // $data contains the value of 'name' // $t

Re: Form validation without model

2009-03-06 Thread rich...@home
How to do validation without a database table: You still need a model. For a concrete example, check out Snook's CakePHP contact form: http://snook.ca/archives/cakephp/contact_form_cakephp/ Where to put common controller functions? Create a component. Hope this helps On Mar 5, 11:00 pm, D4rko