Re: Auth/Twitter/Safari issues - logged out of my Cake site after authenticating with Twitter, only on Safari

2010-02-24 Thread WebbedIT
I've done some work with EPITwitter but I'm currently re factoring the site I had it in. I will be working on it again later this week early next week so will test my implementation, which is possibly different to yours, and will feedback what I find. HTH Paul. Check out the new CakePHP

Re: Counting in the Index View

2010-02-24 Thread WebbedIT
@Cale: Cake has some more automagic goodness that helps with this situation perfectly. http://book.cakephp.org/view/816/counterCache-Cache-your-count Let cake automatically keep a count of vote counts and store them in the object being voted on, this means your doing less database calls as you

Re: Question about relationships, extending the blog tutorial

2010-02-24 Thread WebbedIT
Can you show us the structure of your table? It seems Cake is not able to find that field. 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.

Re: I can't list my files from the uploads folder (when app is online). Everything works local.

2010-02-24 Thread WebbedIT
A blank page with no content on it can often mean you have the security component enabled and it's blackholed the request. Do you use Firefox and FireBug or something else that can give you data on what is being requested and returned? Check out the new CakePHP Questions site http://cakeqs.org

Re: I can't list my files from the uploads folder (when app is online). Everything works local.

2010-02-24 Thread WebbedIT
As a side note, I think the cost of the official TincyMCE ImageManager plugin is well worth it. I have it implemented and it looks really professional and allows you to create and manage sub folders, float images left/right within your TinyMCE editor, apply vspace and hspace and quite a bit more.

Re: saveAll() returns false

2010-02-24 Thread WebbedIT
@Nico: Slight correction to your suggested associations@ var $belongsTo=array('Login'); and the Login.php should have var $hasMany=array('User'); Can you do an echo debug($this-data); in your controller to show the submitted data, and an echo debug($this-validationErrors); in your view and

containable query numbers

2010-02-24 Thread LosCrickos
Hello, Here is a siplified representation of my data model: *Photos -ID -etc *Tags -ID -label -group_id *Tags_Photos (table de jointure) -ID_Photo -ID_tag *Groups -ID -label In english: * A Photo has N Tags (hasAndBelongsToMany with a joint table) * A Tag belongs to a Tag

Re: How do I add custom validation in controller?

2010-02-24 Thread WebbedIT
You can add validation rules to your models for fields which do not exist in the table, think of the common password confirm field when registering a user. Validation requires those fields to pass whatever rules you set, but save ignores them. Much cleaner to process your validation with one

Re: Checking existence of variable passed to an element

2010-02-24 Thread WebbedIT
Good shout, using beforeRender() to set common variables for the view that are not required by the controller's logic is a good practice. Anything that cuts down repetition is :o) Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

Re: Howto publish legal notice

2010-02-24 Thread WebbedIT
If you want to edit your test in using web forms, or a WYSIWYG type interface then you will need to store the data in a database. Reading the Cookbook and following the Blog Tutorial will give you a good overview of the work you need to undertake. http://book.cakephp.org/

Re: Default Routes

2010-02-24 Thread Mohsin kabir
I think , You missed to upload the .htaccess file in the root directory , in /app directory and in /webroot directory . Plz check them. On Feb 24, 5:43 am, p_W paulwoolcoc...@gmail.com wrote: When I am using cake in a development setup, and access the application athttp://localhost/, the

Re: Need help with Custom paginate and paginator methods

2010-02-24 Thread WebbedIT
The note at the top of the page link you supplied gives a strong indication that the developers do not believe that custom pagination is ever required. I certainly have never had to override paginate myself so chances are you're probably attacking your issue in the wrong way. What is it you're

Re: CakePHP Core on standalone server?

2010-02-24 Thread jodator
Well, as far as I can tell you have everything you need on that hosting. That is PHP5 + MySQL, so you have to just copy the cakePHP to your web root folder. CakePHP is just group of normal PHP files, so it should work on every hosting with PHP enabled. On Feb 23, 7:13 pm, brutalt.se

Re: Need help with custom validation please

2010-02-24 Thread WebbedIT
All too often guilty of the same myself :o) 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

Re: how to adress specific data from related models?

2010-02-24 Thread mivogt-LU
Hi Jeremy, your suggested solution also results with an error because of a wrong Index. Notice (8): Undefined index: Lodging [APP\models\booking_position.php, line 78] if I do $numberOfBeds = $this-Lodging- field('Bettenanzahl',array('Lodging.id'=$this-data['Lodging'] ['id'])); I have Model

Re: how to adress specific data from related models?

2010-02-24 Thread Jeremy Burns
The problem you are experiencing now is that you are trying to get the value $this-data['Lodging']['id'], which doesn't exist. I suggest you look at your data array (debug($this-data);). You'll most likely find your value in: $this-data['BookingPosition']['Lodging']['id'] or

Unit testing questions

2010-02-24 Thread Nico
Greetings I've run into something strange while testing my models. Here's a scenaro (names have been changed for simplicity). I have 2 models, Article and Comment. in the article model i have code as such: function myAction() { $this-Comment-save($data) } now, I'm wanting to test this as part of

Re: I can't list my files from the uploads folder (when app is online). Everything works local.

2010-02-24 Thread mattyh88
Firebug says: GET images: (http://www.cdchayofa.com/cakephp/cdchayofa/images) - Status 200 OK Answer Headers: HTTP/1.1 200 OK Date: Wed, 24 Feb 2010 11:13:18 GMT Server: Apache/1.3.41 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/ 1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.31

Re: saveAll() returns false

2010-02-24 Thread Eleazar
Thanks for your help, I went back, uncommented the code, and without much tinkering it started to work. I think I rebaked a model yesterday, because I wan't sure if the login model had the hasMany associations set. Anyway, it looks like it's working at the moment! Thanks a lot for your speedy

Re: Default Routes

2010-02-24 Thread p_W
Thanks everyone...the .htaccess files were indeed the problem. On Feb 24, 4:18 am, Mohsin kabir mohsint...@gmail.com wrote: I think , You missed to upload the .htaccess file in the root directory , in /app directory and in /webroot directory . Plz check them. On Feb 24, 5:43 am, p_W

Model Association 'chain'

2010-02-24 Thread p_W
I have 4 models, associated like this: Model_1 has_many Model_2 Model_2 belongs_to Model_1 Model_2 has_many Model_3 Model_3 belongs_to Model_2 Model_3 has_many Model_4 Model_4 belongs_to Model_3 In my controller, when I call `$my_var = $this-Model_1-find('all')` the results have Model_1 and

Help getting started - getting 500 server error or 404 on tutorial

2010-02-24 Thread edmicman
So I'm about at wits end and am about to give up in frustration after spending the last couple days messing with this. I just wanted to learn a bit about this framework and try some stuff out, but I'm not even able to get the friggin' tutorial working! I keep coming up with the same suggestions

Re: Saving related table data

2010-02-24 Thread Dmitry
I am in the process of acquainting myself with Cake and have come across a question related to `koala kid`'s. Namely, to explore the $hasOne relationship: -- I baked two models, Parental and Dependent, where parental_id is a foreign key in `dependents` that references `parentals`.`id`. -- Apart

Re: Saving related table data

2010-02-24 Thread Dmitry
I am in the process of acquainting myself with Cake and have come across a question related to `koala kid`'s. Namely, to explore the $hasOne relationship: -- I baked two models, Parental and Dependent, where parental_id is a foreign key in `dependents` that references `parentals`.`id`. -- Apart

Mod_rewrite with Ubuntu 9.10

2010-02-24 Thread Liebermann, Anja Carolin
Hello, At home I upgraded my PC to ubuntu 9.10 and I try to get cake running again (development version). Mod_rewrite is loaded and works for the rest of the webserver. With cake I either get a html page with some text and not working links or I set allowOverride to All as suggested in a lot of

http://translation.cakephp.org/ doesn't work

2010-02-24 Thread Lokaltog
Hi, I'm looking for a Norwegian translation for CakePHP. http://translation.cakephp.org/ shows no translations, but the Google cached version shows a huge list of available translations. When I try to view the Norwegian translation at http://translation.cakephp.org/nb/ I only get an error

Pagination and SEO

2010-02-24 Thread CAT Shannon
Hi, i've been working in a new project and i realize there is a problem with pagination and SEO. Supose i have a website www.example.com and in the main page there are posts with pagination. I use Router to have the pagination URLs in the way www.example.com/p-1, www.example.com/p-2, etc. The

Re: Tree Behaviour reorder (parent_id NULL)

2010-02-24 Thread Salvin
Saved my day :) thanks On 25 Sty, 05:51, Brenton B brenton.bar...@gmail.com wrote: Just a note to hopefully help others avoid some confusion ... When using theTreeBehaviour, the table should be setup such that it allows NULL, with it being the default. I know

Installing CakePHP in my PC

2010-02-24 Thread Galafura
Hi Can I get some help to install CakePHP in my PC ? I have installed: Windows 7 Apache 2.2 (C:\Program Files\Apache Software Foundation\Apache2.2) PHP 5 MySQL 5.0 I already get the 1.2.5 CakePHP version Now what should I do first. Thanks Check out the new CakePHP Questions site

Re: Installing CakePHP in my PC

2010-02-24 Thread Nico
Hi I'm assuming you've checked your setup to make sure that php is working and that its got all the extensions installed (most notably the mysql one) have a look at http://book.cakephp.org/view/329/Getting-Cake and also http://book.cakephp.org/ to make sure you understand how it all works :)

Re: Question about relationships, extending the blog tutorial

2010-02-24 Thread Andy Dirnberger
If you have debug set to 0 in core.php and added displayname to the user table after Cake first saw the it, you need to update the cache of the table's layout. (Either set debug to 1, reload the page, and set it back to 0 or delete the file in tmp.) On Feb 24, 2:36 am, deek derek.bon...@gmail.com

Re: Model Association 'chain'

2010-02-24 Thread John Andersen
Take a look in the CakePHP manual at the Containable behaviour, which will give you the possibility to specify how deep you want to go in your relationships when retrieving your data. http://book.cakephp.org/view/474/Containable Also it will make your life easier :) Enjoy, John On Feb 24,

Re: Mod_rewrite with Ubuntu 9.10

2010-02-24 Thread edmicman
I'm having the exact same problem, I just posted about it last night on here. If you figure anything out, please update! On Feb 24, 5:01 am, Liebermann, Anja Carolin anja.lieberm...@alltours.de wrote: Hello, At home I upgraded my PC to ubuntu 9.10 and I try to get cake running again

Re: Pagination and SEO

2010-02-24 Thread Jon Bennett
hi, Why not set the canonical url instead? http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html hth J On 24 February 2010 11:17, CAT Shannon rxer...@gmail.com wrote: Hi, i've been working in a new project and i realize there is a problem with pagination and SEO.

Re: Pagination and SEO

2010-02-24 Thread euromark
it would be nice if the paginator helper added those canonical links to the action itself automatically dont you think? like /controller/paginatedAction/limit:3/dir:desc/filter:xyz/... /controller/paginatedAction/page:22/sort:user_id/... ... to /controller/paginatedAction On 24 Feb., 16:31, Jon

Re: CakePHP Core on standalone server?

2010-02-24 Thread brutalt.se
ill have to try that out then i guess.. talked to the one.com support and they where very sure that it wouldnt work cause they told me that cake needed root access. or is that only the bake tool? On 24 Feb, 10:23, jodator joda...@gmail.com wrote: Well, as far as I can tell you have everything

Re: Pagination and SEO

2010-02-24 Thread CAT Shannon
Well, it's an option, but maybe i would have to do in every sections with pagination. With this method i haven't to worry about it. There is a mistake in the code i pasted before. In the line 166 there is a 3 and must be $paging['pageCount']. This is the corrected code:

Re: Tree Behaviour reorder (parent_id NULL)

2010-02-24 Thread AD7six
Did you add your note to the book. On Jan 25, 5:51 am, Brenton B brenton.bar...@gmail.com wrote: Just a note to hopefully help others avoid some confusion ... When using the Tree Behaviour, the table should be setup such that it allows NULL, with it being the default. I know

Re: After the Cake is baked...

2010-02-24 Thread Christian Leskowsky
For backups you should be taking full mysql backups of your database nightly - at least while that's feasible - and storing them offsite. (S3 is what I personally use.) Keep at least a week's worth of backups in case you accidentally drop table or something equally terrible happens. Make sure you

Re: CakeFest IV - America - Help us pick a location!

2010-02-24 Thread Michael Gaiser
+San Francisco 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

Re: After the Cake is baked...

2010-02-24 Thread Christian Leskowsky
Here's something I haven't read yet but was written by a guy who knows his stuff... http://boagworld.com/websiteownersmanual/ http://boagworld.com/websiteownersmanual/ Some good material in there for ya. On Wed, Feb 24, 2010 at 11:26 AM, Christian Leskowsky christian.leskow...@gmail.com wrote:

Re: Pagination and SEO

2010-02-24 Thread Jon Bennett
it would be nice if the paginator helper added those canonical links to the action itself automatically dont you think? like /controller/paginatedAction/limit:3/dir:desc/filter:xyz/... /controller/paginatedAction/page:22/sort:user_id/... ... to /controller/paginatedAction But, won't

REST in cakePHP

2010-02-24 Thread ivan
Do you know about REST in cakePHP? Are you have tutorial to use REST in cakePHP? I want to build server n client with cakePHP. help me please. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you

Re: CakePHP Core on standalone server?

2010-02-24 Thread BrendonKoz
That's only the bake tool. If you wanted to use the bake tool, just develop locally and then upload changes to the server. On Feb 24, 10:50 am, brutalt.se timmy...@gmail.com wrote: ill have to try that out then i guess.. talked to the one.com support and they where very sure that it wouldnt

Re: Mod_rewrite with Ubuntu 9.10

2010-02-24 Thread Jon Bennett
I'm having the exact same problem, I just posted about it last night on here.  If you figure anything out, please update! I have cake running fine on 9.10, both as VM guest os and on servers. When you were getting a 500 error - what does the apache log tell you? Cheers, Jon -- jon bennett

Reg: Read Excel file.

2010-02-24 Thread thiru
Hi, How to i read Excel file using php. Thanks Thirumalai.S 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

Re: After the Cake is baked...

2010-02-24 Thread WebbedIT
And now for a blatant plug: We (WebbedIT) offer shared hosting starting from £85 a year with 200MB of web space and 3GB of bandwidth. It's certainly not the cheapest hosting you will find, but you get a highly personal and professional service with a real person to talk to whenever you want (me),

Re: Installing CakePHP in my PC

2010-02-24 Thread WebbedIT
It's been a while since I installed it, but I installed WAMPServer and it was a very easy process http://www.wampserver.com/en/ I then created VirtualHosts so I can run all my Cake Apps from http://CakeAppName which means when I upload to production domain nothing needs changed. Accessing local

Re: Model Association 'chain'

2010-02-24 Thread WebbedIT
In the case of viewing a record, Containable is very much your friend. Saves you so much time. If paginating deep associations, espcially if you want a condition on model 3 or 4, then you need to get your head around ad-hoc (forced) joins.

Re: containable query numbers

2010-02-24 Thread WebbedIT
Learn how to 'force' joins if you are unhappy with containable's extra queries, or more importantly if you want to paginate with conditions on deeper associated models: Teknoid's blog has loads of good advice aroujnd this subject and also worth a search for his HABTM info.

Re: CakePHP is stripslashes_deep

2010-02-24 Thread WebbedIT
Strange one. If you have both Cake apps on the same xampp local server then the server's configuration for both apps will be identical, therefore the issue must be in the individual apps. You're right though in that http://localhost/app2/ should show as being at root/app2. I personally setup

Re: Reg: Read Excel file.

2010-02-24 Thread mufti ali
Hi thirumalai, This roundup maybe can help you http://blogfreakz.com/cakephp/xls-files-cakephp/ On Thu, Feb 25, 2010 at 12:11 AM, thiru thiru@gmail.com wrote: Hi, How to i read Excel file using php. Thanks Thirumalai.S Check out the new CakePHP Questions site http://cakeqs.org and

Re: REST in cakePHP

2010-02-24 Thread John Andersen
Ivan, You have already been told to look into the CakePHP book at: http://book.cakephp.org/view/476/REST and a lot of other information from the thread in this group at: http://groups.google.com/group/cake-php/browse_thread/thread/e771c058d662b560/07449d5e3a1d1349#07449d5e3a1d1349 What have you

Re: Question about relationships, extending the blog tutorial

2010-02-24 Thread deek
Andy, It looks like the debug issue was the problem and everything is now working properly. My final question is this. Once a user is logged on (through the built-in Auth of CakePHP), what built-in functions should I use to determine that user's id number? For that matter what is a good way to

Re: Help getting started - getting 500 server error or 404 on tutorial

2010-02-24 Thread BrendonKoz
Now that you think you have mod_rewrite working properly, you might want to try setting up a separate virtual host just to see if the styles and images show up. If they do not, then mod_rewrite is still not working properly. As for the 500 internal error, that could either be a misconfiguration in

Re: Can someone explain ORM

2010-02-24 Thread koala kid
Hi Paul, been on holiday for a week. Here's the error I am getting: $sql= SELECT `Cat`.`id`, `Cat`.`title`, `Cat`.`location_id`, `Cat`.`created`, `Cat`.`modified` FROM `cats` AS `Cat` WHERE `Subcat`.`cat_id` = `Cat`.`id` $error = 1054: Unknown column 'Subcat.cat_id' in

Re: Can someone explain ORM

2010-02-24 Thread koala kid
Hi Paul, been on holiday for a week. Here's the error I am getting: $sql= SELECT `Cat`.`id`, `Cat`.`title`, `Cat`.`location_id`, `Cat`.`created`, `Cat`.`modified` FROM `cats` AS `Cat` WHERE `Subcat`.`cat_id` = `Cat`.`id` $error = 1054: Unknown column 'Subcat.cat_id' in

Multiple file Upload through related model (CakePHP bug?)

2010-02-24 Thread Lucca Mordente
Hello! I'm having problems saving multiple files through related model. I have the following structure: Document hasMany Item Item belongsTo Document Item belongsTo File File is a generic model I created to ease attaching a file to a model. My form is like following: $k=0; echo

RE: isPost isGet Security questions

2010-02-24 Thread Dave
But as I mentioned im using AJAX for forms so security component is of no use to me since its des not wrk with AJAX. That's why I was wondering. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of harake Sent: February-21-10 6:05 PM To:

Multiple file Upload through related model (CakePHP bug?)

2010-02-24 Thread Lucca Mordente
Hello! I'm having problems saving multiple files through related model. I have the following structure: Document hasMany Item Item belongsTo Document Item belongsTo File File is a generic model I created to ease attaching a file to a model. My Document form is like following: ...

Recursive Pagination

2010-02-24 Thread Jesse
Hi, I am working on converting an existing script from classic php (its a mess) to cakephp for a more clean cut, lean running application. I am working on a view that shows Categories and Items with recursive of 1. I have managed to get my category view to show all the products under each

Re: Reg: Read Excel file.

2010-02-24 Thread thiru malai
Thanks lot mufti. Thank you On Wed, Feb 24, 2010 at 11:29 PM, mufti ali muftimas...@gmail.com wrote: Hi thirumalai, This roundup maybe can help you http://blogfreakz.com/cakephp/xls-files-cakephp/ On Thu, Feb 25, 2010 at 12:11 AM, thiru thiru@gmail.com wrote: Hi, How to i read

Version 2 - on the map?

2010-02-24 Thread Jamie
I guess this is mostly for the Cake core developers - just wondering if version 2 will be the focus after 1.3 is out of beta, and, if so, what the expected release date might be (I'm sure it's vague at this point - fall 2010, winter 2011, etc.). The lighthouse page for the 2.0 project is pretty

Re: I can't list my files from the uploads folder (when app is online). Everything works local.

2010-02-24 Thread Dr. Loboto
When in PHP fatal error occurs it still reports 200 OK. Turn debug on or check logs. On Feb 24, 5:19 pm, mattyh88 mathew.hu...@gmail.com wrote: Firebug says: GET images: (http://www.cdchayofa.com/cakephp/cdchayofa/images) - Status 200 OK Answer Headers: HTTP/1.1 200 OK Date: Wed, 24 Feb

Re: REST in cakePHP

2010-02-24 Thread irving hou
is eary. On Thu, Feb 25, 2010 at 2:26 AM, John Andersen j.andersen...@gmail.comwrote: Ivan, You have already been told to look into the CakePHP book at: http://book.cakephp.org/view/476/REST and a lot of other information from the thread in this group at:

Create a link

2010-02-24 Thread jiru
In this code echo 'li onClick=fill(\''.addslashes($results['members'] ['name']).'\');'.$results['members']['name'].'/li'; this will shows the result from the database. Here I need a link to the view of the result when I click the result. I will try this but shows error : echo 'li',

Re: Recursive Pagination

2010-02-24 Thread WebRenovator
Hi Jesse Have you tried $this-set('categories', $this-paginate('Category', array('Item.name LIKE '%the%'))); If I remember correctly cake automatically adds an '=' when you use it like you had. I.e. array('Item.name LIKE'='%the%') will produce the following sql: WHERE Item.name LIKE = '%the%'

Problem with recursion and Containable

2010-02-24 Thread Arak Tai'Roth
So I've been searching for a solution to my problem for a little while now. However everything I find seems to imply that what I am doing is correct, so I am rather confused about this at the moment. Likely it's something simple, but I'm sure as heck not seeing it. I have a model named Leader,

Re: Recursive Pagination

2010-02-24 Thread WebbedIT
@WebRenovator: Jesse had his condition correct, you only need to omit the = when you are comparing one column to another like when associating two models and specifying conditions. array('Model1.model2_id = Model2.id') for conditions with operators such as LIKE, !=, = etc. Cake is clever enough

Re: Can someone explain ORM

2010-02-24 Thread WebbedIT
Hope you enjoyed your holiday. The query: SELECT `Cat`.`id`, `Cat`.`title`, `Cat`.`location_id`, `Cat`.`created`, `Cat`.`modified` FROM `cats` AS `Cat` WHERE `Subcat`.`cat_id` = `Cat`.`id` Cannot originate from the call: $this-set('local', $this-paginate('LocalInfo')); If you have force joined