Re: Using Render() in Component->startup()

2009-08-19 Thread ZYP
Ah... sorry for double post. And ok I know where to look at for now. i use $this->controller->render() and also let header $this- >RequestHandler->respondAs('xml') (i'm already do var $components = array('RequestHandler');) but it still won't work. so i tried to see the actual header with header

Re: using jquery with cakephp

2009-08-19 Thread jeremy
am able to do the client side validation using jquery... but is having difficulty in implementing server side validations... so if there is a tutorial on how to use this, i suppose it would be very helpful.. thank you --~--~-~--~~~---~--~~ You received

Re: related to Session->setFlash

2009-08-19 Thread cbhan
thanks a lot for helping. On Aug 19, 6:01 pm, zaboo wrote: > Don't echo $this->Session->setFlash() > > On Aug 19, 8:27 am, Chander Bhan wrote: > > > I always get the digit 1 in the next line of the message sent through > > Session->setFlash from controller, need help --~--~-~--~~--

Re: related to Session->setFlash

2009-08-19 Thread cbhan
Yes, i was doing exactly the same,in views/layouts/default.ctp file of my application.thanks a lot for help On Aug 19, 7:02 pm, Marcelo Andrade wrote: > On Wed, Aug 19, 2009 at 9:27 AM, Chander Bhan wrote: > > > I always get the digit 1 in the next line of the message sent through > > Session->s

Tutorials on implementing server side validation in cakephp using jquery

2009-08-19 Thread jeremy
hai guys, i am looking for tutorials on using cakephp with jquery to implement the server side validations... please send me the links..as am not able to find a proper subject in this material Thamks in advance. --~--~-~--~

Re: Using Render() in Component->startup()

2009-08-19 Thread Dr. Loboto
Set debug to at least 1 to see actual error. Check that in component you call $this->controller->render() ( NOT $this->render() ). Check this call params. On Aug 19, 3:29 pm, ZYP wrote: > Hi, I'm new here :) > > I'm trying to create web service in CakePHP but I have some problem. > First of all

Re: Database Date/Time Functions?

2009-08-19 Thread Dr. Loboto
Actually you messed quotes: 'conditions' => array( "Bar.created >= NOW() - INTERVAL 7 DAY" ) (valid for MySQL, don't know about others) On Aug 19, 3:34 pm, "rich...@home" wrote: > or... > > 'conditions'=>array( >     "Bar.created' >= (NOW() - interval '7 days')" > ) > > On Aug 19, 6:23 am,

Autocomplete not working when created on the fly

2009-08-19 Thread alejandro.lopez.hernan...@gmail.com
Hello guys, I have the following scenario: I have a set of input fields that need to be cloned as requested in order to add more records of a single model, this is my view code: input("FacturaDetalle.producto_id", array('div' => '', 'type' => 'hi

Re: saveAll with a hasMany relationship

2009-08-19 Thread Nancy
I just wanted to add, I'm saving multiple records at a time. So $this- >data might have an index going up to 5 or so with models for 3 or more different things. I did manage to get a hasMany to work, but not with multiple records. $save['Firstname']['firstname']='Margarie'; $sav

saveAll with a hasMany relationship

2009-08-19 Thread Nancy
I was so happy. I finally figured out how to make saveAll work with my HABTM relationship so I figured adding a hasMany would be a piece of cake. I have a little practice data structure set up to test it out. $save[1]['Constoptvalue']['device_id'] = 16; $save[1]['Constoptvalue']

Need advice on testing

2009-08-19 Thread Zac Tolley
I'm currently developer a set of test cases for an app I'm working on. I've read though the docs on creating tests, and have created a set of unit tests for my model, allowing me to make confirm that my model can save, find, update, count data and confirm relationships between tables work. Now I'

Re: Data Formatting Errors

2009-08-19 Thread Andy
Great! Thanks for that. The stuff in the article helped with the saving of the Categories, which had already been created in the database. However, in the case of the Tags, most of the records in the array did not exist in the database. It was not working with either the saveAll () function or as

Re: Problems with print_r

2009-08-19 Thread Brendon Kozlowski (Realm)
If for some reason the $this variable isn't populated or doesn't exist (which as Martin said, you are in trouble if this is the case), print_r won't do anything. Try setting debug to 1 (or 2)...does the app show anything without print_r($this)? On Aug 19, 12:38 pm, Martin Westin wrote: > That s

Re: Security component in older CakePHP version

2009-08-19 Thread majna
https://svn.cakephp.org/repo/trunk/cake/1.1.x.x/ if you need "zip" version, email me. On Aug 19, 4:26 pm, andphe wrote: > Hi there, > > I have a website running a old version of cakePHP (1.1.19.6305), the > fact is that the security component blackhole some legitimate > requests, I traced the is

Re: Inflector and compound names

2009-08-19 Thread jordicakephp
Sorry... Maybe I should have been even more specific (because of the language). My table's name is sede_uves (the compound name), my controller's name is SedeUvesController and my model's name is SedeUve. I would like to define a rule for Cake to deduce SedeUve (the name of the model) from sede_u

Inflector and compound names

2009-08-19 Thread jordicakephp
Good afternoon everybody, I'm trying to define a new rule of type singular-plural so that CakePHP joins magically the table and the model names that these rule refers to. More specifically, I go to inflections.php and write: $irregularPlural = array('sedeuve', 'sedeuves'); But this doesn't work

Re: Problems with print_r

2009-08-19 Thread Martin Westin
That should work even though inside a Cake app you should use debug ($this) for some extra features. (like the debug not printing when you set the app in production mode) var_dump($this) is another one you can try. If none of them work you are in trouble :) On Aug 19, 4:02 pm, "Gildonei Mendes

Re: Sessions and Redirect

2009-08-19 Thread Jukai
Dear All I have same problem with LS, The Session didn't save anything when redirect, it means Auth didnt work!!, i think there is some configure nedeed but i dont know what, i was waste a week for this same problem... HELP!!! best regard --~--~-~--~~~---~--~~ You

Re: How i can use after properties in textarea.

2009-08-19 Thread Travis L
Just testing this, and it seems to work. Try: input('name',array('type' => 'textarea', 'label'=>'name','after'=>'Must be 6 character')); ?> Just add the type => textarea and it worked OK for me. On Aug 18, 2:56 am, arif hossen wrote: > Dear all, > > How i can use after properties in textarea.

Problems with print_r

2009-08-19 Thread Gildonei Mendes A. (Junior)
Hello, I'm using cake to develop a great LMS tool. When I try to use " print_r($this) ", I don't receive any response, only a blank page. Somebody knows if it's a PHP Problem or a Cake Problem ? Thank's a lot --~--~-~--~~~---~--~~ You received this message bec

Re: Possible, saving null with saveField?

2009-08-19 Thread viktor
you could try Model->saveField('fieldName', 'NULL'); On Aug 18, 10:00 am, Martin Westin wrote: > Hi, > I would prefer to be abel to use saveField for a simple ajax inline- > edit functionality. Setting a value is fine, clearing out the field > does not apear to work. I can't seem to call Model->

Using Render() in Component->startup()

2009-08-19 Thread ZYP
I have a problem I want to render WSDL file in browser in order to make is for web service. I looked at this page as tutorial - http://bakery.cakephp.org/articles/view/soap-services-in-cakephp In page 3 the writer showed how to Render() from his Component, my problem this way didn't work. If I p

Re: related to Session->setFlash

2009-08-19 Thread zaboo
Don't echo $this->Session->setFlash() On Aug 19, 8:27 am, Chander Bhan wrote: > I always get the digit 1 in the next line of the message sent through > Session->setFlash from controller, need help --~--~-~--~~~---~--~~ You received this message because you are su

Using Render() in Component->startup()

2009-08-19 Thread ZYP
Hi, I'm new here :) I'm trying to create web service in CakePHP but I have some problem. First of all I would like you to look at this ... http://bakery.cakephp.org/articles/view/soap-services-in-cakephp I followed this article to make web service. And please browse to page 3 and scroll down you

Re: webroot and htaccess

2009-08-19 Thread Jamie
You just need to make the forward slash optional in the regular expression. So this: RewriteCond %{REQUEST_URI} ^/forums/(.*)$ Becomes this: RewriteCond %{REQUEST_URI} ^/forums/?(.*)$ The question mark after the slash makes it optional. - Jamie On Aug 19, 1:13 am, designvoid wrote: > I have

Security component in older CakePHP version

2009-08-19 Thread andphe
Hi there, I have a website running a old version of cakePHP (1.1.19.6305), the fact is that the security component blackhole some legitimate requests, I traced the issue where it compares the age of the _token session variable with the current time, anyways... I would like to try the latest 1.1

Re: i18n

2009-08-19 Thread RhythmicDevil
Thanks Marcelo. I will do as you suggested. On Aug 18, 6:38 pm, Marcelo Andrade wrote: > On Tue, Aug 18, 2009 at 12:30 PM, RhythmicDevil > wrote: > > >(..) > > From what I have read I gather that I wrap all my strings in my views > > with __(). Create language directories in /app/locale like th

Re: auto guest login .. Auth

2009-08-19 Thread Brendon Kozlowski (Realm)
You wouldn't set an auto-login, you simply would not deny access to whatever action(s) you wish them to have access to. On Aug 19, 12:48 am, "Marojahan M.T. Sigiro" wrote: > with Auth.. what should i do to create auto login mechanism for certain user > (e.g. guest) > > anybody has an idea? since

Re: related to Session->setFlash

2009-08-19 Thread Marcelo Andrade
On Wed, Aug 19, 2009 at 9:27 AM, Chander Bhan wrote: > > I always get the digit 1 in the next line of the message sent through > Session->setFlash from controller, need help Are you echoing the Session->setFlash() call from the controller? Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazo

Re: Contain() or INNER JOIN

2009-08-19 Thread Long
Thanks for the reply I have changed my app_model.php to (http://bakery.cakephp.org/articles/ view/quick-tip-doing-ad-hoc-joins-in-model-find) code. How can i use the new FIND() method? $this->Site->find ('matches', array ( 'model' => array ('Job'), 'scope' => array (

Re: Contain() or INNER JOIN

2009-08-19 Thread Martin Westin
You are right (in the subject), you need a join. You can force Cake to do joins if you build something like what Nate wrote about in january: http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find I took some ideas from that and made a joining feature that would join m

Re: If Auth isAuthorize() == false, how to redirect user?

2009-08-19 Thread Bert Van den Brande
Not entirely sure but I think it's "loginAction" you need : http://book.cakephp.org/view/248/AuthComponent-Variables On Wed, Aug 19, 2009 at 5:42 AM, zotium wrote: > > When using the Auth->Authorize = 'controller' method of authorization, > and isAuthorized() returns false, how do you set the URL

Best way to pass parameter to application

2009-08-19 Thread simplesi
Last year I learnt PHP and wrote a ICT helpdesk for some small schools that I'd like to redo using CakePHP. Previously each school used a url e.g http://www.school.com/helpdesk/?vsh_place=NameofSchool to pre-select their school in the database. I believe I should pass the school name using a ur

related to Session->setFlash

2009-08-19 Thread Chander Bhan
I always get the digit 1 in the next line of the message sent through Session->setFlash from controller, need help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to

Re: Contain() or INNER JOIN

2009-08-19 Thread Long
Update: 3 models: sites hasMany jobs jobs belongsTo sites jobs hasMany job_comments job_comments belongsTo jobs Site->Job->JobComment $this->Site->find( 'all', array('fields'=>array('Site.id'), 'conditions' =>array( 'Site.id' => 3), 'contain' => array ( 'Job' => array(

Contain() or INNER JOIN

2009-08-19 Thread Long
Greetings! I have 3 models: jobs hasMany job_comments job_comments belongsTo jobs Site->Job->JobComment Help me please to find works on a site which have 'trouble' comments $this->Site->find( 'all', array ( 'fields'=> array('Site.id'), 'conditi

Re: Strange contain/find issue

2009-08-19 Thread delocalizer
I experienced something similar a while ago and logged this - https://trac.cakephp.org/ticket/6268 Nate's reply was (quite correctly) that I should write a test case to prove/disprove. 4 months later & I still haven't done it :( My lazy solution: refactor my code until it went away! (No excuse rea

Re: Contains and conditions gives rather unexpected results

2009-08-19 Thread Martin Westin
Well the manual might be slightly misleading. The text states that Containable can "filter" the associated data. It is the example output that is wrong (AFAIK), showing data as from a join. Containable does "nothing more" than filter the returned data, model for model. It does not mimic joins. I

Re: Database Date/Time Functions?

2009-08-19 Thread rich...@home
or... 'conditions'=>array( "Bar.created' >= (NOW() - interval '7 days')" ) On Aug 19, 6:23 am, Elmo wrote: > I would like to use the built in database date/time functions as part > of a 'conditions'. How is this done? > > i.e.: select foo from bar where created >= (NOW() - interval '7 > day

Re: webroot and htaccess

2009-08-19 Thread designvoid
I have tried duplicating the lines and removing the trailing slash and also removing it from the existing lines but to no avail... Any ideas? On Aug 19, 3:55 am, brian wrote: > Just remove the trailing slash from the rule: > > RewriteCond %{REQUEST_URI} ^/forums(.*)$ > > On Tue, Aug 18, 2009

Re: Fulltext Index with schema console

2009-08-19 Thread PaSToReT
If you read my post, I said: I know that it is because of the key length is not specified in the schema.php, but I don't know how to do it. Of course, I have searched before. I know how to solve this problem in mysql (adding the key length when you define the index), but I would like t

Re: Data Formatting Errors

2009-08-19 Thread majna
http://groups.google.com/group/cake-php/browse_thread/thread/4f462c16187e9c99/96cc07bb376797b2?tvc=2#96cc07bb376797b2 On Aug 18, 5:10 pm, Andy wrote: > Greetings, all, >      I'm working on a CMS based on CakePHP and I've been enjoying > working with Cake so far. However, I'm having some issues

Re: Database Date/Time Functions?

2009-08-19 Thread majna
move sql operator to the left: conditions'=>array('Bar.created >=' => "(NOW() - interval '7 days')") On Aug 19, 7:23 am, Elmo wrote: > I would like to use the built in database date/time functions as part > of a 'conditions'. How is this done? > > i.e.: select foo from bar where created >= (NOW

Re: Routing with slugs.

2009-08-19 Thread Taff
Thanks for your help. On Aug 18, 2:32 pm, Martin Westin wrote: > You should be alright with something like: > > Router::connect('/optimised_category_name/*', array('controller' => > 'controller_from_cake', 'action' => 'view')); > > Anything beginning with desired controller name is routed to the