Batch file script to create DB for sample project

2012-09-29 Thread Jon Thor Austen
If anyone cares, I created a Batch file script to create DB for sample project that is located here: http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html --- Here is the script, which might need very slight modification to be proper : https://gist.github.com/

Re: Problem with CakePlugin on shared server

2012-01-26 Thread Jon Price
; email so the op didn't think he was crazy. On Thu, Jan 26, 2012 at 8:34 AM, Sam Sherlock wrote: > Odd. Have you tried setting up advanced setup with cake baked projects? > > Also is foo a copy of bar? > > - S > On 26 Jan 2012 13:14, "Jon Price" wrote: > &g

Re: Problem with CakePlugin on shared server

2012-01-26 Thread Jon Price
Interesting..I've seen this as well but rareand thought I had misconfigured something. They are 2.0.x installs on a debian style linux. On Thu, Jan 26, 2012 at 4:38 AM, Eric wrote: > Hi! > > I have several CakePHP installations on a server, two of them are 2.0 > (recent installs). I now noti

Re: TinyMCE issue - CakePHP 2.0.4

2012-01-13 Thread Jon Price
Have you tried using this plugin? http://cakedc.com/eng/downloads/view/tinymce On Fri, Jan 13, 2012 at 3:35 PM, mike karthauser wrote: > 13 Jan 2012, at 20:10, Ishan Talathi > wrote: > > > Hi, > > > > I am trying to use TinyMCE in a text area for an Add form. > > > > It works with the sample cod

Re: File Upload Plugins

2011-12-28 Thread Jon Price
try this: http://milesj.me/code/cakephp/uploader I'm using his autologin component but he has other code you might look into. On Wed, Dec 28, 2011 at 9:02 PM, Timothy O'Reilly < timothy.john.orei...@gmail.com> wrote: > Thanks for responding. Was just hoping someone had a cool plugin (with > featu

Re: How to reference field on parent table from within delete function?

2011-12-17 Thread Jon Price
If you are trying to do conditions as part of the delete command, you need deleteAll which accepts an array of conditions in the first parameter Otherwise do the test before you move on to the delete command. Think of delete as deleteById only. On Dec 17, 10:25 am, Daniel wrote: > I have an image

Re: role-base authentication

2011-11-26 Thread Jon Bennett
n/simple-acl-controlled-application.html -- jon bennett - www.jben.net - blog.jben.net -- 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

Re: How to "cache" certain data from being loaded everytime a request is made

2011-11-11 Thread Jon Bennett
> Ever heard of a session? Ever heard of caching ;) try: $data = Cache::read('model.list'); if (empty($data)) { $data = $this->Model->find('list'); Cache::write('data.list', $data); } If you don't cache if for too long you won't need to worry about positively-expiring it when th

Re: Group Based ACL

2011-11-08 Thread Jon Bennett
> Has anybody seen any good tutorials for group based permission under > ACL with cakephp 2.0? I have been trying to get my code to work, but I > appear to be doing something wrong. http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-applic

Re: CakePHP2.0.1 - Problem with saving HABTM

2011-11-06 Thread Jon Bennett
> Ok, I've upgraded to 2.0.2, changed the code of > EpisodeReleaseController.php, and i have fixed the add problem. Now I > am building the edit function. I have used the console cake bake > controller to create it, but it seems that each time I press save it > adds a new association. > Example; >

Re: error while running shell as cron

2011-11-04 Thread Jon Bennett
On 4 November 2011 13:09, abhimanyu bv wrote: > 1.3it is > > On Fri, Nov 4, 2011 at 6:27 PM, euromark wrote: >> >> cake1.3 or 2.0? >> >> On 4 Nov., 13:35, abhimanyu bv wrote: >> > I am getting the following error when cron is running- 'PHP Fatal >> > error:  Class 'Shell' not found in /var/www/w

Re: Problem with echo in the controllers with CakePHP 2.0.1 and 2.0.2 on NGINX

2011-11-04 Thread Jon Bennett
> Same for behavior as you described for me on cake 2.0.2 nginx ubuntu if > echoing from controller... Interesting that one can no longer echo from the controller though, much more tailing required when debugging :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakeph

Re: Problem with echo in the controllers with CakePHP 2.0.1 and 2.0.2 on NGINX

2011-11-04 Thread Jon Bennett
> Same for behavior as you described for me on cake 2.0.2 nginx ubuntu if > echoing from controller... > > I guess its better to use a Views, this works: > > Controller : > > public function registerc() { >        $data = ……….. >        $this->set(compact('data')); >        $this->layout = false;

Re: CakePHP2.0.1 - Problem with saving HABTM

2011-11-02 Thread Jon Bennett
> I've had some similar trouble with 2.0 > turned out the fields in the DB were not the same type. > id on one table was a bigint and the foreign key on the relationship table > was a regular integer. > atenciosamente, With MySQL you can catch these errors at db schema level if you use foreign ke

Re: Implementing a search functionality

2011-11-01 Thread Jon Bennett
> I hope we all know that I was being ironic. ^^ Don't think that's irony, more sarcasm ;) j -- 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 question

Re: Moving part of a Tree in other section

2011-10-23 Thread Jon Bennett
> Just changing the parent_id. How to change the tree also? How are you changing the parent_id? -- 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 questi

Re: Embedding CakePHP in existing page

2011-10-22 Thread Jon Bennett
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...@google

Could not describe table Error: An Internal Error Has Occurred.

2011-09-06 Thread Jon F
't figure out for the life of me why the describe query is failing. I have manually described the table in question with no problems. Any help would be greatly appreciated! Thanks, Jon -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new Cake

Re: Fatal error: Maximum execution time of 60 seconds exceeded in

2011-06-21 Thread Jon Bennett
> Multiple choice: > > 1) replace webroot/index.php with the following: > > Hello world! > > 2) read error message, think a bit > > 3) post error message, and some relevant, unedited, code. option 1 is my fav. j -- jon bennett - www.jben.net - blog.jben.net

Re: What is the way to make Sub Pages

2011-06-01 Thread Jon Bennett
iew - have a look at the stop pages controller, it uses func_get_args, you could just look for the final item. Cheers, J -- jon bennett - www.jben.net - blog.jben.net -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site htt

Re: cakephp 1.3.10 - URL rewriting is not properly configured on your server

2011-06-01 Thread Jon Bennett
k for url rewriting' validation - work out why and file a bug report :) J -- jon bennett - www.jben.net - blog.jben.net -- 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 wi

Re: Static Username

2011-06-01 Thread Jon Bennett
so yep, as a controller extension it is only available inside the controller. As a Mike suggested, you can find the user and log them in from the controller without a http post request, or you could even just recreate the session that auth expects and then redirect to another page (not login though). h

Re: Cache problem using CakePHP default File config on apache 1.3.x - server crashes

2011-04-20 Thread Jon Bennett
cake bug, but growing pains, by the sounds of it. hth Jon -- jon bennett - www.jben.net - blog.jben.net -- 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 relat

Re: Naming conventions and database naming question

2011-03-08 Thread Jon Phenow
This was very helpful, thanks a lot. I'm very new to Cake and this explained a good chunk I was confused about. On Mon, Mar 7, 2011 at 5:41 PM, cricket wrote: > On Mon, Mar 7, 2011 at 6:16 PM, jphenow wrote: > > Okay so two questions very related: > > > > 1) Does following the naming conventio

Re: SWF Uploader ... or any Good One...?

2011-02-12 Thread Jon Bennett
'simUploadLimit' : 1, 'queueSizeLimit' : 100, 'fileDataName' : 'data[Document][filedata]' }); }); The nice thing about this is you have one upload method which

Re: error: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted when writing session

2011-02-11 Thread Jon Bennett
l. > How could be the reason, I am pretty annoyed by this issue already!!  Hope > someone can help me out, Thanks How much data are you writing to the session? Does it vary between users? -- jon bennett - www.jben.net - blog.jben.net -- Our newest site for the community: CakePHP Video Tuto

Re: CakePHP 1.3.7 released

2011-02-03 Thread Jon Bennett
to have 2 User associations, I don't see how that could work. What's wrong with 'Subscription' as the alias? Cheers, J -- jon bennett - www.jben.net - blog.jben.net -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out t

Re: Need advice for custom ACL

2011-01-26 Thread Jon Bennett
> HiJohn thx for your response > > acting that way will bloat my app > i have hundreds of possible combinations :\ Not sure what else to suggest, interested to hear if/how you solve it! -- jon bennett - www.jben.net - blog.jben.net -- Our newest site for the community: CakePHP Vid

Re: Need advice for custom ACL

2011-01-26 Thread Jon Bennett
u: 1. Have multiple views per auth type, stops you needing to hide/show form fields 2. Have multiple Models that connect to the same table, each with a different set of validation rules 3. Use the correct model above in your controller and views ... which would mean your ACL logic stays in the con

Re: Complex Search

2011-01-26 Thread Jon Bennett
Hi Steve, Sounds like you need to use the 'joins' param in a find and skip containable, here's the manual page http://book.cakephp.org/view/872/Joining-tables hth Jon On 26 January 2011 10:37, Steve wrote: > Unfortunately using Containable did not work as I would have hop

Re: php statement as to appear replaced in views

2011-01-24 Thread Jon Bennett
ts (array_key_exists($currentUserId, $arrayOfUsers)) then don't show the form input. I would assume if you give the option to favourite something, you probably should have the option to undo that as well. hth jon > > The table for favorites I have is: > >  id     in

Re: Proper MVC structure in CakePHP

2011-01-23 Thread Jon Bennett
as this allows you to get just the data you need. -- jon bennett - www.jben.net - blog.jben.net -- 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 ques

Re: Sorting feature

2011-01-17 Thread Jon Bennett
in' params, ime it's best to set contain to false and then add your fields manually to your find params. hth j -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received th

Re: Cake source code optimization

2011-01-10 Thread Jon Bennett
ould already minimize the include process > delay doesn't using an opcode cache like APC makes minifying php source completely pointless? j -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP rel

Re: CakePHP + nginx + VPS

2011-01-05 Thread Jon Bennett
ebroot <- this is the nginx doc root. All you need in webroot/index.php for the above to work is to point cake at the correct version, eg: define('CAKE_CORE_INCLUDE_PATH', ROOT.'/libs/cakephp/cakephp-1.3.1'); My good pal Andy has a blog post with an nginx conf on it

Re: paginate posts substring body which uses tinymce - do i substr in the paginate or at the view?

2011-01-03 Thread Jon Bennett
something like http://davidwalsh.name/php-paragraph-regular-expression would do it. You could easily wrap that into a helper method, or if you need it in a lot of places, you could grab in the afterFind of your model and add an extra field to your dataset. hth Jon -- jon bennett - www.jben.net -

Re: How to use Grant in Shell ?

2010-12-31 Thread Jon Bennett
change, depends how complex your app is (I would suggest starting simple until you grasp the fundamentals) 3 you'll definitely need to change to match your requirements. hth Jon ps: don't forget to disable the actions when you deploy to live! -- jon bennett - www.jben.net - blog.jben.

Re: query

2010-12-30 Thread Jon Bennett
> but i want OR between semeter_id and program_id that was definitely not how your original SQL was written. J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received t

Re: query

2010-12-30 Thread Jon Bennett
;=>array( 'Enrollment.semester_id'=>12, 'Enrollment.batch_id'=>23, ) ) ); $this->Enrollment->find('all', array( 'conditions'=>$conditions )); hth Jon -- jon bennett - www.jben.net -

Re: DbAcl Failed ARO/ACO node lookup (SOLVED accidentally)

2010-12-30 Thread Jon Bennett
hi john, > DbAcl and iniAcl > > Which one do we commonly use ? Depends on what you need. I go with DbAcl myself. -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You rece

Re: Help, Stuck here: 5.1.3.2 Creating Access Request Objects (AROs) and Access Control Objects (ACOs)

2010-12-30 Thread Jon Bennett
eceived 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

Re: DbAcl Failed ARO/ACO node lookup (SOLVED accidentally)

2010-12-30 Thread Jon Bennett
ok.cakephp.org/view/1549/An-Automated-tool-for-creating-ACOs and http://book.cakephp.org/view/1550/Setting-up-permissions you'd be in the same position with dbAcl as you are with iniAcl, however depending on your requirements iniAcl may be perfectly adequate. hth Jon -- jon bennett - www.jben.n

Re: how to use transactions in cakephp

2010-12-23 Thread Jon Bennett
it will wrap any subsequent saveAll's as well - not certain on that, worth checking! not used the datasource way of doing it, sorry. hth Jo -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related qu

Re: how to use transactions in cakephp

2010-12-23 Thread Jon Bennett
to follow cake > way of doing things. Use innodb and connect your keys/tables correctly. Use saveAll not save and it will wrap all the SQL into a single transaction. hth Jon -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Memcache Set up Help

2010-12-05 Thread Jon Bennett
de.com are meant to be good, though I've not used. j -- jon bennett - www.jben.net - blog.jben.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 Group

Re: CakePHP high CPU utilization

2010-10-25 Thread Jon Bennett
fcgi + nginx, why not take apache out of > picture if the problem has been proven to go away? this may help http://kevin.vanzonneveld.net/techblog/article/cakephp_and_nginx/ Cheers, J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org

Re: CakePHP high CPU utilization

2010-10-25 Thread Jon Bennett
apache out of picture if the problem has been proven to go away? -- jon bennett - www.jben.net - blog.jben.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 Group

Re: Multi-table search

2010-09-20 Thread Jon Bennett
> Create a view or a stored procedure in your database and call it instead of > using find. Or write it as plain old SQL in a custom model function, nothing forcing you to use cake's ORM. j -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Question

Re: Datasource

2010-09-02 Thread Jon Bennett
gt; 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 > -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org

Re: tree behaviour and big table

2010-09-01 Thread Jon Bennett
> then i think i should drop lft and rght fields and use parent_id only > (without tree behavior) > and probably cache the views you loose a lot of functionality - why not try BTree, looks good to me. J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Quest

Re: tree behaviour and big table

2010-08-31 Thread Jon Bennett
..@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received thi

Re: tree behaviour and big table

2010-08-31 Thread Jon Bennett
roups > "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: preprocess data returned from SELECT

2010-08-25 Thread Jon Bennett
and-bolts-of-cakephp.com/2008/09/29/dealing-with-calculated-fields-in-cakephps-find/ perhaps. If you can stomach upgrading to cake 1.3, you could use the new Virtual Fields functionality http://book.cakephp.org/view/1610/Using-virtual-fields hth Jon > > On Aug 25, 9:06 am, Jon Bennett wr

Re: CakePHP 1.3 setup on Ubuntu

2010-08-25 Thread Jon Bennett
o the vhost directly, and pointing the doc root at app/webroot. Cheers, Jon > > Thanks! > > > > On Aug 24, 3:27 pm, Marek Sebera wrote: >> Are files .htaccess placed in root,app and app/webroot ? >> >> On 24 srp, 18:22, david wrote: >> >> >> &

Re: Slow Page Load due to 100's of ACL Queries

2010-08-25 Thread Jon Bennett
up first! nb, this is the SQL cake runs (first time in the session with SessionAcl) to determine access to a particular controller method http://pastie.org/1115224 Also, make sure you have indexes on your tables, eg http://pastie.org/823086 Hth, j > > -mike > > > On Aug 25, 6:4

Re: preprocess data returned from SELECT

2010-08-25 Thread Jon Bennett
> array and each varbinary() field is recognized as that type.  What > function do i need to look at/change to accomplish this? perhaps you could wrap this up into a single method, looping over it in an afterFind (or just on the results) before running the second query? J -- jon benn

Re: Slow Page Load due to 100's of ACL Queries

2010-08-25 Thread Jon Bennett
d once per row in >> the AROS table.  There are 1374 items in that table, most are links to >> users. >> >> I inherited this site and I am just starting to learn CakePHP.  Can >> anyone explain why this is happening and what I need to change to stop >> it? What

Re: Slow Page Load due to 100's of ACL Queries

2010-08-25 Thread Jon Bennett
gt; the AROS table.  There are 1374 items in that table, most are links to > users. > > I inherited this site and I am just starting to learn CakePHP.  Can > anyone explain why this is happening and what I need to change to stop > it? try http://bakery.cakephp.org/articles/view/ac

Re: Re: Update view data after validation failed

2010-08-11 Thread Jon Bennett
> $this->set('data', $this->Model->data); > > You're setting a View variable $data, which is different than the > controller's $this->data. Try: > > $this->data = $this->Model->data; Nope, that doesn't do it. It seems like the dat

Re: Update view data after validation failed

2010-08-11 Thread Jon Bennett
ler, but it feels a little dirty doing so. thanks, J -- jon bennett - www.jben.net - blog.jben.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 "C

Update view data after validation failed

2010-08-11 Thread Jon Bennett
they were posted. Is there some hidden data somewhere I need to reset, perhaps in the Form helper? Cheers, Jon -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this messag

Re: image watermark plugin

2010-08-02 Thread Jon Bennett
> lol seriously, it's not that hard, though you really need the to use imagemagick not GD. Google imagemagick watermark, and then adapt something for cake. hth j -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help oth

Re: Upload Photo Using PHP

2010-07-30 Thread Jon Bennett
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.g

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Jon Bennett
you could use getpath, eg: count($this->Model->getpath($id, array('id'))); hth Jon On 30 July 2010 12:45, Tomatosoup wrote: > Hello, > > Does anybody know of a function like generatetreelist that seperates > the depth from the value. Instead of counting the sp

Re: adding additional jquery functionality on cake 1.3

2010-07-29 Thread Jon Chin
gives me a good start! On Fri, Jul 23, 2010 at 10:54 AM, cricket wrote: > On Fri, Jul 23, 2010 at 3:13 AM, Jon Chin wrote: > > I followed the tutorial for getting Jquery set up on Cake 1.3, but now > I'm > > having trouble getting Jquery plugins to work. I haven't b

Re: Compare 2 dates in cakePHP

2010-07-28 Thread Jon Bennett
me($this->data[$this->alias]['end_date']); > } > > Also, note the ternary operator isn't strictly required because > lessthan returns a boolean.. ahh yes - cleaner, like it. -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site

Re: Compare 2 dates in cakePHP

2010-07-28 Thread Jon Bennett
try: public function compareDates() { return ($this->data[$this->alias]['start_date'] < $this->data[$this->alias]['end_date']) ? true : false; } var $validate = array('start_date'=>array('rule'=>'compareDates'))

Re: PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-28 Thread Jon Bennett
. > > About your argument: domaingo (cheap brand of domainfactory) has php > 5.3 support and its 0.99 cent/month (plus maybe setup fees) on a > shared host... If your client refuses to pay that I think you won't > sell anything worth the work of creation and selling anyway, sor

Re: PHP 5.2 no longer supported (Implications for cake 2.0) ??

2010-07-27 Thread Jon Bennett
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:/

adding additional jquery functionality on cake 1.3

2010-07-23 Thread Jon Chin
I followed the tutorial for getting Jquery set up on Cake 1.3, but now I'm having trouble getting Jquery plugins to work. I haven't been able to find any webpages or tutorials for this, so I'm asking here. I think what I need to do is somehow get the code for the plugin to get added to the buffer

Re: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread Jon Bennett
nd 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

Re: FULL TEXT SEARCH

2010-07-16 Thread Jon Bennett
>   i am using ordinary search functionality in my business controller . but > now need to implement FULL TEXT SEARCH. > can any one give idea ?? Thanks in advance > take a look at http://code.google.com/p/searchable-behaviour-for-cakephp/ j -- jon bennett - www.jben.net - blog.jbe

Re: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread Jon Bennett
> I'm try upgrade to 1.2. Why not upgrade to 1.3? j -- jon bennett - www.jben.net - blog.jben.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 Googl

Re: SaveAll weird behavior

2010-07-12 Thread Jon Bennett
p association (you can use contain to not include it in finds later on), and then have the condition that denotes whether it's a Father or Child in the form, eg: echo $this->Form->input('Relationship.0.id'); echo $this->Form->input('Relationship.0.name'); ec

Custom Cache Engine 1.3

2010-07-08 Thread Jon Bennett
Hi bakers, I need to tweak some aspects of Cake's cache class (specifically the way it rewrites keys). I've written a custom cache engine, but it's not loading from app/libs/cache/custom.php, and I'd rather not stick it in cake/libs/cache/custom.php Cheers, J -- jon be

Re: can't update data that is entered in form

2010-07-08 Thread Jon Bennett
hod. hth J -- jon bennett - www.jben.net - blog.jben.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,

Re: Which is the best hosting server for CakePHP?

2010-06-29 Thread Jon Bennett
slicehost.com I have sites with bytemark and slidehost, linode were lacking a backup solution but they now have that in place. Hth, J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related question

Re: Cant edit records with primary is varchar (32)

2010-06-21 Thread Jon Bennett
n his schema at fault here. j -- jon bennett - www.jben.net - blog.jben.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 po

Re: Cant edit records with primary is varchar (32)

2010-06-21 Thread Jon Bennett
oincrement either). You > can use whatever field type you like for a primary key - cake doesn't > care (unless it's a char 36 in which case it'll assume you want > automatic uuids). e.g. you could if you were so inclined use a bool > and juggle your two rows. As you say A

Re: Cant edit records with primary is varchar (32)

2010-06-21 Thread Jon Bennett
n that case I'd use char(36) as cake expects rather than varchar(32) j -- jon bennett - www.jben.net - blog.jben.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 th

Re: Cant edit records with primary is varchar (32)

2010-06-21 Thread Jon Bennett
> i tried do save save a model which primary is a varchar (32). Nothing > special > > When i call save() it throws me a fatal error Read the conventions - Cake requires primary_keys to be auto-incrementing integers. J -- jon bennett - www.jben.net - blog.jben.net Check out the

Update $this->data after failed validation

2010-06-21 Thread Jon Bennett
the user know and give them the option to confirm it. Thanks, Jon -- jon bennett - www.jben.net - blog.jben.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 Googl

Re: 1.3 prefix routing.

2010-05-28 Thread Jon Bennett
hers > 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+unsub

Re: 1.3 Wildcard routing

2010-05-28 Thread Jon Bennett
I have been doing that since Nate suggested it back in 2008, perhaps I should revisit routes in newer versions of cake! Grateful for any pointers. J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related que

Re: 1.3 Wildcard routing

2010-05-28 Thread Jon Bennett
On 28 May 2010 15:18, AD7six wrote: > > > On May 28, 12:44 pm, Jon Bennett wrote: >> hi, >> >> In 1.3, how hard is it to route a controller action to >> /slug/child-slug/grandchild-slug and keep other, automatic routing in >> place? Do you still need to exp

1.3 Wildcard routing

2010-05-28 Thread Jon Bennett
ray('controller'=>'articles'), array('action' => 'admin_add|admin_edit|admin_index|admin_delete|admin_status') ); previously, but would be even better if I could do the above but skip all the method names. Cheers, J -- jon bennett - www.jben.net -

Re: How do I save a field on my User without breaking the ACL?

2010-05-24 Thread Jon Chin
I tried that and have the same result. Do I need to unbind a relationship or something? On Mon, May 24, 2010 at 2:06 PM, Filipe Teles Rodrigues < filipe.t2...@gmail.com> wrote: > I use $this->User->save($this->data) instead of saveField. > > 2010/5/24 Jon Chin > &

How do I save a field on my User without breaking the ACL?

2010-05-24 Thread Jon Chin
I'm using Auth and db ACL, but I have an action that screws up my ACL records every time. I have ACL set up just like the Book instructs. I'm building a "change password" page where I want to just update the password. I run the following commands: $this->User->id = $this->Session->read('Auth.Us

Routes in 1.3

2010-05-05 Thread Jon Bennett
d-code 10 routes rather than attempt to match a varying number of categories in a url. thanks for any insight. Cheers, J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You receiv

Re: The docs for Containable does not work for complex search. Complex search is 2 models away. For cake 1.3

2010-05-02 Thread Jon Bennett
u where to place the conditions. my way is correct as of 1.3 > Cakephp return $this->find('first', array( // conditions for the main model 'conditions'=>array(), // contain 'contain'=>array( 'User'=>array(

Re: How do I get Acl working?

2010-04-29 Thread Jon Chin
e the restrictions set. > > > > On Thu, Apr 29, 2010 at 8:03 AM, Jon Chin wrote: > >> I just did a global search and I don't have that anywhere. Maybe I did >> something wrong in my AppController? >> >> class AppController extends Controller { >> var

Re: How do I get Acl working?

2010-04-28 Thread Jon Chin
oller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array('controller' => 'projects', 'action' => 'index'); $this->Auth->actionPath = 'controllers/'; } } On Wed, Apr 28, 2010 at 8

How do I get Acl working?

2010-04-28 Thread Jon Chin
I'm having a bit of a problem getting Auth+ACL working. I've followed the Simple Acl Controlled Application example in the Cake book. It *is* correctly locking out unauthenticated users from the system. However, all authenticated users are able to access all ACOs in my site, even if the group the

Re: Using Non-Inline Css in Element

2010-04-24 Thread Jon Bennett
ntered. How do you suppose the > call to $html-css() is supposed to reserve the link to be included in > $scripts_for_layout, rather than included inline? Ahh - he's rendering the element in the layout! yep, you're quite right! doh (me). J -- jon bennett - www.jben.net - blog.j

Re: Using Non-Inline Css in Element

2010-04-24 Thread Jon Bennett
akephp) helpers to echo rather than return, but I think that's been removed in 1.2. I realise this hasn't helped much! j -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. Yo

Re: 1.3rc4 and saveAll, strange return values

2010-04-21 Thread Jon Bennett
ave in a single transaction, which means none of the records will be saved, and the invalid fields highlighted in your form. When not using transactions, saveall is probably a bad idea as you say, some things get saved, some things don't. hth Jon -- jon bennett - www.jben.net - blog.jben.net

Re: mac users, which ide are you using to develop cakephp?

2010-04-19 Thread Jon Bennett
> No ide, just Textmate for me. +1 though reckon it's also due for an update... j -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because

Re: Problem setting the page title with the $pageTitle variable

2010-04-17 Thread Jon Bennett
le variable and the $this- >>set('title', 'Foo bar'). My layout has the $title_for_layout; ?> line in it. > > Does somebody had the same problem? Did something got altered in this > new version? Can someone give some light? http://book.cakephp.org/view/1564/Contro

Re: AppController being cached?

2010-04-16 Thread Jon Bennett
right app files? It's sounds implausible to me that this could happen, opcode cache's don't store changes. J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You receive

Re: CouchDB as a datasource

2010-04-14 Thread Jon Bennett
DB datasource http://rad-dev.org/lithium_bin hth (and doesn't miff any cakers for pointing in a different direction!). J -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

  1   2   3   4   5   6   7   8   9   >