Re: Exceptions, best practice

2011-10-24 Thread flosky
Thanks for the reply. Does that mean that I don't neccessarily need a custom Exception handler for my own Exceptions if I catch them myself? -flosky -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.o

Re: Cake2.0 not recognizing my PHPUnit installation

2011-10-24 Thread Zaky Katalan-Ezra
Download all repositories and update include_path as said in the section "Using PHPUnit From a Git Checkout" in https://github.com/sebastianbergmann/phpunit On Tue, Oct 25, 2011 at 3:21 AM, andrewperk wrote: > Ok, I downloaded and put PHPUnit into my vendors folder. Now when I > run test.php I g

Re: Form dropdown multiple selected array not working

2011-10-24 Thread Tilen Majerle
it should be "disabled" => "disabled" or "disabled" => "checkbox" instead "disabled" => true -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/10/25 MetZ > Hi all.. > > I just wanted to let anyone else with similar problem know how I > solved this. > > in view! > if($this->data['Co

Re: Form dropdown multiple selected array not working

2011-10-24 Thread MetZ
Hi all.. I just wanted to let anyone else with similar problem know how I solved this. in view! data['Content']['category_id'] != '') { $cont_cats = explode(",",$this->data['Content']['category_id']); }else{ $cont_cats = ''; } echo $form- >input('c

Non Human / User Authentication

2011-10-24 Thread zuha
Don't know if I'm just not search for the right keywords, but I'm hoping some one might be able to point me in the right direction for a tutorial or advice on how to use Acl with a REST type of authentication. The specific case I'm trying to do is explained something like this... - I creat

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Your conventions are all over the place. Its best to stick to them. Did you change the code inside the controller as suggested in my first post? class ProvidersController extends AppController { var $name = 'Providers'; The filename is view_admit_lookup, yet the controller function is viewA

Re: Exceptions, best practice

2011-10-24 Thread José Lorenzo
The exception handler is a last resource mechanism. You should always use a try catch unless you think than presenting an error page to the user is the best thing to do. otherwise, if you can handle the exception and recover from it, you should do so. There are very clever ways of using the exc

Re: Any word on the CakePHP Training?

2011-10-24 Thread José Lorenzo
It will be available very soon, hopefully for next week or so. We are working on the training materials and defining the contents for each session. Thanks for your interest! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: cakephp 2.0 Cookbook blog tutorial - problem with autentication component

2011-10-24 Thread José Lorenzo
Did you finish the tutorial? In the following lines it is explained how to allow access to post adding and editing. -- 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 Ca

Re: Cake2.0 not recognizing my PHPUnit installation

2011-10-24 Thread andrewperk
Ok, I downloaded and put PHPUnit into my vendors folder. Now when I run test.php I get an error about not being able to load a file from PHPUnit's Autoload.php file require_once(PHP/CodeCoverage/Filter.php) [function.require-once]: failed to open stream: No such file or directory [ROOT/vendors/PHP

Re: Cake2.0 not recognizing my PHPUnit installation

2011-10-24 Thread andrewperk
Thanks Euromark, I'll give that a try.. On Oct 24, 2:35 pm, euromark wrote: > I dont install it at all and just drop the necessary files in /vendors > works like a charm :) > > On 24 Okt., 22:23, andrewperk wrote: > > > > > > > > > Hello, > > > I have PHPUnit 3.5.15 installed on Linux, PHP 5.3.5

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Ok, now I'm getting this when I turned everything to plural. Missing Controller *Error: **ProviderController* could not be found. *Error: *Create the class *ProviderController* below in file: app\controllers\provider_controller.php *Notice: *If you want to customize this error message, create

Re: Cake2.0 not recognizing my PHPUnit installation

2011-10-24 Thread euromark
I dont install it at all and just drop the necessary files in /vendors works like a charm :) On 24 Okt., 22:23, andrewperk wrote: > Hello, > > I have PHPUnit 3.5.15 installed on Linux, PHP 5.3.5, it was installed > using the pear installer per the directions in the cake 2.0 book. > > When I bro

Re: mod rewrite google apps question

2011-10-24 Thread Ken Frey
Oh I see. I was trying to put it in the main app folder and replacing the original htaccess. On Oct 24, 2011, at 4:25 PM, Andras Kende wrote: > Just place it into the app/webroot/randomgooglefilename.html folder so it > will be served directly > > Andras Kende > > > > On Oct 24, 2011, at 10:17

Re: mod rewrite google apps question

2011-10-24 Thread Andras Kende
Just place it into the app/webroot/randomgooglefilename.html folder so it will be served directly Andras Kende On Oct 24, 2011, at 10:17 AM, fly2279 wrote: > If you're using google apps, there is a file that google wants in the > root of the domain to verify ownership. Is there a mod rewrite

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Yup. CakePHP 1.3. The view is in \app\views\providers\view_admit_lookup.ctp The controller file name is providers_controller.php. I added the variable that you suggested to the model file (which is called Provider.php) and I get the same error :-( . On Mon, Oct 24, 2011 at 2:03 PM, Jeremy Burn

Cake2.0 not recognizing my PHPUnit installation

2011-10-24 Thread andrewperk
Hello, I have PHPUnit 3.5.15 installed on Linux, PHP 5.3.5, it was installed using the pear installer per the directions in the cake 2.0 book. When I browse to localhost/myapp/test.php, cake tells me PHPUnit is not installed. It tells me to run some commands to install it. So I tried running thos

How to send JSON data when REST Testing with PHPUnit in CakePHP 2.0

2011-10-24 Thread mchavarriagam
Hi all, I'm new to CakePHP and decided to start with 2.0 so I hope my newbie questions aren't _too_ offensive. (: I've been trying for a few days to implement testing for my REST controllers in CakePHP with no avail. I've looked at some examples from the book and the bakery but still no luck. The

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Did you change anything? This is 1.3, right? The filename should be providers_controller.php Change the code as per my post below. The view should be in /app/views/providers/ Add $var $name = 'Provider'; to the beginning of the Provider model file. Jeremy Burns Class Outfit http://www.classoutf

Re: mod rewrite google apps question

2011-10-24 Thread fly2279
That seems to give me an internal server error, 500 when I try that. On Oct 24, 11:47 am, Andrey Puhalevich wrote: > RewriteRule ^$ app/webroot/    [L] > RewriteCond %{REQUEST_URI} !^/?(idevaffiliate|phpmyadmin|google).*$ > RewriteCond %{REQUEST_URI} !^/?(crossdomain.xml|robots.txt|favicon.ico| >

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
This is my view: http://bin.cakephp.org/view/1913574686 This is my controller: http://bin.cakephp.org/view/1556854836 This is my model: http://bin.cakephp.org/view/416003093 This is the error that I'm getting: Missing Controller *Error: **ProviderController* could not be found. *Error: *Create t

Re: Implementing a search functionality

2011-10-24 Thread Jeremy Burns | Class Outfit
Your controller names should be plural; try: class ProvidersController extends AppController { var $name = 'Providers'; Jeremy Burns Class Outfit http://www.classoutfit.com On 24 Oct 2011, at 18:24, Yves S. Garret wrote: > Ok, this is weird. > > I found this tutorial on doing searches. >

Re: Implementing a search functionality

2011-10-24 Thread Yves S. Garret
Ok, this is weird. I found this tutorial on doing searches. http://mrphp.com.au/code/search-forms-cakephp That's good. Now, this is my Model: http://bin.cakephp.org/view/1495255597 View: http://bin.cakephp.org/view/814828491 Controller: http://bin.cakephp.org/view/1212386780 Now, when I run the

Re: mod rewrite google apps question

2011-10-24 Thread Andrey Puhalevich
RewriteRule ^$ app/webroot/[L] RewriteCond %{REQUEST_URI} !^/?(idevaffiliate|phpmyadmin|google).*$ RewriteCond %{REQUEST_URI} !^/?(crossdomain.xml|robots.txt|favicon.ico| sitemap.xml)$ RewriteRule (.*) app/webroot/$1 [L] -- Our newest site for the community: CakePHP Video Tutorials http://tv

Re: Problem initialising i18n table using UUID in cake console

2011-10-24 Thread André Fischer
Ah - if that works, that would be great. I'm new to Cake, and was leery of just diving in and doing things to the database behind Cake's back, as I've burnt myself in the past doing that to/with other Frameworks. :) Apart from that, I'm amazed how brilliant CakePHP2 is, and the more I dig in, the

pagination and canonical tag

2011-10-24 Thread euromark
this site states pretty clearly on how to use canonical http://www.johnfdoherty.com/do-bing-and-google-treat-relcanonical-differently/ " When should I definitely NOT use the canonical tag? A few times exist when you should not use the canonical tag, and instead use a different tactic: On paginate

Re: Can Cake support sqllite for PHP4?

2011-10-24 Thread euromark
may I ask why you will use a prehistoric PHP4 for a new website? this makes no sense at all - for me, anyway... usually you only develop on PHP4 (nowadays) if you have to maintain an already build app. but even then you should port it to PHP5 asap. please elaborate. mark On 24 Okt., 15:14, 玮成 叶

Re: Can't get mod_rewrite to work correctly

2011-10-24 Thread Yves S. Garret
Ugh, had lighthttpd running as another server and had no clue that it was there. Killed it and everything went just peachy. On Sun, Oct 23, 2011 at 9:25 PM, Yves S. Garret wrote: > Yes, that's what I did. I went to localhost and then saw that I had in the > error logs. > > The error logs _shoul

mod rewrite google apps question

2011-10-24 Thread fly2279
If you're using google apps, there is a file that google wants in the root of the domain to verify ownership. Is there a mod rewrite rule I can add to the htaccess file so that when navigating to http://mysite.com/randomgooglefilename.html you can access that file instead of going through cakephp?

Re: How do you track your issues / bugs ?

2011-10-24 Thread Ilay Avni
Thank you all for your feedback! On Oct 11, 1:13 pm, Zaky Katalan-Ezra wrote: > I am using Unfuddle with great success. > I also like Trac > > On Tue, Oct 11, 2011 at 11:52 AM, euromark wrote: > > > > > > > > > exactly, jeremy :) > > same with me

Can Cake support sqllite for PHP4?

2011-10-24 Thread 玮成 叶
Hello, My team and I are going to develop a small Web app with PHP4 and Sqllite3.x.x. We have decided to use CakePhp1.3. We wanted to configurate the database configurations as follow: var $default = array( 'driver' => 'sqllite', 'persistent' => false, 'host' => 'localhost', 'port' => '', 's

Overriding form helper error messages in CakePHP 2.0

2011-10-24 Thread Richard@Home
Hi all. I have the following $validate in my User model: var $validate = array( 'email'=>array( 'required'=>array( 'rule'=>'notEmpty', 'message'=>'cannot be blank'

Re: Figuring out CakeEmail in Cakephp 2.0

2011-10-24 Thread fly2279
I debugged the MailTransport.php in the core and then debugged php's mail function. Turns out it was giving an error for smtp server. I changed my php.ini to reflect my isp and all works well now. I'll leave the original post in case anyone else has this problem and can't figure out why because cak

Re: Can't change color of rows in table?

2011-10-24 Thread Yves S. Garret
Jinx :-) On Mon, Oct 24, 2011 at 9:49 AM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > I just modified the bin paste... > > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 24 Oct 2011, at 14:45, Jeremy Burns | Class Outfit wrote: > > Shouldn't the altrow

Re: Can't change color of rows in table?

2011-10-24 Thread Jeremy Burns | Class Outfit
I just modified the bin paste... Jeremy Burns Class Outfit http://www.classoutfit.com On 24 Oct 2011, at 14:45, Jeremy Burns | Class Outfit wrote: > Shouldn't the altrow class be applied to alternating rows rather than the > table? > > Jeremy Burns > Class Outfit > > http://www.classoutfit.c

Re: Can't change color of rows in table?

2011-10-24 Thread Yves S. Garret
Call me dense, but how would I do that? The main loop goes through the different rows and assigns something to them. Do something like this in a view? $prov): ?> On Mon, Oct 24, 2011 at 9:45 AM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com>

Re: Can't change color of rows in table?

2011-10-24 Thread Jeremy Burns | Class Outfit
Shouldn't the altrow class be applied to alternating rows rather than the table? Jeremy Burns Class Outfit http://www.classoutfit.com On 24 Oct 2011, at 14:40, Yves S. Garret wrote: > It does... sort of. Now it's all just gray. > > Here is my view: > http://bin.cakephp.org/view/1436687402 >

Re: Can't change color of rows in table?

2011-10-24 Thread Yves S. Garret
It does... sort of. Now it's all just gray. Here is my view: http://bin.cakephp.org/view/1436687402 On Sun, Oct 23, 2011 at 9:28 AM, Arno.E wrote: > Actually, it is working. You're setting the background color to *white*. > If you want to change the background color to something like #f5f5f5

Re: Figuring out CakeEmail in Cakephp 2.0

2011-10-24 Thread fly2279
Yes I have. On Oct 23, 10:56 pm, Graham Weldon wrote: >  Did you create an email configuration file? > > app/Config/email.php > > There is a default one at: app/Config/email.php.default > > Cheers, > Graham Weldon > > > > > > > > On Monday, 24 October 2011 at 2:33 PM, fly2279 wrote: > > I'm tryi

Re: Problem initialising i18n table using UUID in cake console

2011-10-24 Thread euromark
my guess: cake doesnt support uuids for those things on "initialize" but you could probably change the field manually to uuid afterwards then it should work again On 24 Okt., 09:59, André Fischer wrote: > I created a database that uses UUIDs exclusively for all id fields. > When I use cake i18n

Problem initialising i18n table using UUID in cake console

2011-10-24 Thread André Fischer
I created a database that uses UUIDs exclusively for all id fields. When I use cake i18n to initialise the table in the database to make various models translatable, it creates an id fiend as INT instead of CHAR(36), which breaks the translation behaviour. Am I doing something wrong, or is this a b

Re: Can't get Plugin model to work / be noticed at all

2011-10-24 Thread majna
Maybe if you paste your AppController, models and controllers code related to Event model and associated models? You can remove irrelevant methods etc. http://bin.cakephp.org -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questio

Exceptions, best practice

2011-10-24 Thread flosky
Hi everyone, I am going to rewrite my app with cake 2.0 and want to make sure I understand everything before I start. I just read the chapter on Exceptions and want to clearify some things. 1) Even though I could use try / catch within my app, it is recommended to use the build in Exception handl

Re: Can't change color of rows in table?

2011-10-24 Thread WebbedIT
White on white, ROFL :P On Oct 23, 2:28 pm, "Arno.E" wrote: > Actually, it is working. You're setting the background color to *white*. If > you want to change the background color to something like #f5f5f5 in line > 170, it should show up. -- Our newest site for the community: CakePHP Video Tut

Re: Moving part of a Tree in other section

2011-10-24 Thread WebbedIT
I asked to see your code twice and Jon has also asked .. if you don't answer the questions people trying to help you are asking, then you may find answers to your questions hard to come by! We cannot debug code we cannot see, but glad you got it working :) Paul. On Oct 23, 6:37 pm, Constantin FF

Re: Validate date from model

2011-10-24 Thread Andrey Puhalevich
var $validate = array( 'end_date' => array( 'comparison' => array('rule'=>array('field_comparison', '>', 'start_date'), 'allowEmpty'=>true), ), ); function field_comparison($check1, $operator, $field2) { foreach($check1 as $key=>$value1) {

Giveaway: CodeLobster PHP IDE Professional edition

2011-10-24 Thread Nuno Freitas
Hi, I hope this is okay to publish here. I thought you guys might be interested. Broculos.net is giving away 3 full professional licenses for the PHP IDE CodeLobster. CodeLobster has several paid plugins for common CMSs and frameworks, including one for CakePHP. Participate and see a full rev

cakephp 2.0 Cookbook blog tutorial - problem with autentication component

2011-10-24 Thread Sebastien Beausoleil
Hi, I work on the cookbook blog tutorial. A piece of code give me a bug. When I try to access to www.example.com/posts/add , I am forward to the home page. But, when I comment the line (orange highlighted), I can access to the /posts/add page. I think it could be related with the authcomponent