Output started always in cake/libs/file.php and headers already sent

2008-11-06 Thread Primeminister
Hi, In my app I got a lot of PHP warnings that the headers were already sent when settin a cookie or before redirecting. And always it is in the cake/libs/file.php folder on line 146 or 279 This is the file handling lib of cake. So deletig or opening a file. I investigated it more and I use

Difference between read and find

2008-11-06 Thread Liebermann, Anja Carolin
Hello everybody, I wonder what the difference is between $this-Hotel-read(null, $id); and $this-Hotel-findById($id); Hotel being my model with HABTM relations to a lot of other models. The returned arrays look the same. Is read just a shortcut for findById? Bake put me a lot of reads in my

Re: Difference between read and find

2008-11-06 Thread David C. Zentgraf
read() sets the data in the model, find() does not. http://api.cakephp.org/class_model.html#da9914325847e7a03320eafb691208da I.e. $Model-find(); echo $Model-data; // empty $Model-read(); echo $Model-data; // not empty Personally I never use read() either. On 6 Nov 2008, at 17:54, Liebermann,

Re: Multiple records in a single save()

2008-11-06 Thread si-mon
Anupom: thank you very much to redirect me to the saving-your-data section of the book. It helped me to solve the issue. Actually, the problem was within the array format: There is no need to specify the Model in the array. i.e. the correct array format should be: $this-data = Array(

AW: Undesired Recursion in Models

2008-11-06 Thread Liebermann, Anja Carolin
Thank you for the hint! Containable seems to offer amazing possibilities. I read the cookbook article on it (http://manual.cakephp.org/view/474/Containable) and 3 Questions arose: 1st: I wonder about the syntax to get more than one associated model back. Lets say I call $this-Hotel-find

AW: basic site concept

2008-11-06 Thread Liebermann, Anja Carolin
Hi Clint, I guess that depends on what your website should do in generaland if and how the differnet functionalities are related. 1. How many static pages do you have 2. How often chengeas teh content of teh static pages and who changes them? Based on this you have to decide if you do it

Re: basic site concept

2008-11-06 Thread dr. Hannibal Lecter
I'm not sure why would you want many apps for what you've described. Your products section would actually be ProductsController and Product model, your search and download functionality are just SearchController and DownloadsController and their respective models and views etc.. Normally, a

Re: Custom Validation

2008-11-06 Thread Adam Royle
http://book.cakephp.org/view/150/Custom-Validation-Rules On Nov 6, 8:07 pm, si-mon [EMAIL PROTECTED] wrote: Hello... There is a problem in validating data in my application. Let me explain: I used a model Employee belongsTo Office office_id is the foreignKey When I'm trying to insert

Re: CakePHP presentation

2008-11-06 Thread soosa
Thanks a lot guys, i will take all your suggestions in mind, teknoid, i will be using your tutorials to explain Auth in cake, by the way, thanks a lot for those greate once!, Daniel Hofstetter, i finally got the PDF's to be read correctly, thank you :), 703designs, indeed, bake is one of my

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread Remigijus
Latest CakePHP framework 10x times faster? I have upgraded to latest version, and my empty page before: used 5.5 MB of memory loaded in 1.2s After upgraded: used 5.6 of memory loaded in 2.3s Where is that 'faster'? I have tested in 3 apache servers. Tested with both 1.2 stable and 1.2 latest

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread AD7six
On Nov 6, 11:24 am, Remigijus [EMAIL PROTECTED] wrote: Latest CakePHP framework 10x times faster? I have upgraded to latest version, and my empty page before: used 5.5 MB of memory loaded in 1.2s After upgraded: used 5.6 of memory loaded in 2.3s Where is that 'faster'? I have

Re: Authentificate against LDAP?

2008-11-06 Thread Sebastian Göttschkes
Thanks for your help. I'll have a look at the bakery. There is no way not using AD as LDAP, so I need to find a way to get AD working. On 4 Nov., 13:11, hydra12 [EMAIL PROTECTED] wrote: There are some articles in the bakery about using ldap as a model.  I haven't used them, so I couldn't say

Re: Difference between read and find

2008-11-06 Thread jitka (poLK)
David C. Zentgraf is right. Besides other things, it allows things like if ($this-ModelName-read(..., $id)) { $this-ModelName-set(...); instead of usual $this-ModelName-id = $id; if ($this-ModelName-exists(true)) { $this-ModelName-create(...);

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread Ziobe
Just to say that my cakephp project is blank. And even if i try to change the debug, the problem is still here --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread Remigijus
I have set debug mode to zero. But still framework uses Memory used: 5.42 MB And loads about 1 sec. I have done some benchmarks, and without models loaded, site uses 2.6MB memory, with empty model (and set param useTable to null, and recursion to -1) it uses 5.42. Where is the problem, please

Re: Difference between read and find

2008-11-06 Thread Brenda
I had a problem recently where my validation errors weren't showing up in a form. Turns out I was using to read() to get some related data to display, and that wiped out the validation results from the form submission. Changing it to find() left the validation results in place.

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread Remigijus
Dave J: I have very (very!) small page that using postgresql database with 20 rows at all. In the config file I have found this line: Cache::config('default', array('engine' = 'File')); How cache can affect website memory usage and speed? By the way, is anyone using website made by CakePHP

Re: Creating DatabaseTables (cakephp way)

2008-11-06 Thread Rey Philip
By the way thnks for the responseActually what I want to do is the HasOne relationship, the problem is that I can't implement it. The problem is like this I have a users table: id integer auto increment primary firstname varchar(45) lastname varchar(45) also I have a userinformations table

About CakePHP

2008-11-06 Thread Eric Saboia (Fortes Informatica)
Hello, I´m looking for some of Cake´s history (why it begun, what inspirated it, etc)... where can i get information about that? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: Search Engine Bots Generating Strange Queries

2008-11-06 Thread Mathew
Hi Mike, If your using Apache it has some features in the htaccess file that will allow you to disable access to your server for bots causing you trouble. In your Cake 404 display page keep track of the number of times a 404 is generated per IP address, and if it exceeds a threshold log that IP

Re: Undesired Recursion in Models

2008-11-06 Thread Adam Royle
Well you kinda hijacked Renesistemic's thread... but anyway... 1. I'm pretty sure it takes both and means the same thing. 2. Town would need to actsAs Containable... however I add it to my AppModel so all of my models have the ability. 3. I would have thought so... but there is an easy way to

[Problem] Cake 1.2 is slow (4s...)

2008-11-06 Thread Ziobe
Hello, i want to use Cake 1.2 but for render a page it takes more than 4sec I try Cake 1.1, CodeIgniter, Drupal and all of that things are fully working on my computer. But cake 1.2 don't want. I Also tried on another computer and it's works. I don't know what to do can you help me ? I'm on

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread Dardo Sordi Bogado
I don't get it, even in debug mode I always get response times in ms, even in modest laptops/desktop machines... always in linux ;) - Dardo Sordi. On Thu, Nov 6, 2008 at 8:30 AM, AD7six [EMAIL PROTECTED] wrote: On Nov 6, 11:24 am, Remigijus [EMAIL PROTECTED] wrote: Latest CakePHP framework

Custom Validation

2008-11-06 Thread si-mon
Hello... There is a problem in validating data in my application. Let me explain: I used a model Employee belongsTo Office office_id is the foreignKey When I'm trying to insert data from the cake-generated form, it correctly inserts the office_id (because I set it as Select box). But, when I'm

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread Dave J
Are you using any op-code caches (APC, eAccelerator or XCache) ? On Nov 6, 11:53 am, Remigijus [EMAIL PROTECTED] wrote: I have set debug mode to zero. But still framework uses Memory used: 5.42 MB And loads about 1 sec. I have done some benchmarks, and without models loaded, site uses

Re: Creating DatabaseTables (cakephp way)

2008-11-06 Thread Donkeybob
I use this same concept but my userinformation is called profiles. just what i like but here is how mine our set up: users_controller.php: class UsersController extends AppController { var $name = 'Users'; var $scaffold; } user.php: class User extends AppModel { var

Re: is Cakephp 1.2 faster than Code Igniter ?

2008-11-06 Thread [EMAIL PROTECTED]
How are you going to measure the performance? The time it takes to process a request? The time it takes to develop? Are you going to implement caching? Are you going to try multiple datasources (of various types)? I realize that performance is a complicated issue. I'm currently finding out

Re: is Cakephp 1.2 faster than Code Igniter ?

2008-11-06 Thread [EMAIL PROTECTED]
On 5 marras, 19:34, BrendonKoz [EMAIL PROTECTED] wrote: Another issue with benchmarking is that when dealing with OOP, or any code in PHP, TMTOWTDI (There's More Than One Way To Do It)...  So, to properly benchmark any framework, one would have to know each framework inside and out to take

Getting DB entries based on an array of id's...

2008-11-06 Thread wallerdm
Dear All, Just a quick question really (hopefully). I have a load of images stored in a table, each with an ID. Users can choose to bookmark images and this is also stored in a table: --Users id - INT username - VARCHAR --Images id - INT title - VARCHAR url - VARCHAR --Bookmarks

Re: CakePHP presentation

2008-11-06 Thread mark_story
Also recently on the documentation side of things, John has been busy adding cookbook links into the doc blocks. So when you look things up on the API you can get to the related cookbook page very easily. -Mark On Nov 6, 5:22 am, soosa [EMAIL PROTECTED] wrote: Thanks a lot guys, i will take

Re: Pause $ajax-remoteTimer();

2008-11-06 Thread Galdan
Wow great, it works exactly how i mentioned it! Thank you very, very much! On 5 Nov., 18:45, schneimi [EMAIL PROTECTED] wrote: Hi Galdan, ok here is a little help:   function remoteTimer($options = null) {     $frequency = (isset($options['frequency'])) ? $options['frequency'] : 10;    

Enhancements to cakephp testing and code coverage

2008-11-06 Thread Catch22
Hello, I have been using cakephp for a while, and I have made some updates to the cakephp testing and code coverage framework which I would like to submit for review. If there is a better way to achieve this, or this already exists in cakephp, I would be grateful if someone can send me pointers.

Re: basic site concept

2008-11-06 Thread justclint
Thank you so much Anja and dr. Hannibal. This helps me very much. As you described dr. Hannibal your not sure why I would want many apps for what Im doing and nor do I. So having you confirm that I can do all this in a single cake folder is a relief. So I guess than its true to say that I can

Re:

2008-11-06 Thread Gonzalo Servat
On Thu, Nov 6, 2008 at 1:03 PM, Scott McLaughlin [EMAIL PROTECTED]wrote: unsubscribe As you can see on every single post that hits the list, the way to unsubscribe is: To unsubscribe from this group, send email to [EMAIL PROTECTED][EMAIL PROTECTED] For more options, visit this group at

[no subject]

2008-11-06 Thread Scott McLaughlin
unsubscribe --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For

AW: basic site concept

2008-11-06 Thread Liebermann, Anja Carolin
Hi Clint, You are right. If you don't want to reuse applications you can do that way. Even if you do want to reuse them it might work, dependihg on relations between them. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von

Re: CakePHP presentation

2008-11-06 Thread soosa
Awesome! Thanks guys :-) On Thu, Nov 6, 2008 at 11:08 AM, mark_story [EMAIL PROTECTED] wrote: Also recently on the documentation side of things, John has been busy adding cookbook links into the doc blocks. So when you look things up on the API you can get to the related cookbook page very

Re: Getting DB entries based on an array of id's...

2008-11-06 Thread Anupom
This should work, $this-set('bookmarkdata', $this-Image-find('all', 'conditions' = array('id' = $bookmarklist) ) ); On Thu, Nov 6, 2008 at 9:02 PM, wallerdm [EMAIL PROTECTED] wrote: Dear All, Just a quick question really (hopefully). I have a load of images stored in a table, each with

SELECT DISTINCT using find('list')

2008-11-06 Thread [EMAIL PROTECTED]
Hello guys, I need a distinct list of items, so that I tried to set this up using the following code, but it's not working: $list = $this-Model-find('list',array('fields' = 'DISTINCT `Model`.`field`', 'conditions' = array(Model.field2 != '-1'),'order' = 'Model.order ASC')); Unfortunately the

Re: Linking back to the CakePHP site ...

2008-11-06 Thread BrendonKoz
Two things: If you want to keep the site in debug mode, I'd at least suggest hiding the SQL queries with CSS. (.cake-sql-log { display:none; } )...also, you're already linking back to www.cakephp.org with the CakePHP | Power badge that comes with the default template files. I'm no official, but

Re: Search Engine Bots Generating Strange Queries

2008-11-06 Thread BrendonKoz
I'd actually say using a permanent redirect (301, I believe) to your root (or that controller's index), rather than to the 404 page might be a better solution. If your users/visitors won't see it since you're not linking to it, it isn't really a bad solution, and I doubt you'd want any search

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread teknoid
Can you show your use of containable? I think something might be amiss... On Nov 5, 6:21 pm, Brenton B [EMAIL PROTECTED] wrote: After a bit of digging setting the 'recursive' property in the model _partially_ solves this: var $actsAs = array('Containable' = array('recursive' = false));

Re: SELECT DISTINCT using find('list')

2008-11-06 Thread teknoid
find('list') requires to fields, because it is used to build a select drop down (with value being the id, and option the name usually). You probably need find('all') + Set::extract() ... depending on what you need really. On Nov 6, 10:44 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello

Re: basic site concept

2008-11-06 Thread dr. Hannibal Lecter
Hi Clint, Of course you can have as many controllers as you need. Since you're not familiar with Cake yet, maybe the best thing to do is to learn by reading some code, just go through some of these applications: http://book.cakephp.org/view/511/Applications

Re: is Cakephp 1.2 faster than Code Igniter ?

2008-11-06 Thread teknoid
Sure, administrative interface might be extra... but again it comes down to the way you plan to measure performance. I believe that admin interface, is an integral post of a vast majority of mature web apps. With CakePHP's admin routing and Auth, such can build fairly painless and quickly. How

Re: Using maven for deployment

2008-11-06 Thread Smelly_Eddie
Bob: Have you made nay progress on this. Thinking about it got me very excited. I am very new to Maven itself, but I have begun looking into creating pom files for CakePHP. I don't want to reinvent the wheel though if your already moving forward. Eddie On Oct 10, 10:12 am, Bob Mattax [EMAIL

Re: is Cakephp 1.2 faster than Code Igniter ?

2008-11-06 Thread teknoid
There are a few other issues to consider... For example the learning curve. To get to know CakePHP on an intimate level you'll probably need 3-6 months of solid development, depending on ones ability to learn and previous experience with PHP and OO, of course. After spending more than 1.5 years

Re: Multiple HABTM levels produces duplicate entries.

2008-11-06 Thread Finster
Have not tried latest svn, but I am running RC3 now. --~--~-~--~~~---~--~~ 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

Re: Search Engine Bots Generating Strange Queries

2008-11-06 Thread Mathew
I'd actually say using a permanent redirect (301, I believe) to your root (or that controller's index), rather than to the 404 page might be a better solution.  If your users/visitors won't see it since you're not linking to it, it isn't really a bad solution, and I doubt you'd want any

Re: Undesired Recursion in Models

2008-11-06 Thread Renesistemic
Adam, Thanks for the reply. I've read up on containable and had actually already begun implementing that behavior in certain locations throughout the application. While I can definitely see the performance gains in properly applying that behavior before calling Find(), I'm still a little weary

Loosing passed arguments after validation and redirection to show errors

2008-11-06 Thread Home Boy Howy
Hi there all, I have a conundrum in CakePHP. Not hard to do for a newbie like me. I am trying to do a simple Send the page to a Friend form so I can use it anywhere on the site. The form is loaded via AJAX in a pop-up layer. I thought I could achieve this by just grabbing the URL for the current

Re: Enhancements to cakephp testing and code coverage

2008-11-06 Thread Daniel Hofstetter
Hi, I have been using cakephp for a while, and I have made some updates to the cakephp testing and code coverage framework which I would like to submit for review. If there is a better way to achieve this, or this already exists in cakephp, I would be grateful if someone can send me

including CSS through PHP

2008-11-06 Thread Josey
Here's an interesting problem I've run into that I hope somebody may have seen before. I'm wanting to include a php file that acts as a CSS file so that I can create variables inside of it for more flexibility in my stylesheet. I've done this several times before, but not with CakePHP. The

Re: CakePHP presentation

2008-11-06 Thread teknoid
Btw, If it's going to be a power-point or some screen cast (or even write-up)... and you wouldn't mind shareing with the community, it might be a nice addition to cake resources... just a thought. On Nov 6, 10:46 am, soosa [EMAIL PROTECTED] wrote: Awesome! Thanks guys :-) On Thu, Nov 6, 2008

Re: Search Engine Bots Generating Strange Queries

2008-11-06 Thread BrendonKoz
It may not index a 404, but it still checks the 404. For usability's sake I'd still prefer to redirect than to send a 404. Although we were discussing bots, we have to keep the user in mind as well. I have personally traversed the URL path to see what may be found on some sites, and if Safari

Re: Search Engine Bots Generating Strange Queries

2008-11-06 Thread Mathew
Most web crawlers won't check a 404, because of the way servers send Http responses. When a crawler requests a page that is missing, it first receives the header response from the request, and it can read the response code, content-type, and other information. The web crawler can then stop the

Re: Search Engine Bots Generating Strange Queries

2008-11-06 Thread Mathew
Another reason not to use redirects for missing URIs is that you could mistakenly create what is called a crawler trap. A crawler trap are URLs that keep changing but keep producing the same content. The crawler gets stuck wasting its time download the same page, because it can't tell by the URL

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread [EMAIL PROTECTED]
Ziobe: It sounds like you are having some odd problem with that computer. I am sorry to say I have no idea of what could be the cause. If 1.2 works fine on another computer, then the oldest support answer in the world might be the only way: reinstall. On Nov 6, 12:12 pm, Ziobe [EMAIL PROTECTED]

Re: CakePHP presentation

2008-11-06 Thread soosa
of course!!, thats for sure :-) On Thu, Nov 6, 2008 at 7:34 PM, teknoid [EMAIL PROTECTED] wrote: Btw, If it's going to be a power-point or some screen cast (or even write-up)... and you wouldn't mind shareing with the community, it might be a nice addition to cake resources... just a

Re: Tree Helper - is it fully operational?

2008-11-06 Thread adriaanb
I have the same problem. It looks like the $tree-addItemAttribute and $tree-addTypeAttribute doesn't work in the element. If I put this in the view where the tree gets generated it 'highlights' the first item. I need classes on the items to decide when to expand it's children. I got a treepath

what can I do to speed up bootstrap beforeFilter ?

2008-11-06 Thread [EMAIL PROTECTED]
Hi, I have been migrating an application to 1.2 and partly because of some threads about performance and benchmarking I have done my own comparisons. Loading up a simple login form for my app (just Auth no ACL) 1.1 is 8-10 times faster. 1.2 quickly catches up on more complete requests with a

Re: Add-on Domain w/ Cakephp

2008-11-06 Thread Kyle Decot
Thanks worked perfectly On Nov 4, 10:09 am, cjsharp1 [EMAIL PROTECTED] wrote: I had a similiar issue when setting up a subdomain. What Adam is saying is the correct code, but just remember to add the rewrite rule. Here is what I had to do in my primary .htaccess file: IfModule

Re: Cake 1.2 is slow (4s...)

2008-11-06 Thread teknoid
Just did a simple look up on a random page of my app (1.2 RC3, recent nightly build) There are three models paginated on the page limit=15 rows. Total of 18 queries required to get all data, 2 for pagination of the main Model (with some conditions), 16 for related models... yes they are little

Re: what can I do to speed up bootstrap beforeFilter ?

2008-11-06 Thread teknoid
You have debug at 0, I presume? On Nov 6, 2:35 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have been migrating an application to 1.2 and partly because of some threads about performance and benchmarking I have done my own comparisons. Loading up a simple login form for my app (just

Re: SELECT DISTINCT using find('list')

2008-11-06 Thread [EMAIL PROTECTED]
I see, I'll try that and post the results, thanks! On Nov 6, 10:36 am, teknoid [EMAIL PROTECTED] wrote: find('list') requires to fields, because it is used to build a select drop down (with value being the id, and option the name usually). You probably need find('all') + Set::extract() ...

Seperate Public/Admin Apps with Shared Models Webroot?

2008-11-06 Thread WildFoxMedia
I saw an article on the bakery that described a method for creating 2 seperate applications that could share Models, Controllers, COmponents, etc. I followed that tutorial and had everything setup how I wanted, except for the webroot. Is it possible to share the webroots across these 2 apps? I

Re: what can I do to speed up bootstrap beforeFilter ?

2008-11-06 Thread [EMAIL PROTECTED]
It does not make much difference to the time either way actually. debug 0 results are more often down around 0.06 and debug 1 is more often around 0.08 or maybe up to 0.1 at times. On Nov 6, 8:42 pm, teknoid [EMAIL PROTECTED] wrote: You have debug at 0, I presume? On Nov 6, 2:35 pm, [EMAIL

Re: what can I do to speed up bootstrap beforeFilter ?

2008-11-06 Thread teknoid
Well, that really depends on the way the app is setup. With debug 0 you are completely bypassing the Debugger, so it should definitely improve some things. On Nov 6, 3:00 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It does not make much difference to the time either way actually. debug 0

Re: what can I do to speed up bootstrap beforeFilter ?

2008-11-06 Thread teknoid
Also, you shouldn't get DESCRIBE queries, which can slow things down a little, depending on the models used per given page. On Nov 6, 3:00 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It does not make much difference to the time either way actually. debug 0 results are more often down around

Re: basic site concept

2008-11-06 Thread justclint
Man you guys are Awesome! Thanks so much for the support. And dr. Hannibal, I just saw the info on the CMS your working on, NeutrinoCMS. Once I finish up this site I would like to add a CMS to it so you'll probably hear more from me. Thanks again everyone! Clint On Nov 6, 8:37 am, dr.

Re: RC3 file cache trouble

2008-11-06 Thread Brett Wilton
Have been trying to figure out this for a while now, anyone used the file engine caching under 1.2 with cake:nocache around a form ? In the controller I'm using var $cacheAction = array('index' = '1 day', 'view' = '1 day'); the view page has a few elements which are cached as well but I only get

Re: Loosing passed arguments after validation and redirection to show errors

2008-11-06 Thread [EMAIL PROTECTED]
Hi Howy, You are loosing the agruments since you are submitting the form to / contacts/send_page and not /contacts/send_page/params/here. But you still try to pull sendUrl from the passed params if the validation fails. You could change your forma little: $form-create('Contact', array('url' =

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread Brenton B
Aha!!! I think I've come up with the reason ... As I was trying to produce a nice a short example I realized that when there's only 1 level it doesn't produce the extra queries ... as soon as there's more than 1 level it has the extra queries. So if I have: $this-set('photographer',

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread teknoid
what's the relation between all those models? and are they all in the same db? On Nov 6, 5:12 pm, Brenton B [EMAIL PROTECTED] wrote: Aha!!! I think I've come up with the reason ... As I was trying to produce a nice a short example I realized that when there's only 1 level it doesn't produce

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread Brenton B
Photographer: Photographer belongsTo Country Photographer belongsTo State Photographer HABTM PrintSize: with PhotographersPrintSize (join table has extra data) PrintSize: PrintSize HABTM Photographer: with PhotographersPrintSize (again, join table with data)

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread teknoid
What are the extra queries, which get generated for Country and State, when you add other models? Could you provide an example? On Nov 6, 5:41 pm, Brenton B [EMAIL PROTECTED] wrote: Photographer:         Photographer belongsTo Country         Photographer belongsTo State         Photographer

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread Brenton B
Where there is only 1 level in the 'contain': SELECT `Photographer`.`id`, `Photographer`.`first_name`, `Photographer`.`last_name`, `Photographer`.`company_name`, `Photographer`.`email`, `Photographer`.`telephone`, `Photographer`.`address_1`, `Photographer`.`address_2`,

Re: Seperate Public/Admin Apps with Shared Models Webroot?

2008-11-06 Thread Adam Royle
If you're sharing the same webroot and models, controllers, components, etc, what is the purpose of have two separate apps? You can just use admin routes for this. Cheers, Adam On Nov 7, 5:55 am, WildFoxMedia [EMAIL PROTECTED] wrote: I saw an article on the bakery that described a method for

Re: Changing views depending on ARO

2008-11-06 Thread rm
Silly me, it should have been a change in app_controller function beforeFilter() { $this-Auth-autoRedirect = false; instead of changing auth.php On Oct 16, 1:29 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: oh and I forgot, also added this in the user model         function

Re: Loosing passed arguments after validation and redirection to show errors

2008-11-06 Thread Home Boy Howy
Wow. I did what you recommends and still no love. Thank you for the tip on $this-here syntax. It is still clearing the params on validation. I guess I don't understand what happens during the validation process. I assumed that it would just return the user to the previous URL with all params

Re: Changing views depending on ARO

2008-11-06 Thread rm
I couldn't initially get it to work But then I cleared out the redirect session to stop it from confusing me (as it would automatically redirect to the previously redirected page first). To do that I put this in my users_controller : login function $this-Session-del('Auth.redirect'); I

Re: Inconsistency between displaying validation errors and validating with model.saveAll()

2008-11-06 Thread Joel
For reference I have created a ticket in trac here: https://trac.cakephp.org/ticket/5715 On Nov 6, 5:23 pm, Joel [EMAIL PROTECTED] wrote: Hi, I've run into a frustrating problem, I'm trying to validate an array of the same type of model, but the I have used the name convention as suggested

Re: Loosing passed arguments after validation and redirection to show errors

2008-11-06 Thread Home Boy Howy
Ok, I am a complete dork. The reason this wasn't working is because the AJAX submit wasn't going to the ACTUAL action of the form. So getting rid of that parameter of jQuery AJAX form submit it went to the correct form action which allowed the validation process to return to the correct URL and

Failed test case: libs/view/helpers/cache.test.php

2008-11-06 Thread bwilt
Hi All, I was just trying to investigate my trouble with caching outlined in this thread :- http://groups.google.com/group/cake-php/browse_thread/thread/3ad96f4680bf0211/0832f1e2ac262345#0832f1e2ac262345 This is my first try with the test suite so forgive me if I'm doing things wrong, I

Re: Inconsistency between displaying validation errors and validating with model.saveAll()

2008-11-06 Thread teknoid
There is nothing stopping you from naming your fields as: $form-input('Model.1.fieldname'); As a matter of fact, if you read about saveAll() in the manual, you'll see an example that uses that exact format. Regarding the 'fieldname.1' notation as in the form helper example, it clearly states

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread teknoid
That's very strange... why is it trying to select models with id=2? Doesn't seem like you pass any conditions to your find()... Are you sure there is nothing else going (maybe in model associations) or any other attached behaviors? On Nov 6, 6:34 pm, Brenton B [EMAIL PROTECTED] wrote: Where

Re: Finds: Contain vs. Unbind-on-the-fly

2008-11-06 Thread Xavier Mathews
I am so confused. Run the query and check the arrays etc the code looks good. On 11/06/2008, teknoid [EMAIL PROTECTED] wrote: That's very strange... why is it trying to select models with id=2? Doesn't seem like you pass any conditions to your find()... Are you sure there is nothing else

i want lean authentication core components

2008-11-06 Thread Elavavazhagan Chidambaram
please, i don't no about authentication core components so you help me with any examples --~--~-~--~~~---~--~~ 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

Re: How to get code coverage analysis working?

2008-11-06 Thread Brett Wilton
Anyone get any further with this ? I'm running a LAMP ubuntu install and get the same result either a blank screen or empty test.php. Phpinfo says the xdebug is installas far as I can tell. --~--~-~--~~~---~--~~ You received this message because you are

Re: How to get code coverage analysis working?

2008-11-06 Thread Daniel Hofstetter
Hi Brett, Anyone get any further with this ? I'm running a LAMP ubuntu install and get the same result either a blank screen or empty test.php. Phpinfo says the xdebug is installas far as I can tell. No, I had no luck so far... -- Daniel Hofstetter http://cakebaker.42dh.com

Re: How to get code coverage analysis working?

2008-11-06 Thread Dr. Tarique Sani
On Fri, Nov 7, 2008 at 11:43 AM, Daniel Hofstetter [EMAIL PROTECTED] wrote: Hi Brett, Anyone get any further with this ? I'm running a LAMP ubuntu install and get the same result either a blank screen or empty test.php. Phpinfo says the xdebug is installas far as I can tell. No,

access variable in controller

2008-11-06 Thread [EMAIL PROTECTED]
I have set variables in App Controller I want to access that variable in controller? i do like that: $this-set('feach',$this-products-read()); pr($this-feach); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Custom Validation Method in Behaviour

2008-11-06 Thread si-mon
Hi all, In my application, I have used the custom validation rule as: 'rule'=array('checkRelatedItem','office_id','Office','Employee') and I have defined the function checkRelatedItem in a behaviour: function checkRelatedItem($data, $foreign_key=null, $related_model=null, $model_name=null) {

Cake 1.2 and JW FLV Media Player

2008-11-06 Thread nightcrawler13
Hello baker.. I just found this code http://bin.cakephp.org/saved/38536 but after I followed then I got this error message Fatal error: Class 'AppHelper' not found in C:\xampp\htdocs\stream\app\views\helpers \media_player.php on line 106 Model : video.php ?php class Video extends AppModel {

Re: Cake 1.2 and JW FLV Media Player

2008-11-06 Thread Fran Iglesias
HI, El 07/11/2008, a las 7:39, nightcrawler13 escribió: but after I followed then I got this error message Fatal error: Class 'AppHelper' not found in C:\xampp\htdocs\stream\app\views\helpers \media_player.php on line 106 You could add the file app_helper.php in C:\xampp\htdocs\stream\app\