Does locale fallback REALLY works??

2009-11-24 Thread lacenaepro...@gmail.com
HI, I'm working with the delicious Translate behaviour of Cake, release 1.2.5. The find method returns only the record in the specified locale, but if some record does not have a translation in that locale, some record are not returned. I'd like to have some working fallback mechanism, since thi

Re: Pagination on cached data?

2009-11-24 Thread AD7six
On 23 nov, 17:25, leberle wrote: > Hi dudes, > > is there a way to paginate cached data? I wanna cache the result from > a $controller->paginate() request an use it the next time the page is > requested. But i've i bind the cached data for the view, i've the > problem that paginate() wasn't call

Re: CAKEPHP Country Region Combobox via AJAX

2009-11-24 Thread NRV
I want to filling up Casts combopbox from Religion combobox change event. Below is code for my View file. link('prototype'); ?> input('religion_id'); echo $form->input(

Re: Pass variables to Javascript

2009-11-24 Thread thomaus
Hi, Thanks for your help. Yes, the solution that you propose works but I prefer putting my script into my PHP file so it's solved! This said, that would nice to be able to set a variable in the controller for the Javascripts, don't you think? On Nov 24, 7:33 am, oleonav wrote: > Hi, > > You c

Forgot passward

2009-11-24 Thread NRV
Hi Friends, Anybody can suggest me a good link for forget passward functionality.? Thank you Nirav -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, sen

Re: Serious Help Needed

2009-11-24 Thread grigri
Amit's code won't work as-is, because the keys are being duplicated. For example, try this in an example script: $test = array( 'Bacon' => array('Yummy'), 'Bacon' => array('Delicious') ); print_r($test); You'll see that the first declaration has disappeared. You can only use a key once in a

Need help, beginner

2009-11-24 Thread Daniel Gerep
Hi fellas I'm having a tremendous difficulty to create the Blog Example I really don't know where do I have to put those files created on the exampleI do exactly as the example but when I try to access the only thing I get is that initial page "Release Notes for CakePHP 1.2.4.8284.". Wh

File upload size (copy by value)

2009-11-24 Thread Наргиза Саркулова
Hi, I recently implemented a file upload feature in one of my cakephp project following the guidelines in: http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/ The upload feature is working nice but the only problem is that it requires a huge amount of memory because cakephp save funct

how to tag a picture

2009-11-24 Thread Distnie
how do i tag a picture like, exist in facebook. could any1 please tel me an idea or php code to tag a picture. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this gr

Problem with Host Gator

2009-11-24 Thread Shadab Shaikh
Dear All, I have setup a project in Host Gator, its using cpanel. As I am doing normal setup, than its not displaying any page. After research, I found an article in which guidelines mentioned for cpanel, page is http://www.cakephp.co.uk/installing_cakephp_on_cpanel_server.html When I am using

Re: Problem with Host Gator

2009-11-24 Thread Dave
Usually if the home page is working but no others, it is because either 1. mod_rewrite is not enabled or 2. You are either missing the .htaccess files or they are not being used because the AllowOverride directive in the web server is configured improperly. On Tue, Nov 24, 2009 at 8:24 AM, Shad

Re: Validation Error

2009-11-24 Thread Rick
Should be: 'rule' => 'notEmpty' Also I don't think you should have the 'allowEmpty'. Rick On Nov 23, 11:23 pm, Dave wrote: > I have a select drop down for user to select a year. > > In before save I  have: > > $this->data['Award']['year'] = $this->data['Award']['year']['year']; > since when I

Re: About multilingual websites

2009-11-24 Thread thomaus
Hi, Thanks for your answer. 1) I tried to do "../cake/consol/cake i18n extract" from my /MyApp/ app/ path and it says: Welcome to CakePHP v1.2.4.8284 Console --- App : app Path: /Users/thomas/Sites/MyApp/app

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
I have been following the directions there and haven't made it very far. I end up with the following error: Missing Controller *Error: * *UsersController* could not be found. *Error: * Create the class *UsersController* below in file: app/controllers/users_controller.php *Notice: * If you wa

Containable query

2009-11-24 Thread Bryan Paddock
Hey all, I have this relationship in question: User -> hasOne Student -> hasMany Submission I'm a bit stumped on how I can fetch all the users who do not have any submissions linked to their name. I've tried: $list = $this->User->find('all', array( 'contain' => array(

Re: Creating a login screen

2009-11-24 Thread Dave
Can you be more specific about when you get this error? What is the URL cake is trying to access On Tue, Nov 24, 2009 at 8:58 AM, Dewayne Pinion wrote: > I have been following the directions there and haven't made it very far. I > end up with the following error: > > Missing Controller > > *Erro

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Martin Westin
I can only agree with all these suggestions and add a little beauty i was introduced to recently. X-Sendfile is a great for performance if you do any file output from php. It offloads all the actual output of the file to the webserver (nginx, Apache, lighttpd...). For me, implementing sendfile for

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Andrew Okhmat
Hello, 1. If not installed, you should install accelerators / optimizers php code. For example php-accelerator http://eaccelerator.net or apc http://pecl.php.net/package/apc. 2. Pay attention to the settings cake-php/php (view's caching, permanent connect to mysql, the absence of unnecessary redi

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Javier
CakePHP performance is really poor. To improve it you must use APC and/ or memcached On 23 nov, 16:02, Balrog wrote: > Hello! > We are running quite growing social network in Poland for students at > CakePHP, now 70k users and 0.5M hits a day. > > We have 3 app servers for it with CakePHP 1.2.5 i

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
Hi dave, I have tried several urls: /users /users/login both return the same error. On Tue, Nov 24, 2009 at 9:21 AM, Dave wrote: > Can you be more specific about when you get this error? What is the URL > cake is trying to access > > On Tue, Nov 24, 2009 at 8:58 AM, Dewayne Pinion wrote: > >>

Re: About multilingual websites

2009-11-24 Thread Martin Westin
Hi, For 1: If Cake has trouble figuring out where your app is (for some reason). The simple workaround is to specify it with the full path: /Users/thomaus/Sites/MyApp/cake/consol/cake -app /Users/thomaus/Sites/ MyApp/app i18n extract That is the foolproof and disgustingly verbose way of making s

Re: File upload size (copy by value)

2009-11-24 Thread Martin Westin
You are looking at the problem form the wrong angle. Don't store 42MB files in the database, that's all. Files are best stored in the filesystem. Then you store the filename (and path) in your database. You will never even need to have the file in php-memory at all. /Martin On Nov 24, 7:37 am,

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Martin Westin
Maybe someone should answer the original question: Will future versions improve performance? 1.3 - most likely not too much. 2.0 - this will likely see some more significant improvements since php4 is dropped. Any advancements after 2.0 are also likely to offer improvements as more and more code

Session, Cache and Model

2009-11-24 Thread RhythmicDevil
I am confused as to why the Session object is only available in the Controller. Shouldn't it be the Model's responsibility to cache the data? -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.c

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Larry E. Masters aka PhpNut
On Tue, Nov 24, 2009 at 9:07 AM, Martin Westin wrote: > Maybe someone should answer the original question: Will future > versions improve performance? > Yes > > 1.3 - most likely not too much. > Yes 1.3 already has improvements and more are being found and implemented. > 2.0 - this will like

Re: need a little help with model::saveAll function

2009-11-24 Thread Ernesto
A - i already have a routine that *should* to that... but it isn't working properly. here's the code function beforeValidate() { $validRecords = array(); foreach ($this->data as $model => $records) { foreach ($records as $key => $record) { if (is_numeric($key)) {

Re: Creating a login screen

2009-11-24 Thread josu jauregui
Hi!. Sorry but my english is not good. You must be sure that the name of the controller file is users_controller.php and it´s in app/controllers directory. I hope this can help you. 2009/11/24 Dave > Can you be more specific about when you get this error? What is the URL > cake is trying to ac

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
Hi Josu, Thank you for the response. Yes, I have the file created and it is in the app/controllers directory On Tue, Nov 24, 2009 at 10:32 AM, josu jauregui wrote: > Hi!. Sorry but my english is not good. > > You must be sure that the name of the controller file is > users_controller.php and it´

Re: Need help, beginner

2009-11-24 Thread naidim
Either browse to [webroot]/posts or follow the directions here for routing: http://book.cakephp.org/view/341/Routes On Nov 24, 6:00 am, Daniel Gerep wrote: > Hi fellas > > I'm having a tremendous difficulty to create the Blog Example > > I really don't know where do I have to put those files

cake-php@googlegroups.com

2009-11-24 Thread Ragnis
When doing it like this: array ('controller' => 'Accounts', 'action' => 'Manage', '?' => array ('var' => 'b73cr6xzr6z', 'var2' => 'somethingelse')) then the result will be /Accounts/Manage/? var=b73cr6xzr6z&var2=somethingelse On Nov 24, 6:31 am, "Dr. Loboto" wrote: > You can set form action as:

Add hasMany record in beforeSave

2009-11-24 Thread toby1kenobi
Hi there, I'm having some problems adding a hasMany instance to another model in beforeSave, I'm wondering if I have the wrong end of the stick? I have a model User which hasMany EmailMessage. I have this in the add action of my controller: $this->data['EmailMessage'][0] = array( 'email_qu

Re: CakeFest IV - America - Help us pick a location!

2009-11-24 Thread alan
Vote for central/mid-west... it makes sense (and it's where I am) Chicago or St. Louis or Indianapolis or Kansas City 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 Googl

Re: Need help, beginner

2009-11-24 Thread Daniel Gerep
Thanks for your help naidim...the router file solved my "problem" Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this g

Re: Creating a login screen

2009-11-24 Thread josu jauregui
Hi! Is your mod_rewrite activated?. Can you send me the users_controller file to make some tests?. Bye! 2009/11/24 Dewayne Pinion > Hi Josu, > Thank you for the response. Yes, I have the file created and it is in the > app/controllers directory > > On Tue, Nov 24, 2009 at 10:32 AM, josu jauregu

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Martin Westin
Straight from the source. Thanks Larry, I was mostly guessing that 2.0 would see the bigger improvements. :) On Nov 24, 4:17 pm, "Larry E. Masters aka PhpNut" wrote: > On Tue, Nov 24, 2009 at 9:07 AM, Martin Westin > wrote: > > > Maybe someone should answer the original question: Will future >

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
Hi Josu, It should be enabled. I do have other pages/controllers that are working. The contents of my users_controller.php file is as follows: class UsersController extends AppController { var $name = 'Users'; var $components = array('Auth'); function login() { } function logout() { $this->

Re: Session, Cache and Model

2009-11-24 Thread josu jauregui
Hi! In the controller you especify if you want to use cache mode(cache time, actions cached, ...); the Model gets the data to the controller and the controller process it according to the cache settings you specify in the controller class. More info: http://book.cakephp.org/view/346/Caching-in-the-

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Larry E. Masters aka PhpNut
> Straight from the source. Thanks Larry, I was mostly guessing that 2.0 > would see the bigger improvements. :) > Martin you are welcome. Here is a list of some "features" that are planned in 2.0 http://code.cakephp.org/cakephp2/wiki -- /** * @author Larry E. Masters * @var string $userName *

Re: Creating a login screen

2009-11-24 Thread josu jauregui
Hi! I tests this code and it works!!! Do you have some Router::connect in the config/routes.php related with the users_controller? I have many more ideas. 8-( 2009/11/24 Dewayne Pinion > Hi Josu, > It should be enabled. I do have other pages/controllers that are working. > The contents of my us

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
Hi Josu, Here is the contents of my routes.php file (below are the only two uncommented lines): Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); On Tue, Nov 24, 2009 at

Re: Creating a login screen

2009-11-24 Thread josu jauregui
What´s the url do you try to enter? (complete url) Are you using admin routing? 2009/11/24 Dewayne Pinion > Hi Josu, > Here is the contents of my routes.php file (below are the only two > uncommented lines): > > Router::connect('/', array('controller' => 'pages', 'action' => > 'display', 'ho

Re: Session, Cache and Model

2009-11-24 Thread RhythmicDevil
Thank you for the reply. On Nov 24, 11:20 am, josu jauregui wrote: > Hi! In the controller you especify if you want to use cache mode(cache time, > actions cached, ...); the Model gets the data to the controller and the > controller process it according to the cache settings you specify in the >

Export to CSV... almost there... what am I missing?

2009-11-24 Thread FrederickD
I am in the process of adding an "Export to CSV" capability to my project. I am using the latest version of the csv helper found here: http://ifunk.net/cakephp/helpers/csv.php.txt. I have this code as ../ app/views/helpers/csv.php. I also have added Router::parseExtensions ('json', 'xml', 'csv'); t

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
I have tried iterations of the following: http://www.dannysindahlonega.com/admin/user http://www.dannysindahlonega.com/admin/users http://www.dannysindahlonega.com/admin/users/login all give the same message as stated before. On Tue, Nov 24, 2009 at 11:57 AM, josu jauregui wrote: > What´s the

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
To be honest I am not sure about admin routing. Learning as I go a bit here.. :) On Tue, Nov 24, 2009 at 11:57 AM, josu jauregui wrote: > What´s the url do you try to enter? (complete url) Are you using admin > routing? > > > 2009/11/24 Dewayne Pinion > >> Hi Josu, >> Here is the contents of my

Re: Creating a login screen

2009-11-24 Thread jburns
I haven't done admin routing either, but it looks to me as if you are using a url that indicates admin routing, but haven't set it up in your routes. Try adding this: Router::connect('/admin', array('controller' => 'pages', 'action' => 'index', 'admin' => true)); to config/routes.php On Nov 24,

Re: Creating a login screen

2009-11-24 Thread josu jauregui
Do you have uncommented line Configure::write('Routing.admin', 'admin'); in core.php?? 2009/11/24 Dewayne Pinion > To be honest I am not sure about admin routing. Learning as I go a bit > here.. :) > > > On Tue, Nov 24, 2009 at 11:57 AM, josu jauregui wrote: > >> What´s the url do you try to en

Re: Export to CSV... almost there... what am I missing?

2009-11-24 Thread FrederickD
Sorry about the tabs. I though I took those out... What is also strange to me is that when core.php has 'debug' >= '1' I get the 404 message. When 'debug' is set to '0', I get the prompt to create a CSV file, but not with the formatted name as defined in the exportrepairorders.ctp file. The file n

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
Thanks for that. Unfortunately it didn't help. On Tue, Nov 24, 2009 at 12:17 PM, jburns wrote: > I haven't done admin routing either, but it looks to me as if you are > using a url that indicates admin routing, but haven't set it up in > your routes. Try adding this: > > Router::connect('/admin'

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
I did not, but I tried uncommenting it and still got the same error. On Tue, Nov 24, 2009 at 12:22 PM, josu jauregui wrote: > Do you have uncommented line Configure::write('Routing.admin', 'admin'); in > core.php?? > > > > -- Dewayne Pinion Web/Software Guy Trenton Technology http://www.trent

Re: need a little help with model::saveAll function

2009-11-24 Thread Johannes
i had exactly the same problem and solved it by removing empty lines in the beforeFilter() of the controller responsible for saving items. In my case its very specific you could apppend your logic to make it more universal. p.s. im not sure about the following line in your example, because im not

paginate loosing args

2009-11-24 Thread Mario Cesar
Hi All!! I have a problem with paginate, I'll try explicate: I have a form that method is "post" the result is ok in first page but if I click in other page or some order the paginate returns all rows of my table he is loosing the args and I'm using the passedArgs in View page what can i do? C

Re: Problem with multiple memcached configs

2009-11-24 Thread jmbenn...@gmail.com
> Never mind answered my own question. Looks like it's a bug in the > Cache class. Did you file a report? 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 "

Associate by condition

2009-11-24 Thread villosil
Hi, Is there any "Cake-way" to fetch data from associations by a previous condition on the main Model? I'll explain myself: Let's say I have a Product Model, which has a hasMany association with an Image Model. The Product has a field called type which defines the type of the Product. For example

Properly Normalizing a Products Database to work harmoniously with Cake

2009-11-24 Thread plasmaflux
Hello all! I'm a novice to CakePHP, have a rusty set of PHP skills, and am maybe a 5/10 when it comes to MySQL & databases in general. I was recently hired by a company wanting to bring their catalog design and web development in-house. After digging through the existing site's raw PHP code, I've

Nice url for webroot/files

2009-11-24 Thread RugerJ
I am offering my users a link where they can download uploaded files http://www.example/app/webroot/files/[subdir]/[filename] is it possible to give a nice url using route.php like http://www.example/files/[subdir]/[filename] Check out the new CakePHP Questions site http://cakeqs.org and help o

Re: Nice url for webroot/files

2009-11-24 Thread Miles J
Your best bet is to use the Media view. http://book.cakephp.org/view/489/Media-Views On Nov 24, 11:49 am, RugerJ wrote: > I am offering my users a link where they can download uploaded files > > http://www.example/app/webroot/files/[subdir]/[filename] > > is it possible to give a nice url using

Re: paginate loosing args

2009-11-24 Thread Dave
in the paginate array in your view file add 'url'=>$this->passedArgs On Tue, Nov 24, 2009 at 1:24 PM, Mario Cesar wrote: > Hi All!! > > I have a problem with paginate, I'll try explicate: > > I have a form that method is "post" > the result is ok in first page but if I click in other page or so

Re: Creating a login screen

2009-11-24 Thread Dave
if the url is /admin/users/login then Cake will look for an action called "admin_login" in users_controller.php . Change the name of the login function to this and let me know if that works. On Tue, Nov 24, 2009 at 12:28 PM, Dewayne Pinion wrote: > I did not, but I tried uncommenting it and sti

Re: Creating a login screen

2009-11-24 Thread Dave
And remove this from your routes.php: Router::connect('/admin', array('controller' => 'pages', 'action' => 'index', 'admin' => true)); but leave Configure::write('Routing.admin', 'admin'); uncommented in core.php On Tue, Nov 24, 2009 at 3:24 PM, Dave wrote: > if the url is /admin/users/log

Re: Creating a login screen

2009-11-24 Thread Martin Atukunda
Hi Dewayne, Just checking - do you have the opening and closing php tag? i.e. redirect($this->Auth->logout()); } } ?> On 24 Nov 2009, at 19:17, Dewayne Pinion wrote: > Hi Josu, > It should be enabled. I do have other pages/controllers that are > working. The contents of my users_controller.p

Re: Creating a login screen

2009-11-24 Thread Dewayne Pinion
AHHH! I can't believe I overlooked that. That fixed it, thank you! I feel like a dummy about now.. lol. So for the next part of this little project, how do I default to this login page? For example, currently if you go to mysite/admin/comments, you are taken to the comments page. Howev

Re: paginate loosing args

2009-11-24 Thread Mario Cesar
i tried but didn't work On Tue, Nov 24, 2009 at 6:20 PM, Dave wrote: > in the paginate array in your view file add > > 'url'=>$this->passedArgs > > On Tue, Nov 24, 2009 at 1:24 PM, Mario Cesar wrote: > >> Hi All!! >> >> I have a problem with paginate, I'll try explicate: >> >> I have a form t

Re: paginate loosing args

2009-11-24 Thread Ma'moon
If you are using POST to send the ID of the target article then try sending it using GET On Tue, Nov 24, 2009 at 3:31 PM, Mario Cesar wrote: > i tried but didn't work > > > > On Tue, Nov 24, 2009 at 6:20 PM, Dave wrote: > >> in the paginate array in your view file add >> >> 'url'=>$this->passedA

Re: Creating a login screen

2009-11-24 Thread Dave
First read this CLOSELY: http://book.cakephp.org/view/172/Authentication Then google CakePHP Auth tutorial and follow one if you need more info... A lot of people get messed up with the Auth Component so read as much as you can. One thing that will probably mess you up: You want to change your l

Re: paginate loosing args

2009-11-24 Thread Mario Cesar
*I tried too * On Tue, Nov 24, 2009 at 6:36 PM, Ma'moon wrote: > If you are using POST to send the ID of the target article then try sending > it using GET > > On Tue, Nov 24, 2009 at 3:31 PM, Mario Cesar wrote: > >> i tried but didn't work >> >> >> >> On Tue, Nov 24, 2009 at 6:20 PM, Dave wrot

Re: Associate by condition

2009-11-24 Thread Ian R
Couldn't you just create a method in your model which does this, using Find()? For example, FindStandard() or FindByType('STANDARD')? I believe that's Cake-y, and it keeps your controller lean and your model fat :) Ian On Nov 24, 2:18 pm, villosil wrote: > Hi, > > Is there any "Cake-way" to

How set value for root parents using tree recover

2009-11-24 Thread Aldo
Hello, When using recover the parent_id fields for root entries are empty. Is there a way to set a default value like "-1" as parent_id for root items? Thanks Aldo Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this

Re: How set value for root parents using tree recover

2009-11-24 Thread AD7six
On 24 nov, 21:48, Aldo wrote: > Hello, > > When using recover the parent_id fields for root entries are empty. > Is there a way to set a default value like "-1" as parent_id for root > items? why Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP rel

Re: Creating a login screen

2009-11-24 Thread Martin Atukunda
To redirect the user first to the login page instead of the standard home/welcome page edit app/config/routes.php and change this line: Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); to Router::connect('/', array('controller' => 'users', 'action' => '

Re: Nice url for webroot/files

2009-11-24 Thread AD7six
On 24 nov, 20:49, RugerJ wrote: > I am offering my users a link where they can download uploaded files > > http://www.example/app/webroot/files/[subdir]/[filename] Are you hand writing that url? > > is it possible to give a nice url using route.php > > likehttp://www.example/files/[subdir]/[fi

Re: paginate loosing args

2009-11-24 Thread Ma'moon
Please send a controller dump and your view code so we can help you On Tue, Nov 24, 2009 at 3:38 PM, Mario Cesar wrote: > *I tried too > * > > On Tue, Nov 24, 2009 at 6:36 PM, Ma'moon wrote: > >> If you are using POST to send the ID of the target article then try >> sending it using GET >> >> On

Re: Creating a login screen

2009-11-24 Thread Bryan De Asis
is the admin routing in the core.php is enabled? On Tue, Nov 24, 2009 at 8:58 AM, Dewayne Pinion wrote: > I have been following the directions there and haven't made it very far. I > end up with the following error: > > Missing Controller > > *Error: * *UsersController* could not be found. > >

Form Action URL from Router

2009-11-24 Thread Joseph Roberts
I have an application that uses Auth and ACL to check permissions in the app_controller. I am also checking permissions on every AJAX call by using jQuery's AjaxSetup to capture the XmlHttpRequest URL. This process works perfectly for any manual AJAX call, but for Ajaxified forms the action URL con

Re: How set value for root parents using tree recover

2009-11-24 Thread Aldo
I'm migrating a tree backend to cake. Unfortunately there are manay functions who depend from this value, as they look for "-1" to identify a root entry. On 24 Nov., 21:50, AD7six wrote: > On 24 nov, 21:48, Aldo wrote: > > > Hello, > > > When using recover the parent_id fields for root entries a

Re: Form Action URL from Router

2009-11-24 Thread Joseph Roberts
Solved it: function checkPermissions(){ Configure::write('debug', 0); $this->layout = 'ajax'; $user = $this->Auth->user('username'); // Sanitize URL for either development or production server if(!strrpos($this->params['url']['url'], 'cake/missio'))

How use AUTH for two sections (admin eshop, client admin)

2009-11-24 Thread Petr Vytlačil
Hi, is any idea. How use AUTH for two admin sections? First: Admin section, when user log. can add new products, and other informations. Second: Client admin: user log. can shopping, do order, check order I must use ACL or role in user and how i can do, when client login can view only views fo

Re: Problem with Host Gator

2009-11-24 Thread Dr. Loboto
Try add "RewriteBase /" to app/webroot/.htaccess On Nov 24, 7:24 pm, Shadab Shaikh wrote: > Dear All, > > I have setup  a project in Host Gator, its using cpanel. > As I am doing normal setup, than its not displaying any page. > > After research, I found an article in which guidelines mentioned f

cake-php@googlegroups.com

2009-11-24 Thread Dr. Loboto
All as you asked. And Cake properly encoded HTML entities as symbols "&" are restricted in source and must be represented in text as & On Nov 24, 9:43 pm, Ragnis wrote: > When doing it like this: > array ('controller' => 'Accounts', 'action' => 'Manage', '?' =>  array > ('var' => 'b73cr6xzr6z', '

Finds and Arrays

2009-11-24 Thread dtirer
I've run into an interesting problem today. Here's the scenario. I have 3 Models: Station (model) id station_id Store (model) id station_id phase_id Phase (model) id phase And the relationships are: Store belongsTo Station -- Store belongsTo Phase Station hasOne Store Phase hasMnay Store N

Blog Tutorial

2009-11-24 Thread cakephp9 cakephp9
I have some basic questions about the blog tutorial 1 What does edit($id = null) mean, is $id being reset tot null? 2 What does $this->Post->id = $id; then do, make it null too? 3 Why do we check again if the data is empty, the data validation prevents it from being empty? Thanks in advance! htt

admin routing shows CSS when behind an SSL

2009-11-24 Thread Chad Smith
Hey Everyone, This is a really odd problem and I will do my very best to explain what is happening here. As I have no idea what is happening. What I found is that we setup a SSL and this is my domain.com/.htaccess file RewriteEngine on RewriteCond %{HTTP_HOST} ^identityalert.org [NC]

Export to CSV using Helper, resulting error

2009-11-24 Thread E T
Hi all, I am trying to put a download link on one of my view, so when user click on that link it will automatically generate a csv file and pop up for user to download. I followed the instruction here http://blog.allmythingstodo.com/tag/cakephp/using the helper from Adam Royle ( http://bakery.cak

Installation Issue - HELP!!! www.medfuse.com

2009-11-24 Thread robert matousek
I've been developing an app on my localhost. Now I'm trying to get CAKEPHP up and running on my webhost (Webhost4llife). Can someone take a look at www.medfuse.com? I can't figure out what the problem is, it's pulling in the default layout, but going to any of controller/ actions does not seem the

Re: Installation Issue - HELP!!! www.medfuse.com

2009-11-24 Thread jburns
The first things I would check are your .htaccess files. I faced similar issues setting up a site on a hosting service. Take a look at this http://www.jeremy-burns.co.uk/2009/08/setting-up-cakephp-on-a-11-server/ and see if it helps. On Nov 25, 5:04 am, robert matousek wrote: > I've been developi

Re: Blog Tutorial

2009-11-24 Thread Patrick Talmadge
1. edit($id = null) will set the default value of $id to null if nothing is passed into edit. If a value is passed to edit $id = null will be ignored. 2. $this->Post->id = $id will assign the value of $id to the Post model. If nothing is passed into edit() null will be assigned. 3. if(empty($this->

MySQL Duplicate entry on Create Error

2009-11-24 Thread TimG
I was inserting new rows through my application and then suddenly I started receiving this error: Warning (512): SQL Error: 1062: Duplicate entry '127' for key 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 525] The AUTO_INCRIMENT is set to 128 on the 'id' field and it was working perfe

Re: MySQL Duplicate entry on Create Error

2009-11-24 Thread jburns
It sounds like the data type of your id field is a signed tinyint, which has a maximum value of 127. The range is -127 to 127 (or something close to that). You need to change the data type. If you make it unsigned it has a range of 0 to 255. If that isn't enough you'll have to increase it to smalli

Re: admin routing shows CSS when behind an SSL

2009-11-24 Thread TimG
I had the same issue a few weeks ago. I did not have any custom htaccess or SSL installed. It was a controller issue. My controller couldn't do what I wanted it to do so it was just loading the css file. I can't remember exactly what I did to fix it... sorry. But in my case it WAS a controller is

Re: MySQL Duplicate entry on Create Error

2009-11-24 Thread TimG
Thank you sir you are a miracle worker!!! 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@goo

Re: admin routing shows CSS when behind an SSL

2009-11-24 Thread TimG
I'm still trying to remember: Treat the css loading as an error. Your controller isn't liking the URL when being redirected from the htaccess file. Maybe something to do with SSL and the router/routes? Without being able to explain exactly what is going on I can suggest that you try using somethi

How to have 2 forms on one page for same model

2009-11-24 Thread #2Will
Hi All. I need to have 2 forms on a page that add an item to the db using the same model. The trouble is, they are setting each others validation off. How can i isolate the forms so they still use the models validation but only the form whos button has been clicked gets validated? Thanks for a

retrieving contacts from an email account by php code

2009-11-24 Thread Distnie
hey could anyone tel me how to retrieve the contacts from an email address if i have the email address and its password..tel me a way to retrieve by the by the php code.. plz anyone help me... Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related qu