Problem in setting the documentroot
Hi..I am always facing the problem in setting up my document root, whenever I tried to create a new project in Cake. I have got solved the problem many times, automatically, after few times struggle..but i could not catch for which modifications, that i have made in the application that it make works. Could it be possible to maintain some fixed steps that i should have to follow from the point of installation of the server to the application setting..so that i should never have face such kind of problems again. I am using APACHE22 as my web server and i had install it through web developer suitThis time my http://localhost page displays an empty page without showing a single error message. I have set my debug level to 3.. and last few lines that had shown by error.log file is as like as [Mon Jul 02 10:28:19 2007] [error] [client 127.0.0.1] PHP Warning: require(cake\\bootstrap.php) [function.require]: failed to open stream: No such file or directory in E:\\www\\webroot\\cake\\scheduler\\main\ \jobscheduler\\webroot\\index.php on line 79 [Mon Jul 02 10:28:19 2007] [error] [client 127.0.0.1] PHP Fatal error: require() [function.require]: Failed opening required 'cake\\bootstrap.php' (include_path='E:\\www\ \webroot\\cake\\scheduler\\main;E:\\www\\webroot\\cake\\scheduler\\main \\jobscheduler\\;.') in E:\\www\\webroot\\cake\\scheduler\\main\ \jobscheduler\\webroot\\index.php on line 79 [Mon Jul 02 10:28:19 2007] [debug] mod_deflate.c(447): [client 127.0.0.1] Zlib: Compressed 0 to 2 : URL /index.php [Mon Jul 02 10:28:19 2007] [debug] mod_headers.c(612): headers: ap_headers_output_filter() --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
regarding javascript
hi,this is reeta.I m new to cakephp.can anyone tell me that how can i set multiple action using javascript on more than one buttion.Suppose I hv 2 submit buttons,first one is save and another one having name goback.I want to give action on these buttons, and they are on a single form.If anybody know then plz answer me. --~--~-~--~~~---~--~~ 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: Problem with beforeValidate()
If you are using 1.2 then its because of validates() call you are issuing (sending a parameter to validates() is deprecated). Even though, and whether you are using 1.1 or 1.2, change: if ( $this->User->validates($this->data) ) { to: if ( $this->User->create($this->data) && $this->User->validates() ) Or better yet change the whole function to: function register() { if ( !empty($this->data) ) { if ( $this->User->create() && $this->User->save($this->data) ) { $this->Session->setFlash('Your registration was successful.'); $this->redirect('/'); exit; } else { $this->Session->setFlash('Please correct marked errors'); } } } Making sure you have Session as an available component in your controller's $components variable. Changes here: 1. Using direct call to save() since it will take care of validation for you. 2. Removed $this->render() since it is redundant. 3. Removed $this->validateErrors() since validation errors for the model will be copied into the used helpers automatically. 4. Using setFlash() of the Session component, and redirecting to action only when needed (in this case I'm redirecting user to home page after successful registration) You can still use $this->flash() though, just a matter of preference. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de [EMAIL PROTECTED] Enviado el: Lunes, 02 de Julio de 2007 12:08 a.m. Para: Cake PHP Asunto: Re: Problem with beforeValidate() beforeValidate() is being invoked through the normal flow, i.e. I am not calling it arbitrarily. Here's my Controller code. Thanks. --~--~-~--~~~---~--~~ 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: A question about integrating jquery in cakephp?
Alright, I got it to work, when I removed the line of code from my default layout, $scripts_for_layout. Can someone please tell me what $scripts_for_layout is used for? Thank you. On Jul 1, 7:51 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > All javascript files need to be placed in app/webroot/js and you need > to include the javascript helper. > > http://manual.cakephp.org/chapter/helpersabout 3/4 down is the > javascript helper documentation > > Geoff > --http://lemoncake.wordpress.com > > On Jul 2, 10:28 am, Jim Newfer <[EMAIL PROTECTED]> wrote: > > > I have been using jquery for about a month now, and I love it to say > > that least. Although, I cannot seem to figure out the best way to > > incorporate it into my cakephp project, or even to incorporate it at > > all! > > > When I used jquery before, I just loaded the jquery.js library in the > > header, and then wrote the javascript in the header in between the > > tags. > > > So I have tried to duplicate this in more ways than one, and none of > > them have worked. I have tried in my default layout, using > > $javascript->link('jquery', false) in the header of my default layout > > trying to > > > get it to work, and then placing $scripts_for_layout in content area > > of the default layout. I have tried including both in the view file, > > and combinations of all of these. > > > Could someone just please explain how and where the files need to go > > when using jquery with cakephp ? Thank you. --~--~-~--~~~---~--~~ 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: javascript function calls
I found out the problem. I am new to web programming and didn't know the error window was for javascript in IE, thought I had copied and pasted correctly. So now I know. Everything is working just fine. Thanks, Jay --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
phpgacl for CakePHP problem in Cake 1.2
Hey, I'm using Cake 1.2 with phpgacl for CakePHP 1.0.2b and I've been having a problem adding permissions. I have fixed a lot of the 1.1 to 1.2 conversion errors, but it's obviously not liking something in either the plugin or the vendor lib itself and is failing to update the database, so it throws a flash error. Has anyone successfully gotten phpgacl for CakePHP to work for Cake 1.2? Is there another plugin that you would recommend for ACL that would give me an actual user interface to assign permissions to groups and users with? Every ACL tutorial I've read has only repeated the same things, in a way that I still don't understand much of it. I know it sounds rash, but I don't have the time to commit to trying to understand ACL the old fashioned way and writing a lib to control it for me. If you think you can help me on either fronts, please let me know. I can send you whatever files you need. --~--~-~--~~~---~--~~ 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: Problem with beforeValidate()
beforeValidate() is being invoked through the normal flow, i.e. I am not calling it arbitrarily. Here's my Controller code. Thanks. function register() { if ( !empty($this->data) ) { if ( $this->User->validates($this->data) ) { $this->User->save($this->data); $this->flash('Your registration was successful.', '/users/ register'); } else { $this->validateErrors($this->User); //$this->flash('An error occurred during your registration.', '/ users/register'); } } $this->render(); } --~--~-~--~~~---~--~~ 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: A question about integrating jquery in cakephp?
Geoff, Yes, am I aware of this, and this is what I have done, not only have I included the javascript helpers in my controllers, I also included them into my AppController so my layout would have access to the javascript helper when calling $this->javascript('file') in the header of my default layout. Strange. On Jul 1, 7:51 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > All javascript files need to be placed in app/webroot/js and you need > to include the javascript helper. > > http://manual.cakephp.org/chapter/helpersabout 3/4 down is the > javascript helper documentation > > Geoff > --http://lemoncake.wordpress.com > > On Jul 2, 10:28 am, Jim Newfer <[EMAIL PROTECTED]> wrote: > > > I have been using jquery for about a month now, and I love it to say > > that least. Although, I cannot seem to figure out the best way to > > incorporate it into my cakephp project, or even to incorporate it at > > all! > > > When I used jquery before, I just loaded the jquery.js library in the > > header, and then wrote the javascript in the header in between the > > tags. > > > So I have tried to duplicate this in more ways than one, and none of > > them have worked. I have tried in my default layout, using > > $javascript->link('jquery', false) in the header of my default layout > > trying to > > > get it to work, and then placing $scripts_for_layout in content area > > of the default layout. I have tried including both in the view file, > > and combinations of all of these. > > > Could someone just please explain how and where the files need to go > > when using jquery with cakephp ? Thank you. --~--~-~--~~~---~--~~ 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: what's wrong with my javascript setting in phpCake?
Sounds to me like a javascript error. Havethe downloaded js files actually got the right code in them, or are they blank or 404 error messages? Some actual code might help as well. Geoff -- http://lemoncake.wordpress.com On Jul 2, 10:45 am, minglee <[EMAIL PROTECTED]> wrote: > Thanks, francky061. > Sorry, that's a mistake in my message. I did use $javascript->('.js') > to load .js files, but it doesn't work. And I checked the generated > html page source, there is .js file included in the header, but when I > call the js functions, 'not difined' errors appear. What is more > strange, when I save the page from browser, all the .js files were > also downloaded in the page folder. But still doesn't work. > > On Jul 2, 12:24 am, francky06l <[EMAIL PROTECTED]> wrote: > > > In the views, the way you would call the helper should $javascript- > > > >() NOT $this->javascript > > > Hope this help > > > On Jul 1, 12:17 pm, minglee <[EMAIL PROTECTED]> wrote: > > > > I am new to phpCake. My phpCake routing is set to 'development'. And I > > > put all .js files into ./cake/app/webroot/js/, and set helper, called > > > '$this->javascript', ect.., did everything as told in the manual, but > > > it does not work. I've tried my other none-cake applications on the > > > same server, they all work well with their js files. So, SOS. Thanks a > > > lot! --~--~-~--~~~---~--~~ 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: A question about integrating jquery in cakephp?
All javascript files need to be placed in app/webroot/js and you need to include the javascript helper. http://manual.cakephp.org/chapter/helpers about 3/4 down is the javascript helper documentation Geoff -- http://lemoncake.wordpress.com On Jul 2, 10:28 am, Jim Newfer <[EMAIL PROTECTED]> wrote: > I have been using jquery for about a month now, and I love it to say > that least. Although, I cannot seem to figure out the best way to > incorporate it into my cakephp project, or even to incorporate it at > all! > > When I used jquery before, I just loaded the jquery.js library in the > header, and then wrote the javascript in the header in between the > tags. > > So I have tried to duplicate this in more ways than one, and none of > them have worked. I have tried in my default layout, using > $javascript->link('jquery', false) in the header of my default layout trying > to > > get it to work, and then placing $scripts_for_layout in content area > of the default layout. I have tried including both in the view file, > and combinations of all of these. > > Could someone just please explain how and where the files need to go > when using jquery with cakephp ? Thank you. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
A question about integrating jquery in cakephp?
I have been using jquery for about a month now, and I love it to say that least. Although, I cannot seem to figure out the best way to incorporate it into my cakephp project, or even to incorporate it at all! When I used jquery before, I just loaded the jquery.js library in the header, and then wrote the javascript in the header in between the tags. So I have tried to duplicate this in more ways than one, and none of them have worked. I have tried in my default layout, using $javascript- >link('jquery', false) in the header of my default layout trying to get it to work, and then placing $scripts_for_layout in content area of the default layout. I have tried including both in the view file, and combinations of all of these. Could someone just please explain how and where the files need to go when using jquery with cakephp ? Thank you. --~--~-~--~~~---~--~~ 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: what's wrong with my javascript setting in phpCake?
Thanks, francky061. Sorry, that's a mistake in my message. I did use $javascript->('.js') to load .js files, but it doesn't work. And I checked the generated html page source, there is .js file included in the header, but when I call the js functions, 'not difined' errors appear. What is more strange, when I save the page from browser, all the .js files were also downloaded in the page folder. But still doesn't work. On Jul 2, 12:24 am, francky06l <[EMAIL PROTECTED]> wrote: > In the views, the way you would call the helper should $javascript- > > >() NOT $this->javascript > > Hope this help > > On Jul 1, 12:17 pm, minglee <[EMAIL PROTECTED]> wrote: > > > I am new to phpCake. My phpCake routing is set to 'development'. And I > > put all .js files into ./cake/app/webroot/js/, and set helper, called > > '$this->javascript', ect.., did everything as told in the manual, but > > it does not work. I've tried my other none-cake applications on the > > same server, they all work well with their js files. So, SOS. Thanks a > > lot! --~--~-~--~~~---~--~~ 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: Problem with beforeValidate()
$this->data[$this->name] will be set with that model's data in the beforeValidate. If this is not happening for you, there is some other error in your application. How is beforeValidate being called - just through Model- >save()? How are you setting the data to be saved, through Model- >set($data) or through Model->save($data) ? Actually, perhaps just post your controller code where this error is occuring. --~--~-~--~~~---~--~~ 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: Safari 3 and Firefox do not understand the urls my cake app is generating...
Except that what you write in a controller action is only one part of what Cake does with a request, and calling exit() is the quickest way to skip all of that. Setting autoRender to false will stop the view from being rendered, but I'm not sure what else would need to be done to end the whole request cleanly after your controller action has executed. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problem with beforeValidate()
I was hoping someone could explain why $this->data['ModelName'] or $this->data is empty when I try to use it in the beforeValidate() callback function. Isn't the point of this function so I can perform additional validation on the form data? Thanks. --~--~-~--~~~---~--~~ 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: Alias in CakePHP - ModRewrite Issue
To use an Alias with CakePHP, you need to add RewriteBase /your_alias_name to the app/webroot/.htaccess file (right after the RewriteEngine On line). And you need to have define ('WEBROOT_DIR', 'your_alias_name'); in your app/webroot/index.php --~--~-~--~~~---~--~~ 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: checkbox 1.2?
The reason for the hidden field is so that you always get something on form submission. Without the hidden field, if a user does not select the checkbox you will not get anything within the data array at all. With the hidden form field you will get it there. Geoff -- http://lemoncake.wordpress.com On Jul 2, 4:34 am, Mech7 <[EMAIL PROTECTED]> wrote: > Umm no i did not read cause it was posted just before i was writing my > message :) but why does it create the hidden field? > > On Jul 1, 8:23 pm, Walker Hamilton <[EMAIL PROTECTED]> wrote: > > > everything for form will be an option on input from now on (for the > > most part.) > > > why would it come back > > > most of those options are just wrappers. do you know how to read php > > code? > > > do you know how to read the english language? Did you not read what I > > wrote regarding the API? --~--~-~--~~~---~--~~ 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: linking problem.
Nop it wasnt a mod_rewrite problem. Maybe stupid but it requires the database table to be made in order to let the linking work. Which I don't really get since db has nothing to do with how path's are made. On 1 jul, 18:54, francky06l <[EMAIL PROTECTED]> wrote: > mod-rewrite problem I guess. Make a search in this group on > "mod_rewrite", you'll probably find the solution > > On Jul 1, 12:56 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > > I just started finding my way in cakephp and I stumbled upon a little > > problem:http://www.laomusic.be/cake/(dontmind "Missing Database Table" > > errors, thats not the problem). > > > The links work perfectly on this page, its the root for the whole > > application(which uses the pagescontroller controller). But once you > > press "gebruikers" or "info" then the links are fucked up, they start > > to link to the url root, sohttp://www.laomusic.be/gebruikers/instead > > ofhttp://www.laomusic.be/cake/gebruikers/asit should be. Why is > > this problem occuring??? --~--~-~--~~~---~--~~ 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: Safari 3 and Firefox do not understand the urls my cake app is generating...
A bit off topic, but I was taught to always structure your code so that execution terminates by falling out the bottom of you routines (i.e. no early exit points). For one, it makes more logical sense in execution flow and is typically easier to maintain. So if you have any clean-up code at the end that needs to execute every time, early exits will bypasses that. By doing it that way, whenever I issue a redirect statement, there's not further code to execute...it falls out the bottom, and there's no need for an exit() call. Am I missing something? I'm first a VB programmer so what do I know :). Although my advice is good advice in that environment, I may be wrong in server-side scripting and web programming. On Jun 29, 6:13 am, "DJ Spark" <[EMAIL PROTECTED]> wrote: >I had this problem a few times, when redirecting to the same URL > with a different variable > /movies/count_votes/ > when it finished, i redirected to the same action, to update other rows > /movies/count_votes/500 > /movies/count_votes/1000 > and so on. > The problem is, if i didn't put an exit(); after the redirect, > apache/php went bonkers, and gave a 404 due to memory problems, i > guess (i don't recall the right text on the error log, but was > something about 'too many children' , and i have none :) > try that! > (the exit, not the child making) > > spark > > On 6/29/07, RLR <[EMAIL PROTECTED]> wrote: > > > > > > > I am having a tough time tracking down what is wrong! > > The problem seems to be two fold: > > > I am using an auth component from the bakery which I load via the > > beforeFilter in app_controller and redirect to "/auth/" and present a > > login view if no vaild session user can be found. > > > When I access the app with FiireFox the browser aborts with the > > message: > > --- > > "The page isn't redirecting properly: > > Firefox has detected that the server is redirecting the request for > > this address in a way that will never complete. > > * This problem can sometimes be caused by disabling or refusing to > > accept cookies." > > > > > When I disable the auth section in app_controller I get a 404 message > > from FireFox in the view area, although the layout is loaded > > correctly. I changed the debug setting in core.php to DEBUG=2. The 404 > > errors remaind and no debug info in FireFox. The apache error log is > > empty. > > > I am running out of ideas. > > > Thanks > > RLR > > -- > [livesets]http://djspark.com.br/ > [web]http://sydi.net > [filmes]http://melhoresfilmes.com.br --~--~-~--~~~---~--~~ 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: checkbox 1.2?
Umm no i did not read cause it was posted just before i was writing my message :) but why does it create the hidden field? On Jul 1, 8:23 pm, Walker Hamilton <[EMAIL PROTECTED]> wrote: > everything for form will be an option on input from now on (for the > most part.) > > why would it come back > > most of those options are just wrappers. do you know how to read php > code? > > do you know how to read the english language? Did you not read what I > wrote regarding the API? --~--~-~--~~~---~--~~ 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: checkbox 1.2?
everything for form will be an option on input from now on (for the most part.) why would it come back most of those options are just wrappers. do you know how to read php code? do you know how to read the english language? Did you not read what I wrote regarding the API? --~--~-~--~~~---~--~~ 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: checkbox 1.2?
Ok adding it as option works.. so i suppose checkbox is not comming back in 1.2 as the htmlhelpers? But it still creates a hidden form also? Is there any reason for this and is there a way to turn it off.. input('publish', array('type' => 'checkbox', 'value' => 'yes')); ?> makes: Publish --~--~-~--~~~---~--~~ 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: checkbox 1.2?
Mech7: use form->input('published', array('type'=>'checkbox')); As for the hidden hidden input, as of the currently live API docs here: api.cakephp.org/1.2, there is no way to turn off the hidden field. --~--~-~--~~~---~--~~ 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: checkbox 1.2?
Umm look where? i have looked in the API and code but it is not there.. http://api.cakephp.org/1.2/class_form_helper.html On Jul 1, 5:27 pm, gwoo <[EMAIL PROTECTED]> wrote: > did you look? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Alias in CakePHP - ModRewrite Issue
Hi everyone, I've tried to make CakePHP working using Alias configuration, but the only thing works its index.php ( /app/webroot/index.php). The controller give me 404 error using /alias/posts/index, but using /alias/?url=posts works. I think its a mod_rewrite issue. I have update the 3.htaccess with RewriteBase /alias, with no success. Anyone can help me ? Thanks!! --~--~-~--~~~---~--~~ 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: Update phpGACL when a user signs up
On 7/1/07, Andreas <[EMAIL PROTECTED]> wrote: > > > I'm using CakePHP 1.1 with phpGACL. I've only tried out Cake for the > last days and now I've finally got an sign up form to work as > expected. But how do I update the corresponding phpGACL tables when a > new user signs up? [..snip..] phpGACL being pretty extensive I'm sure there has to be an easy way of > doing this? (Besides manually using the Import Groups / Users > function) The way I do it is to use the methods provided by the PhpGacl component. eg: function add_user() { // do stuff in your app to add the user.. then: $this->PhpGacl->saveUser( $this->User->getLastInsertID(), $fullUsersName, false ); } You should look at the code in the component to find out what other methods you can use (delete user from PhpGacl, etc). - Gonzalo --~--~-~--~~~---~--~~ 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: Update phpGACL when a user signs up
phpGACL comes with an extensive API. Look at the functions available in the PhpGacl component. To save a user, for example, you would do: $this->PhpGacl->saveUser($userId, $userName); For example if you just created a User with ID #15, then you can do: $this->PhpGacl->saveUser(15, 'User #15'); The second parameter is just a descriptive name to use inside phpGACL Plugin administration. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Andreas Enviado el: Domingo, 01 de Julio de 2007 07:33 a.m. Para: Cake PHP Asunto: Update phpGACL when a user signs up I'm using CakePHP 1.1 with phpGACL. I've only tried out Cake for the last days and now I've finally got an sign up form to work as expected. But how do I update the corresponding phpGACL tables when a new user signs up? --~--~-~--~~~---~--~~ 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: linking problem.
mod-rewrite problem I guess. Make a search in this group on "mod_rewrite", you'll probably find the solution On Jul 1, 12:56 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I just started finding my way in cakephp and I stumbled upon a little > problem:http://www.laomusic.be/cake/(dont mind "Missing Database Table" > errors, thats not the problem). > > The links work perfectly on this page, its the root for the whole > application(which uses the pagescontroller controller). But once you > press "gebruikers" or "info" then the links are fucked up, they start > to link to the url root, sohttp://www.laomusic.be/gebruikers/instead > ofhttp://www.laomusic.be/cake/gebruikers/as it should be. Why is > this problem occuring??? --~--~-~--~~~---~--~~ 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 cache all the view in call ?
gwoo: it's http://manual.cakephp.org/chapter/view_cache I think On 7/1/07, gwoo <[EMAIL PROTECTED]> wrote: > > > http://manual.cakephp.org/chapters/caching > > > > > -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~-~--~~~---~--~~ 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: Cake 1.2alpha path question
With AD7six suggestion I found out some extra space on bootstrap that cause the error log and now it goes back to the original problem of just having a blank page. I really love to be able to get to the bottom of this puzzle. Thanks On Jun 29, 10:15 pm, "chanh.ong" <[EMAIL PROTECTED]> wrote: > Thanks for trying but it makes no diff! > > 2. URL path: /home/groups/c/co/coaddons/htdocs/caketest/app/webroot/ > 3. Error notes: File does not exist: /home/groups/c/co/coaddons/htdocs/ > home/groups/c/co/coaddons/htdocs/caketest/app/webroot/ > > On Jun 29, 7:10 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > In .htaccess put the FULL PATH to your caketest directory as > > rewritebase > > > Putting /caketest will make it look in the system root dir for the > > caketest folder > > > On Jun 30, 6:16 am, "chanh.ong" <[EMAIL PROTECTED]> wrote: > > > > I found something in the error.log but not sure what it meas. > > > > Please take a look at this bin and let me know if you can spot > > > something.http://bin.cakephp.org/view/663507278 > > > > Thanks > > > > On Jun 29, 1:00 pm, "chanh.ong" <[EMAIL PROTECTED]> wrote: > > > > > On the good news, with this rewritebase set to my cake folder then > > > > Cake 1.1 work fine for mod_rewrite on or off at my sourceforge.net > > > > site. > > > > > So there is something different on Cake 1.2alpha to Cake 1.1 > > > > > I would love to be able to figure out the different. Who knows! > > > > > On Jun 29, 12:28 pm, "chanh.ong" <[EMAIL PROTECTED]> wrote: > > > > > > That is interesting suggestion! > > > > > > I put rewritebase /caketest on all .htaccess and I got a blank page > > > > > just like I got start. > > > > > > But I do get something in the process if I put a e(BASE_URL) in the > > > > > dispatcher.php and I got something more than just a blank page. > > > > > > Please take a look at this bin to see if you get spot something. > > > > > >http://bin.cakephp.org/view/663507278 > > > > > > With: rewritebase /caketest > > > > > /home/groups/c/co/coaddons/htdocs/app/webroot/pages/hello > > > > > > With no: rewritebase /caketest > > > > > /home/groups/c/co/coaddons/htdocs/home/groups/c/co/coaddons/htdocs/ > > > > > caketest/app/webroot/pages/hello > > > > > > It is getting closer! > > > > > > Thanks > > > > > > On Jun 29, 11:06 am, francky06l <[EMAIL PROTECTED]> wrote: > > > > > > > So.. back to the beginning then --> mod_rewrite > > > > > > > Just to share a problem I had with one of my hosting provider, to > > > > > > make > > > > > > mod_rewrite works I had to add "rewriteBase /" into .htaccess. > > > > > > > On Jun 29, 5:10 pm, "chanh.ong" <[EMAIL PROTECTED]> wrote: > > > > > > > > Yes, it is part of the disable and enable mod_rewrite. I have a > > > > > > > script to rename all .htaccess and edit core.php to uncomment or > > > > > > > comment that line. > > > > > > > > One other thing I note is on sourceforge it use mmcache where > > > > > > > there is > > > > > > > nothing in Cake configuration to set for it. > > > > > > > > Now that I figure out the docroot and put everything back to the > > > > > > > original setting and now I got the blank page just like I started > > > > > > > a > > > > > > > few weeks ago with Cake 1.2alpha when turn off mod_rewrite and > > > > > > > when > > > > > > > turn mod_rewirte on then I got that error that I posted. > > > > > > > > So, to sum it up! > > > > > > > In Cake 1.2alpha: > > > > > > > . Mod_rewirte off: I will get a blank page > > > > > > > . Mod_rewrite on: I will get this: > > > > > > > /home/groups/c/co/coaddons/htdocs/home/groups/c/co/coaddons/htdocs/ > > > > > > > caketest/app/webroot/pages/hello > > > > > > > > In Cake 1.1 > > > > > > > . Mod_rewrite off: It works! > > > > > > > . Mod_rewirte on: I will get this: > > > > > > > /home/groups/c/co/coaddons/htdocs/home/groups/c/co/coaddons/htdocs/ > > > > > > > cake/app/webroot/pages/hello > > > > > > > > PS: I think may be the mmcache is causing me lot of headache here! > > > > > > > > Thanks > > > > > > > > On Jun 29, 7:40 am, "chanh.ong" <[EMAIL PROTECTED]> wrote: > > > > > > > > > I found something very interesting! > > > > > > > > > In Cake 1.1 if I turn off mod_rewrite Cake 1.1 works but I will > > > > > > > > get > > > > > > > > the same problem like Cake 1.2alpha when I turn on mod_rewrite. > > > > > > > > > So, the real problem here is when the mod_rewrite in turn on > > > > > > > > the path > > > > > > > > got double up in both version of Cake 1.1 and 1.2 like this: > > > > > > > > > > > > > > > > /home/groups/c/co/coaddons/htdocs/home/groups/c/co/coaddons/htdocs/ > > > > > > > > cake/app/webroot/pages/hello > > > > > > > > > Here is the url:http://coaddons.sourceforge.net/cake/pages/hello > > > > > > > > > An error has been encountered in accessing this page. > > > > > > > > > 1. Server: coaddons.sourceforge.net > > > > > > > > 2. URL path: > > > > > > > > /home/groups/c/co/coaddons/htdocs/cake/app/webroot/pages/ > > > > > > > > hello > > > > > > > > 3. Err
Re: what's wrong with my javascript setting in phpCake?
In the views, the way you would call the helper should $javascript- >() NOT $this->javascript Hope this help On Jul 1, 12:17 pm, minglee <[EMAIL PROTECTED]> wrote: > I am new to phpCake. My phpCake routing is set to 'development'. And I > put all .js files into ./cake/app/webroot/js/, and set helper, called > '$this->javascript', ect.., did everything as told in the manual, but > it does not work. I've tried my other none-cake applications on the > same server, they all work well with their js files. So, SOS. Thanks a > lot! --~--~-~--~~~---~--~~ 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: checkbox 1.2?
did you look? --~--~-~--~~~---~--~~ 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 cache all the view in call ?
http://manual.cakephp.org/chapters/caching --~--~-~--~~~---~--~~ 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: php json_decode not working when microtime comment is appended to json output
please search for things like this. Configure::write('debug', 0); --~--~-~--~~~---~--~~ 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: Redirect user after logging in
Never mind, I figured it out. On Jul 1, 3:03 pm, Grant Cox <[EMAIL PROTECTED]> wrote: > You want to use $this->redirect("/users/startpage"), not requestAction. If I use $this->redirect(), the whole view will be rendered. The following function (placed in app_controller.php) would work *nearly* as expected: function redirect($url, $status = null, $exit = false) { if ($this->RequestHandler->isAjax()) { echo $this->requestAction($url, array('return')); exit; } else { parent::redirect($url, $status, $exit); } } However, the action is rendered using no layout at all. I wonder if it's possible to render it using 'ajax' layout or not. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
what's wrong with my javascript setting in phpCake?
I am new to phpCake. My phpCake routing is set to 'development'. And I put all .js files into ./cake/app/webroot/js/, and set helper, called '$this->javascript', ect.., did everything as told in the manual, but it does not work. I've tried my other none-cake applications on the same server, they all work well with their js files. So, SOS. Thanks a lot! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Drag and drop problem in IE7
Hi! I'll try to be as descriptive as I can. I have the following problem that apears when I drag the comment on the trash div more than once in IE7 I get a javascript error that looks like this: Line: 3082 Char: 7 Error: Unspecified error Code: 0 So, if I refresh the page, I can drag the first comment into trash and everything goes as expected. The second becomes undraggable because of the mentioned error. In Mozilla, everything works just fine. Snippets: View: drag($comment['Comment']['id'], array('revert'=>false, 'ghosting'=>true)); ?> renderElement('comments/trash'); ?> dropRemote('trash', null, array('url' => 'move_to_trash/','with'=>'{draggedid:element.id}','update'=>'comments')); ? > Has anyone had this problem? Help! Thanks in advance! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
linking problem.
Hi everyone, I just started finding my way in cakephp and I stumbled upon a little problem: http://www.laomusic.be/cake/ (dont mind "Missing Database Table" errors, thats not the problem). The links work perfectly on this page, its the root for the whole application(which uses the pagescontroller controller). But once you press "gebruikers" or "info" then the links are fucked up, they start to link to the url root, so http://www.laomusic.be/gebruikers/ instead of http://www.laomusic.be/cake/gebruikers/ as it should be. Why is this problem occuring??? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
javascript function calls
Hello, I am using 1.15 and am trying to call a function from a .js file but am receiving an Object expected error from IE. my codes are as following: echo $javascript->link('compose'); input('Message/allrecipients', array('type'=>'text', 'size'=>'80', 'onkeypress' => 'spacebarCheck()')); ?> It the function works when embedded into the thtml file. Is there something I am missing? Thanks for the help, Jay --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Drag and drop problem in IE7
I have a problem with drag and drop in IE7. I have a dragged div and a dropRemote div, both inside the same view. In IE7 the most strangest thing happens. I am able to drag and drop an element, but when I try to drag the second one an error occurs. This is the notification from IE7: Line: 3082 Line: 7 Error: Unspecified error Code: 0 What does this mean? I looked into the prototype file and it seems that it happens at this function: function (element) { var valueT = 0, valueL = 0; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; element = element.offsetParent; } while (element); // line 3082 !!! return [valueL, valueT]; } It works fine in Mozilla. Does anyone have any idea of what's going on? Thanks in advance! --~--~-~--~~~---~--~~ 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: Redirect user after logging in
I made a mistake in the above post. Actually the code is: $this->setAction('index'); $this->render('index', 'ajax'); Sorry for that On Jul 1, 11:04 am, citrus <[EMAIL PROTECTED]> wrote: > Hello, > > Currently I'm using Cake 1.2 and I have a small problem. Basically I > want to redirect the user to his current page after he logged in. > > Here's my attempt so far: > > First, when the user click the Login link, I write $this->params['url'] > ['url'] (the current URL, I suppose) to the session and use Ajax > helper to construct the login form. > > After he has logged in successfully, I use $this->requestAction to > request the previous URL, then use $this->render to render the page > using Ajax layout. > > It doesn't work, however. > > I did a small test manually: > > $this->setAction('/users'); > $this->render('index', 'ajax'); > > But when I attempted to use $this->requestAction, it doesn't work. > > Please, give me some advices. Thanks in advanced. --~--~-~--~~~---~--~~ 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 phpGACL when a user signs up
I'm using CakePHP 1.1 with phpGACL. I've only tried out Cake for the last days and now I've finally got an sign up form to work as expected. But how do I update the corresponding phpGACL tables when a new user signs up? My users table looks like: CREATE TABLE `users` ( `id` int(10) unsigned NOT NULL auto_increment, `username` varchar(20) NOT NULL default '', `password` varchar(40) NOT NULL default '', `email` varchar(50) default NULL, `created` datetime default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 ; and the action looks like function signup() { if (!empty($this->data)) { if ($this->User->save($this->data)) { $this->flash('Grattis! Nu är du medlem.', '/users/ login'); } } } phpGACL being pretty extensive I'm sure there has to be an easy way of doing this? (Besides manually using the Import Groups / Users function) Regards, Andreas --~--~-~--~~~---~--~~ 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: Paginate define columns to use (1.2)
UnbindModel does also not seem to work :( // Remove HABTM on tags and categories $this->Article->unbindModel(array('hasAndBelongsToMany' => array('Tag', 'Category'))); // Find all articles $this->set('articles', $this->paginate('Article')); --~--~-~--~~~---~--~~ 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 of two models with cake1.2
Why the order doesn't work if I have in my view sort('Nombre', 'nombre', array('model'=>'Producto')) ?> sort('Tipo', 'nombre', array('model'=>'Tipo')) And in my controller $productos = $this->paginate('Producto'); $this->set('productos', $productos ); Tipo hasMany Producto How can I make it work #Model Tipo class Tipo extends AppModel { var $displayField = 'nombre'; var $hasMany = array('Productos'=>array( 'className'=>'Producto', 'foreignKey'=>'id_tipo' ) ); } #Model Producto class Producto extends AppModel { var $displayField = 'nombre'; var $belongsTo = array('Tipo'=>array( 'className'=>'Tipo', 'foreignKey'=>'id_tipo') ); } #Controller productos_controller.php /* Using pagination */ class ProductosController extends AppController { var $uses = array('Producto', 'Tipo'); var $paginate = array('Producto'=>array('limit' => LIMIT), 'Tipo'=>array('limit' => LIMIT)); function index() { $productos = $this->paginate('Producto'); $this->set('productos', $productos ); } } #Mi vista es link('Crear Producto', 'add/').'';?> Página counter(array('separator' => ' de ')); ? prev('>')?> sort('ID', 'id', array('model'=>'Producto')), $paginator->sort('Nombre', 'nombre', array('model'=>'Producto')), $paginator->sort('Páginas', 'paginas', array('model'=>'Producto')), $paginator->sort('Creado', 'creado', array('model'=>'Producto')), $paginator->sort('Tipo', 'nombre', array('model'=>'Tipo')), 'Acciones'); echo $html->tableHeaders($tr); ?> params); foreach($productos as $v) { $id = $v['Producto']['id_producto']; $link = ''; $link.= $html->link('ver',"view/$id").' '; $link.= $html->link('editar',"edit/$id").' '; $link.= $html->link('borrar', "delete/$id",null,"Esta seguro de Borrar el ID $id"); $link.= ''; $tr = array( $id, $v['Producto']['nombre'], ''.$v['Producto']['paginas'].'', $date->dateFormat($v['Producto']['creado']), $v['Tipo']['nombre'], $link ); echo $html->tableCells($tr,null, array('class'=>'altRow') ); } ?> --~--~-~--~~~---~--~~ 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 in 1.1.15.5144
On 7/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I use typical function: [..snip..] > > Interesting: one host, 4 copy of code (different folders, DB). But in > one copy does'nt work validation. > When I type: /posts/add I see message: "Post was added" and get empty > record in table. > In model post.php, of couse, I wrote: body, title VALID_NOT_EMPTY. > Very strange: 3 copy worked normal. One - have problem. Why - I don't > understand ;-( > > I add if ($ this->params['data']['Post']['body'] != '')... And code > work properly. > > But why? I don't understand ;-( [..snip..] Hi, Have you tried enabling SQL debug to see what INSERT statement it is using? Some comments about your code: - $this->render() executes by default (if autoRender is set to true) so you can probably just do if ($this->data) to check if there's anything submitted. If not, it will render() by default (right now you're doing if (empty($this->params['data'])) { ... } else { ... }. - You don't need to do: $this->set( 'data', $this->data ) ... $this->data is available from the view automatically. Hope this helps. - Gonzalo --~--~-~--~~~---~--~~ 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 in 1.1.15.5144
I use typical function: function add() { if (empty($this->params['data'])) { $this->render(); } else { if ($this->Post->save($this->params['data'])) { $this->flash('Your post has been saved.','/posts'); } else { $this->set('data', $this- >params['data']); $this->render(); } } } Interesting: one host, 4 copy of code (different folders, DB). But in one copy does'nt work validation. When I type: /posts/add I see message: "Post was added" and get empty record in table. In model post.php, of couse, I wrote: body, title VALID_NOT_EMPTY. Very strange: 3 copy worked normal. One - have problem. Why - I don't understand ;-( I add if ($ this->params['data']['Post']['body'] != '')... And code work properly. But why? I don't understand ;-( Version: 1.1.15.5144 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
php json_decode not working when microtime comment is appended to json output
My Problem is that the php json_decode() does not work when remotely calling a cake controller method which just returns a json string. The problem seems to be in the last lines of the webroot/index.php, which append the execution time to every output: if (Configure::read() > 0) { echo ""; } with the microtime/comment attached the php json parser does not return anything. When trying to parse this string with javascript there is no problem(that´s why i never noticed). does anyone had a similar problem? My controller returning the string looks like this: function whatever() { $this->layout = 'ajax'; $data = $this->toJson($myArray); $this->set('data',$data); $this->render('json'); } the view: I´m wondering if i could use some other settings in the controller method instead of commenting out the "time attach" index.php. --~--~-~--~~~---~--~~ 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: Redirect user after logging in
You want to use $this->redirect("/users/startpage"), not requestAction. --~--~-~--~~~---~--~~ 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 cache all the view in call ?
for information I use curl to call all action On 18 juin, 11:05, wluigi <[EMAIL PROTECTED]> wrote: > no one know how to handle this ? > > On 15 juin, 14:31, wluigi <[EMAIL PROTECTED]> wrote: > > > I want to do this in only 1 call > > > On 15 juin, 14:27, wluigi <[EMAIL PROTECTED]> wrote: > > > > I try differents ways but no one is perfect. > > > > I just want every morning to call a controller action or a batch that > > > write the cached file for all my couple od /controller/action/param1/ > > > param2/... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---