Re: After validation data is getting cleared

2010-04-08 Thread Jeremy Burns
A few quick observations... Your 'minLenght' validation rules are spelt incorrectly. Should be 'minLength'. Try using echo $this->Form->input('Model.fieldName', array('class' => 'fullwidth')); . Notice I use the model name as well. This ought to make your $form-error statements redundant too.

Re: After validation data is getting cleared

2010-04-08 Thread Ambika Kulkarni
Hi John, In the model(user.php) I am doing the validation array( 'rule' => array('minLenght', 1), 'required' => true, 'allowEmpty' => false, 'message' => 'Please enter a value for the Name field' ), 'telephone' => array( 'rule' => array('minLenght', 1),

Re: Any popular Image Components being used that are better than the rest?

2010-04-08 Thread nurvzy
Might as well add my plugin to the list as well. CakePHP FileUploadPlugin Comes with a component, behavior, and helper. The helper can/will resize and cache images on the fly for you. http://www.webtechnick.com/blogs/view/221/CakePHP_File_Upload_Plugin -Nick On Apr 8, 11:14 am, Miles J wrote:

Re: Passing variable from a controller to another controller

2010-04-08 Thread aveev
Thanks, both of them works, but I prefer Burns way. So here's what I do : //in ApplicantsController function process() { if(array_key_exists('confirm',$this->params['form'])) { $this->ApprovedApplicant->set($this->data['Applicant']); if($this->ApprovedApplic

HtmlHelper and Routes

2010-04-08 Thread Signified
If I create this route: Router::connect('/login', array('controller' => 'users', 'action' => 'login')); Then I use the HtmlHelper to create a hyperlink in a view like this: echo $this->Html->link('Login', array('controller' => 'users', 'action' => 'login')); I would expect to get this: Login

Re: Let's get rid of The Bakery

2010-04-08 Thread jacmoe
It would be nice to get some feedback from someone *in* the CakePHP team. I am not interested in letting it die, but it cannot continue the way it does now. If you need any help - which I bet you do - just say the word. Moderation and code review of the Bakery itself - there's some strange glitch

Problem running shell task with DB access on HostGator

2010-04-08 Thread FrederickD
I was successfully able to create a shell with a task that contains DB access and get it to run on DreamHost in either SSH or cron. However, our project lead chose to host the site on HostGator. As you know, each hosting service differs ever so slightly in their implementation. At this point I can

Re: Cakephp & Postgres 99 ms for INFORMATION_SCHEMA queries???? What gives?

2010-04-08 Thread altermod
So this is what I get for a simple login with one select query to compare the email and password. This is not going to scale well to a high traffic website What is the deal with all the additional queries to the database? 2010-04-08 13:03:41.448 PDT,"postgres","2_db", 4422,"192.168.1.130:4179",4b

Re: Cakephp & Postgres 99 ms for INFORMATION_SCHEMA queries???? What gives?

2010-04-08 Thread altermod
The Begin/Rollbacks are still showing up in the Postgres log. There are still a ton of useless selects and I'm not even doing a query. On Thu, Apr 8, 2010 at 12:33 PM, Jeremy Burns wrote: > What happens if you place var $persistModel = true; in your > app_controller? > > Jeremy Burns > jeremy

Re: Cakephp & Postgres 99 ms for INFORMATION_SCHEMA queries???? What gives?

2010-04-08 Thread Jeremy Burns
What happens if you place var $persistModel = true; in your app_controller? Jeremy Burns jeremybu...@me.com On 8 Apr 2010, at 20:30, altermod wrote: > John, > > I have set my debug to zero and am looking at the database logs and I still > see alot of begin / rollback / set queries on the d

Re: Cakephp & Postgres 99 ms for INFORMATION_SCHEMA queries???? What gives?

2010-04-08 Thread altermod
John, I have set my debug to zero and am looking at the database logs and I still see alot of begin / rollback / set queries on the database. This is troubling to see that all these transactions occur for a simple login with only 1 query. Do you have any idea whether or not all these excessive tra

Re: best way to cascade against a HABTM relationship?

2010-04-08 Thread John Andersen
Hmm, I will try to understand what you want to happen using this little example: Service A is related HABTM to Contact A Service A is related HABTM to Credential B Service B is related HABTM to Contact A Service B is related HABTM to Credential A Let's say that Service A is deleted - do you want

Re: Cakephp & Postgres 99 ms for INFORMATION_SCHEMA queries???? What gives?

2010-04-08 Thread John Andersen
My question is, have you turned debug off? If you are still developing the application, then you probably will always have debug turned on, and thus you will always see the schema information. When you are ready to realize your application in a production environment, you must turn debug off, and

Re: Any popular Image Components being used that are better than the rest?

2010-04-08 Thread Miles J
I have also written an upload plugin. Its not super powerful, but it does the most basic of tasks. http://www.milesj.me/resources/script/uploader-plugin On Apr 8, 3:18 am, Vadim Frolov wrote: > MeioUpload could help > > Vadim. Check out the new CakePHP Que

Re: naming convention

2010-04-08 Thread Miles J
However, you don't need a controller per model. The controller can be whatever you want. On Apr 8, 7:39 am, Jeremy Burns wrote: > First convention: one message is probably enough! > > model: filename adb_usre.php, model name AdbUsre > view directory: adb_usres > controller: filename adb_usres_con

Re: CakePHP 1.3 Router configuration

2010-04-08 Thread mark_story
I don't see anything wrong with that, other than it won't work for controllers that have CamelCaseNames. -Mark On Apr 8, 4:53 am, Gianluca Gentile wrote: > Not work... :( > > This route: > > Router::connect('/' . strtolower($controllerName) . '/:action/ > *',array('controller' => strtolower($con

Re: My App is Getting too Slow

2010-04-08 Thread Ayman Bedair
That is what i get from the debug timer: http://www.eg-host.net/887.jpg I still have no clue what takes most of the time and what is the normal time of doing the core processing :S ANY HELP?! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related

Re: Cakephp & Postgres 99 ms for INFORMATION_SCHEMA queries???? What gives?

2010-04-08 Thread altermod
Hi John, It still seems to be calling those queries every time I go to the login page. I don't even run any db queries of my own on the login page. When is it going to start caching? Or do I have to change a setting in the config? I'm running Postgres 8.3. Thanks. Adam On Thu, Apr 8, 2010 at 1:

poll system with cakephp(help me)

2010-04-08 Thread hoss7
hi i need create poll system in cakephp i need some ideas or source code if your idea have ajax system is much better 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 Goog

Re: Blog to discuss cakePHP issues

2010-04-08 Thread Sam Sherlock
I agree with WebbedIT & euromark I have tried IRC (via firefox ext) but had difficulty and ended up feeling a little incompatible with it; not for me but many do get a great deal of benefit from it Blogs are great for publishing tutorials - that is invaluable ; something that we (cake community)

Re: Inflections on CakePHP Interactive Bake Shell

2010-04-08 Thread Lucca Mordente
Problem solved. I'm using the cake_ptbr plugin which overrides the inflections.php file and I forgot it! Thanks for your patience! On 8 abr, 08:58, Lucca Mordente wrote: > This is exactly my problem. > When I try to bake a controller, the shell expects a model named as > the singular form of the

Re: naming convention

2010-04-08 Thread Jeremy Burns
First convention: one message is probably enough! model: filename adb_usre.php, model name AdbUsre view directory: adb_usres controller: filename adb_usres_controller.php, controller name AdbUsres Next piece of help - read the guide - it's all there: http://book.cakephp.org/view/901/CakePHP-Conv

cakephp pagination and probably route problem too

2010-04-08 Thread laeeq38
Hi There, I am new to cakephp and will appreciate and be greatful for any help. I am working with pagination, however when I click on page 2, the page reloads and still fetches result for page 1. However, the url changes in the address bar to page 2. Following are the steps: 1) I am currently on

Using a controller in a shell task

2010-04-08 Thread Alex P
Hi guys, Can anyone help me out with this. I have a function that I use within say a messages controller, but I also want to call this from a cron shell task. I can get to it by doing various App::imports but then the model - >Behaviors->attach doesn't work. Can anyone provide a definitive soluti

naming convention

2010-04-08 Thread Master Ram
hi.. i have table name: adb_usres what to use for model: view dr: controller: please help me. 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

Table naming convention

2010-04-08 Thread Master Ram
hi.. i have table name: adb_usres what to use for model: view dr: controller: please help me. 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

Re: Table naming convention

2010-04-08 Thread Master Ram
hi.. i am CakePHP beginner, i have table name called: adb_usres how to user naming convention for: model,controller and view dir: please help me Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because y

image upload&watermark(help me)

2010-04-08 Thread hoss7
hi i am new in cakephp and want some ideas or sample source code for create image upload and water mark for some image gallery i need best idea,thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message beca

Re: After validation data is getting cleared

2010-04-08 Thread John Andersen
Please provide more information: 1) What are you doing with the data in $this->data before and after validation? 2) Are you doing other processing of $this->data in beforeFilter function? 3) How does the data structure look like before validation and after? (use debug!) With the above we may bette

Re: My App is Getting too Slow

2010-04-08 Thread Ayman Bedair
I never tried any debuging kit I'll give it a try... and BTW it took 24 ms not 79 ... I am sure the thing is a Cakephp issue. Will try a debug kit and will let you know if I find anything interesting. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP r

Re: Fatal error: Call to a member function on a non-object

2010-04-08 Thread Luck
Thanks Jeremy, you are right, I'm trying to rebuild something it exists, but I'm was doing it as an exercise to improve my knowledge of how the different elements behave. On a real development I would use Auth indeed. If anyone still wants to take a look I would appreciate it. Thanks On Apr 8,

After validation data is getting cleared

2010-04-08 Thread Ambika Kulkarni
Hi all, After validation the data from the filed is disappearing. How to restore the values of the field. I am using text('name', array('class'=> 'fullwidth'))); ?> tag for creating fields. Thanks in advance Ambika Check out the new CakePHP Questions site http://cakeqs.org and help others with

Re: Retrieving old data from model's afterSave method?

2010-04-08 Thread Jeroen
Hi Paul, Thanks for getting back to me. I will study the order in which the queries are performed, as you suggest. If I still can't figure out why it doesn't work the way I'd like to, I'll post my findings here. Thanks again, Jeroen Check out the new CakePHP Questions site http://cakeqs.org and

Re: Auth component and roles

2010-04-08 Thread Jeremy Burns
I engaged my brain and solved this: $this->Session->write('Auth.User.role', $role); Jeremy Burns jeremybu...@me.com (Skype) +44 208 123 3822 (jeremy_burns) (m) +44 7973 481949 (h) +44 208 530 7573 On 8 Apr 2010, at 12:30, Jeremy Burns wrote: > Everything I have read about the Auth component use

Re: Inflections on CakePHP Interactive Bake Shell

2010-04-08 Thread Lucca Mordente
This is exactly my problem. When I try to bake a controller, the shell expects a model named as the singular form of the control name I just gave. Then I can't generate the controller. On 8 abr, 02:17, "Fernando Z. Bob" wrote: > Well, it should. > When i used those 1.2.x versions in my projects I

Re: My App is Getting too Slow

2010-04-08 Thread AD7six
On Apr 8, 12:03 pm, Zaky Katalan-Ezra wrote: > Did you test the queries with other client like phpmyadmin in order to > determine if it's a cake issue or database issue? The sql execution time for Ayman is 79ms, the page loads in 10s (apparently) - it's very obvious the queries themselves aren'

Auth component and roles

2010-04-08 Thread Jeremy Burns
Everything I have read about the Auth component uses a 'role' column in the users table. I want to store a role_id and have a related 'roles' table instead. Is it possible to store the value in the 'name' column of the roles table in the Auth->User variable so that I can retrieve it via $this->Auth

Re: Any popular Image Components being used that are better than the rest?

2010-04-08 Thread Vadim Frolov
MeioUpload could help Vadim. 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: My App is Getting too Slow

2010-04-08 Thread Zaky Katalan-Ezra
Did you test the queries with other client like phpmyadmin in order to determine if it's a cake issue or database issue? 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 Go

Re: CakePHP 1.3 Router configuration

2010-04-08 Thread Gianluca Gentile
Not work... :( This route: Router::connect('/' . strtolower($controllerName) . '/:action/ *',array('controller' => strtolower($controllerName))); it's compatible with CakePHP 1.3? Thanks, Gianluca On 8 Apr, 06:13, mark_story wrote: > Well it might have something to do with the Configure->lis

Re: Blog to discuss cakePHP issues

2010-04-08 Thread euromark
webbedIT is right nothing against another resource, but it must be a proper one and this blog seems to be as wrong as any irc channel for that matter totally nonsense you might want to reconsider "blogging" yourself instead of letting everybody post whatever they want. pick some topics that might

Re: Cakephp & Postgres 99 ms for INFORMATION_SCHEMA queries???? What gives?

2010-04-08 Thread John Andersen
Not quite :) CakePHP will gather your database schema information when you first time invoke your application, thereafter CakePHP will use the cached schema information. Enjoy, John On Apr 8, 9:49 am, altermod wrote: > Oh cool. So its only being called for debug? Thats re-assuring. Thanks John

Re: Blog to discuss cakePHP issues

2010-04-08 Thread WebbedIT
I have to agree about the IRC, tried twice and never again, took ages to get someone's attention and unfortunately I was talked down to when I did. However, I doubt what an individual's blog has to offer as others can not start topics so to have multiple topics all going on within threads the blog

Re: Xhtml tag

2010-04-08 Thread kangur91
It's awesome. Thanks 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 unsu

Re: My App is Getting too Slow

2010-04-08 Thread Ayman Bedair
Well thanks for your help... Actually all 79 queries are made on the same database that runs on the same machine. My app is a CRM application where most of the pages can't be convert to a static one ! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP re

Re: displaying login details

2010-04-08 Thread Hani Sana
$user_id not pass or $user_id is a var so plz check it's value first by echo $user_id; exit; By . 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"