Blog to discuss cakePHP issues
My blog CakePHP issues: http://bhooshanahirrao.wordpress.com/2010/04/05/cakephp-problems/ 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 from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe, reply using "remove me" as the subject.
Re: Validation for FCK Editors field
I have created form in cakephp using $form object and i am accesing it by id in js function. Generally we do validation in JS only so we always mix JS and php to get results. I have followed http://bakery.cakephp.org/articles/view/using-fckeditor-with-cakephp to integrate fck. On 4 Sep, 16:26, Aivaras wrote: > Why is it bad to mix JS with PHP? You can get some seriously cool results. > Or when you need a custom ID for your element which you created via ajax, > you still have to use PHP > > Faifas > > On Fri, Sep 4, 2009 at 13:55, martinp wrote: > > > I would ask in a Javascript forum unless you're mixing up your PHP > > and Javascript, which would be bad. > > > On Sep 4, 12:18 pm, bhushan A wrote: > > > Hi All, > > > > I have integrated fck editor in cakephp. But unable to apply JS > > > validation for that field. I have tried with > > > " document.getElementById('').value". But it is > > > showing blank value though i have entered sometext in it. Please > > > help. > > > You can mail me on bhushanahir...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Validation for FCK Editors field
Hi All, I have integrated fck editor in cakephp. But unable to apply JS validation for that field. I have tried with " document.getElementById('').value". But it is showing blank value though i have entered sometext in it. Please help. You can mail me on bhushanahir...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Final solution for Autocomplete In cake1.2
Hi all, i have read too many posts for Autocomplete In cake1.2 . Discussion was too long but problem remains unresolved. Can anyone tell me exact solution for this. I have gone through "http://bakery.cakephp.org/ articles/view/autocomplete". But its for 1.1. I have added component in controllers/components. Added "var $components = array('Autocomplete'); var $helpers = array('Html', 'Javascript', 'Ajax'); " lines in controller. and written test_auto() in controller function test_auto() { } and in view (test_auto.thtml) i have wriiten these lines: " link('prototype'); echo $javascript->link('scriptaculous'); echo $ajax->autoComplete('User.login_name'); ?> Still not working. Please help me.. " --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
File Upload validation in cakephp 1.2
Hi All, I have done with file uploading functionality in cakephp. But i want to apply validation (i.e. Please upload file.. ) . How to actieve this. I have created $validate array in model. waiting for reply. Please guide me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Issue in validation
Yes i am using default.ctp. flash();?> line is present in that file. .. I Have fount that if i will enter wrong data then after submitting form, it is not inserted in DB but not displaying error message also. Any other file which needs to be modified for this. Please guide.. thanks for reply.. On Jun 29, 6:00 pm, Vijay Kumbhar wrote: > Hello Bhushan, > > Cake php uses that default layout file to show the common layout.And it > takes the home.ctp in pages folder. > > Are you using default.ctp for default layout? > > If not please refer that file. > You can get that file in the project > folder=>app=>views=>layouts=>default.ctp > > In default.ctp you will get a line of code that is, > > flash();?> > > This line produce the inbuilt errors that are from the validate. > > So if you are not using that default.ctp file then use that line of code > every where in the code at the top. > > > > On Mon, Jun 29, 2009 at 6:00 PM, bhushan A wrote: > > > Hi all, > > > I am facing issue in displaying error message for validation. > > I have added following code in model > > > var $validate = array( > > 'product_name' => VALID_NOT_EMPTY > > ); > > > and following code in view file i.e. add.thtml > > > input('product_name', array('size' => '15', 'name' > > => 'product_name', 'error' => false)); ?> > > error('.product_name', 'Please enter > > product name'); ?> > > > But it is not displaying error message. Can anybody help me? Do we > > need to modify controller also for validation? > > -- > Thanks & Regards, > Vijayk. > Co-founder (www.weboniselab.com) > > "You Bring the Dreams, We'll Bring the Means" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Issue in validation
Hi all, I am facing issue in displaying error message for validation. I have added following code in model var $validate = array( 'product_name' => VALID_NOT_EMPTY ); and following code in view file i.e. add.thtml input('product_name', array('size' => '15', 'name' => 'product_name', 'error' => false)); ?> error('.product_name', 'Please enter product name'); ?> But it is not displaying error message. Can anybody help me? Do we need to modify controller also for validation? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Paypal Integration
Hi All, Can anybody tell me any link which guides me how to implement payment gateway in cake? Please mail me on bhushanahir...@gmail.com. Thanks Bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Bootstrap variable
I am setting variable like- "Configure::write('site_new','/'.$_SERVER ["HTTP_HOST"].'/abc');" in bootstrap.php.. and accessing it in view as - "echo $site_new". please reply On Jun 19, 8:49 am, Stu wrote: > Well, it seems that yourvariableisn't defined. > > Could you post yourbootstrapcode along with how you're reading your > variables in the view? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Bootstrap variable
I have problem in accessing variable which is set in config/ bootstrap.php. I have set 2 variables using Configure::write(). I can access one variable in views/ folder but unable to get other in views folder .. it giving "Notice (8) . Undefined Variable" error. Can you please suggest, what can be the issue. Waiting for your replies. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Bootstrap variable
I have problem in accessing variable which is set in config/ bootstrap.php. I have set 2 variables using Configure::write(). I can access one variable in views/ folder but unable to get other in views folder .. it giving --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
testing in cakephp 1.2-Bug- Database table user_tests for model UserTest was not found
I have followed the steps mentioned 'http://bakery.cakephp.org/ articles/view/testing-models-with-cakephp-1-2-test-suite' LINK. I am putting my user.test.php's code here. Please let me know what i am missing. UserTest =& new UserTest (); $result = $this->UserTest ->inactive(array('id', 'name')); $expected = array( array('UserTest ' => array( 'id' => 1, 'name' => 'User Communities' )) ); $this->assertEqual($result, $expected); } } ?> I am getting Database table user_tests for model UserTest was not found error. How tables for test suites are automatically created? Do i need to any setting in database.php or user_test_fixtures.php file? Please reply. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: testing in cakephp 1.2-Bug-Class 'Usel' Not found
hey thanks amit... it worked but not its giving following error. Error: Database table user_tests for model SiteTest was not found. what to do? please help On Apr 18, 10:45 am, "Amit Badkas" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 18, 2008 at 10:54 AM, bhushan A <[EMAIL PROTECTED]> > wrote: > > > > > I have followed the steps given in "http://bakery.cakephp.org/ > > articles/view/testing-models-with-cakephp-1-2-test-suite<http://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1...>" > > link. But > > still I am gettng 'Fatal error: Class 'User' not found in /tests/cases/ > > models/user.test.php' I am putting my user.test.php's code here. > > Please let me know what i am missing. > > > > App::import('User','User'); > > - You need to do App::import('Model', 'User'); here > > -- > Regards, > Amit > > http://amitrb.wordpress.com/http://coppermine-gallery.net/http://cheesecake-photoblog.org/http://www.sanisoft.com/blog/author/amitbadkas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
testing in cakephp 1.2-Bug-Class 'Usel' Not found
I have followed the steps given in "http://bakery.cakephp.org/ articles/view/testing-models-with-cakephp-1-2-test-suite" link. But still I am gettng 'Fatal error: Class 'User' not found in /tests/cases/ models/user.test.php' I am putting my user.test.php's code here. Please let me know what i am missing. UserTest =& new UserTest (); $result = $this->UserTest ->inactive(array('id', 'name')); $expected = array( array('UserTest ' => array( 'id' => 1, 'name' => 'User Communities' )) ); $this->assertEqual($result, $expected); } } ?> Please reply. Waiting for your reply. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Notice (8): Undefined index: in cakephp 1.2
Hi all, I am upgrading my cakephp 1.1 application to cakephp 1.2 . But i am getting error "Notice (8): Undefined index:xyz in app/controllers/ abc_controller.php" "Notice (8): Undefined variable:xyz in app/controllers/ abc_controller.php" Can anybody tell me which changes i have to do and in which files.? Reply. Thanks Bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Unit Testing of cakephp 1.1 (not cakephp 1.2)
can u please provide me the particular link. On Mar 28, 10:13 pm, "Sonic Baker" <[EMAIL PROTECTED]> wrote: > There is a test suite in cakeforge for 1.1. IIRC there are instructions for > installing it there. I've only used it to test models and there are no > fixtures. I use Selenium then to test my controllers indirectly through the > UI. > Let me know if you need more help. > Might not be able to reply till Monday though. > > Cheers, > > Sonic > > On Thu, Mar 27, 2008 at 6:55 AM, bhushan A <[EMAIL PROTECTED]> wrote: > > > Can anybody help me how to do unit testing of cakephp 1.1.. i ahve > > gone though this link - > >http://cakebaker.42dh.com/2006/12/18/testing-with-cakephp-12-a-preview/ > > . But its only for 1.2 version. how can i achieve this.? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Unit Testing of cakephp 1.1 (not cakephp 1.2)
Can anybody help me how to do unit testing of cakephp 1.1.. i ahve gone though this link - http://cakebaker.42dh.com/2006/12/18/testing-with-cakephp-12-a-preview/ . But its only for 1.2 version. how can i achieve this.? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
validation issue
Hi all there is one variable set as follows define('abc', 0.05); in core.php. This value of abc is for users login. i want to make it 0.01 for admin login. how can i achieve this. Please help Bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Validation of one field for two different pages in cakephp.
please share the link if u have . thanks bhushan On Feb 21, 3:40 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > Try searching the group, also the bakery. This has been answered before. > > On Thu, Feb 21, 2008 at 3:01 AM, bhushan A <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > i have one field 'abc'(numeric) in 'xyz' table .i want to provide > > validation for two different logins.. i.e for users login, this field > > should not exceed '5' and for admin's login this should not exceed > > '1' . How to achieve this. Should i change Model or view.? > > Please help. > > > Bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Validation of one field for two different pages in cakephp.
Hi all, i have one field 'abc'(numeric) in 'xyz' table .i want to provide validation for two different logins.. i.e for users login, this field should not exceed '5' and for admin's login this should not exceed '1' . How to achieve this. Should i change Model or view.? Please help. Bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination and search.
I had already gone through all the links u had given. but it wont work for me. I have added one textbox below view page(Index) and when i am entering my search criteria then records are coming properly but number of pages are not as per number of records. On Jan 28, 12:02 pm, "R. Rajesh Jeba Anbiah" <[EMAIL PROTECTED]> wrote: > On Jan 28, 10:56 am, bhushan A <[EMAIL PROTECTED]> wrote: > > > I have achieved 'pagination' and 'search' differently. Means when i > > am putting my search criteria in text field then records are getting > > displayed as per search criteria but but pagination is not as per > > search criteria. How to achieve it? Do i need to change controller? > > If yes then what to change? Please help me. > > Seehttp://groups.google.com/group/cake-php/web/frequent-discussions > > -- > > Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Pagination and search.
Hi all I have achieved 'pagination' and 'search' differently. Means when i am putting my search criteria in text field then records are getting displayed as per search criteria but but pagination is not as per search criteria. How to achieve it? Do i need to change controller? If yes then what to change? Please help me. Bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to implement "Export to CSV" link in cake-php
hi I got helper class.But i want to put "Export to CSV" link on view page(.thtml page). What changes do i need to do in controller, model and view page? Please explain., On Jan 9, 6:49 pm, nate <[EMAIL PROTECTED]> wrote: > On Jan 9, 1:32 am, bhushan A <[EMAIL PROTECTED]> wrote: > > > Hi all, > > >Can anybody help me how to write code for "Export to CSV" link? Or > > there is any provision in cake php for that.? > > http://us3.php.net/fputcsv > > >please reply me on [EMAIL PROTECTED] > > No. The point of this mailing list is that it's public, so everyone > can benefit. Expecting that people will email you directly is selfish > and rude. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination
Hi, i have achieved dynamic pagination. But got one bug. I have made one text field which takes input from user for "Records per page". Its displaying records as per field but when i am clicking on next page link then records displayed are 'default'(Not as per field's input). what to change? Reply [EMAIL PROTECTED] Thanks Bhushan On Jan 21, 5:58 pm, Nasko <[EMAIL PROTECTED]> wrote: > Have you read the second page of the article you were referring to? > There are links to online demos by AD7Six in it. > Anyways, I think the answer you're looking for can be found > here:http://www.ad7six.com/Pagination/Named > > Use the 'show' param and make sure it's not listed in 'privateParams'. > > HTH > > On 21 Ян, 11:01, bhushan A <[EMAIL PROTECTED]> wrote: > > > I have followed steps as per > > linkhttp://bakery.cakephp.org/articles/view/pagination.Paginationisachieved > > but its displying Result per page = 20 by > > default. I want to take that from user. There is one function > > resultPerPageSelect() in view/helper/pagination.php . We have to call > > it in views/elements/pagination.thtml. But i am not getting how to > > call it. Please suggest some way to achieve this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Pagination
I have followed steps as per link http://bakery.cakephp.org/articles/view/pagination. Pagination is achieved but its displying Result per page = 20 by default. I want to take that from user. There is one function resultPerPageSelect() in view/helper/pagination.php . We have to call it in views/elements/pagination.thtml. But i am not getting how to call it. Please suggest some way to achieve this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
column sorting...
Is there any class / library available to acieve column sorting in cake php.? please reply me on [EMAIL PROTECTED] bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to implement "Export to CSV" link in cake-php
Hi all, Can anybody help me how to write code for "Export to CSV" link? Or there is any provision in cake php for that.? please reply me on [EMAIL PROTECTED] bhushan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Undefined index in app_controller
I am getting error as Undefined index error in app_controller.php when I am trying to move on page which requires database connection. What configuration do i need to do more? Please reply me on [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
update table with text box values..
can u help me ? how to get values from text box to use them in model or controller --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---