Re: pagination: remember the page from where i come

2009-10-07 Thread Obelix
Hi Brian, thanks for your reply. I have tested it yesterday evening. With the information from [paging] I can control the paging. Regards Uwe On 7 Okt., 19:53, brian wrote: > In the view with the paging, do debug($this->params['paging']). The > page number should be in $this->params['paging'][

Re: Notice+error after file upload

2009-10-07 Thread Bert Van den Brande
Well to find out why it is behaving differently you first need to find out what is causing the problem ... On Thu, Oct 8, 2009 at 8:45 AM, emmexx wrote: > > > > On 8 Ott, 08:01, Bert Van den Brande wrote: > > Setting debug to 0 will work around your problem since PHP notices won't > be > > show

Re: Model Files do not get read in by the system.

2009-10-07 Thread AD7six
On 8 oct, 01:15, paullb wrote: > Thanks Miles J, I made that change and it worked perfectly. What you have > suggested here is definitly not intuitive from the naming conventions in the > link provided earlier. Please edit the sentance "The Model class OptionValue would be found in a file name

Re: Translate field names

2009-10-07 Thread emmexx
Thank you Brian for the explanation. maxx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send ema

Re: Notice+error after file upload

2009-10-07 Thread emmexx
On 8 Ott, 08:01, Bert Van den Brande wrote: > Setting debug to 0 will work around your problem since PHP notices won't be > shown then. I presumed that... :-) My question was about the different behaviour on my laptop and on my web host. The debug level is the same: 2. On my pc the notice is o

Re: Notice+error after file upload

2009-10-07 Thread Bert Van den Brande
Setting debug to 0 will work around your problem since PHP notices won't be shown then. Of course, the real root of the problem is the fact that the uploader tries to access an array with a var that doesn't exist. Have a look at the script on line 695 and try to figure out why it's not set. Possi

Re: how to create drop-down list

2009-10-07 Thread Bert Van den Brande
You can use the FormHelper : http://book.cakephp.org/view/728/select On Thu, Oct 8, 2009 at 1:09 AM, gopallal wrote: > > Hi, > I am new for cakephp. I have a requirement which is very common. > I have to create drop-down list of locality in a form where that form > belongs > to a table which ha

about https

2009-10-07 Thread wiky
Hi i am working on Solaris 10 with apcahe and php is configured. I have my website placed at /var/apache/htdocs/index.html as document root. and i access it on local apache server. Now i want to shift it on https to secure it from other systems on LAN. what steps i should take to implement. Urge

app_error

2009-10-07 Thread Dave Maharaj :: WidePixels.com
I have $this->cakeError('profile'); in the controller if a user does not have permission to view a specific profile so i have my function profile() in my app_error and the view in errors but all i get is a blank page. I simply want to display the error page. Is this what the app_error is f

XML class not parsing correctly

2009-10-07 Thread mscdex
I recently upgraded the version of CakePHP in a project I work on to version 1.2.5. Since then, it seems that the XML class is unable to parse some XML strings correctly. Here's the code: $tmp_xml =& new XML($XMLFilename); $tmp_xml = $tmp_xml->toArray(false); The contents of the filename contain

Re: Problems with paginating HABTM data

2009-10-07 Thread Tamim A.
BTW, this is what I have in my Categories controller: function show($id){ $this->paginate = array( 'contain' => array( 'Thing' => array( 'fields' => array('id','name','created'), 'order' => 'Thing.created DESC' )

how to create drop-down list

2009-10-07 Thread gopallal
Hi, I am new for cakephp. I have a requirement which is very common. I have to create drop-down list of locality in a form where that form belongs to a table which has locality_id as a foreign key. How locality name should be displayed in drop-down list and locality_id value should be saved aft

Problems with paginating HABTM data

2009-10-07 Thread Tamim
Hi all, I'm a complete CakePHP newbie and building an application just so I can learn. I've hit a brick wall with pagination when dealing with HABTM models. Here's what I have: Things model with fields 'id','name','description' - HABTM Category - belongsTo User Categories model with fields 'id',

Re: Deep associations once again...

2009-10-07 Thread Davin Flatten
Nevermind. I figured it out. The model file must be the model class name with each word separated by an under-bar. That only took me 6 hours of pulling my hair out! PolicyConformanceStatement /models/pcs.php must be PolicyConformanceStatement /models/policy_conformance_statement.php

Posts and Votes total, hasOne + COUNT relation?

2009-10-07 Thread fael
Hello I'm coding this reddit-like clone and so far, so good, just I want to show how many ups and how many downs are by post in the index. Something like this: Up (20) | Down (3) This is the first title Up (10) | Down (10) Second title here Up (5) | Down (6) Third title! A findAll will get me the

Deep associations once again...

2009-10-07 Thread DavinF
I have searched and played with trying to get the following working. Any help would be appreciated. The model relationships are as follows: Server -> hasMany PolicyConformanceStatements -> belongsTo PolicyCheck The model definitions are as follows: Server(/models/server.php) var $hasMany = ar

Re: $this->paginate["fields"]

2009-10-07 Thread brian
$this->paginate['fields'][] = "Model.first_name as example"; OR: array_push($this->paginate['fields'], 'Model.first_name as example'); On Wed, Oct 7, 2009 at 7:00 PM, Kyle Decot wrote: > > I want to append a dynamically created field to my paginated results > but when I do > > $this->paginate[

Re: Model Files do not get read in by the system.

2009-10-07 Thread Jon Bennett
Hi Brendan, > It was unclear that the model file was not being read and a result extremely > frustrating. Therefore, I would suggest (even if it is only a debugging > feature) that an error be displayed in the event that the model class is not > found. Thing is, by design, Cake attempts to creat

Re: Model Files do not get read in by the system.

2009-10-07 Thread paullb
Thanks Miles J, I made that change and it worked perfectly. What you have suggested here is definitly not intuitive from the naming conventions in the link provided earlier. It was unclear that the model file was not being read and a result extremely frustrating. Therefore, I would suggest (even

Re: fopen: failed to open stream

2009-10-07 Thread Marcelo Andrade
On Wed, Oct 7, 2009 at 10:43 AM, Jacksm wrote: > > Hi, >  I am setting up CakePHP on a hosted linux server. I made it through > the set up, but I am still getting a lingering error on the welcome > page below: > > Warning: fopen(/home/mysimple/public_html/login/app/tmp/cache/ > persistent/cake_co

$this->paginate["fields"]

2009-10-07 Thread Kyle Decot
I want to append a dynamically created field to my paginated results but when I do $this->paginate['fields'] = "Model.first_name as example"; It only pulls in that field when what I really want is all the fields it would normally get, plus this one. Is there a way to do this? Thanks --~--~--

Re: Cache View dose not work

2009-10-07 Thread Miles J
Can we see some code? Also if its an element, wouldn't it always be the same? Or are you passing dynamic data. On Oct 7, 2:31 pm, Simon wrote: > i'm having problems with cache i have post controller which i enable > it to cache the view action only > > but some how it cache the element that loca

Re: Model Files do not get read in by the system.

2009-10-07 Thread Miles J
Model name should be singular and camelcase, yours is plural. The file should be singular and separated with underlines. Your problem however is that you dont need _model on the file name, it should just be segment.php. On Oct 7, 3:43 pm, paullb wrote: > Thanks for the replies. > > I had alread

Re: Model Files do not get read in by the system.

2009-10-07 Thread paullb
Thanks for the replies. I had already cleared out the cache, turned off caching at set debug level at 2. I checked out the convention page you provided and tried many different ways of naming things but none changed the result that the model class was entirely ignored. Would it be possible to

Re: form select: value and displayed text from table

2009-10-07 Thread p_W
ah, var $displayField in my model will do just fine...sorry for the premature question... On Oct 7, 6:01 pm, p_W wrote: > Is there an option in the form helper that would let me end up with a > select that is filled from a table, only with the 'id' column being in > the 'value' part of the selec

Re: Jquery noConflict not working

2009-10-07 Thread robust solution
I also have only two libraries in the head section the prototype and the jquery but the former is heading the latter I used the magic noConflict method as you typed in your post everything is ok in my application I am using prototype 1.6.1 jquery 1.3.2 do this procedure on a blank page to see if

form select: value and displayed text from table

2009-10-07 Thread p_W
Is there an option in the form helper that would let me end up with a select that is filled from a table, only with the 'id' column being in the 'value' part of the select, and the other column of the db filling the visible part of the select? something like this: Label for 1 Label for 2

Cache View dose not work

2009-10-07 Thread Simon
i'm having problems with cache i have post controller which i enable it to cache the view action only but some how it cache the element that locate at default layout even if i put the result is same any idea --~--~-~--~~~---~--~~ You received this message because

Notice+error after file upload

2009-10-07 Thread emmexx
I use Miles Johnson's Uploader plugin in a model. http://www.milesj.me/resources/script/uploader-plugin On my pc I have no problem. On the host where I'm testing my application after saving a record a receive the following messages. The page seems partially broken, it is not the index page, but I

[OFF-TOPIC] I need some contacts!

2009-10-07 Thread Alisson Prestes
Hi everybody here in CakePHP list, I am a brazilian young newly graduated computer engineer and I actually work with web-based applications, as analyst and developer. I am planning to move to USA in the early december and I'll be living there for 5-6 months. I am looking for a job for this period

Re: Problem with Model Association

2009-10-07 Thread Raman
Yes, it was newspost.php. On Oct 6, 9:10 pm, brian wrote: > That shouldn't be an issue. What was the file name? If it wasn't > news_post.php that would do it. > > > > On Tue, Oct 6, 2009 at 3:01 PM, Raman wrote: > > > Thanks brian, tried that, but it didn't work. I found the solution > > though

Re: Jquery noConflict not working

2009-10-07 Thread hahmadi82
I tried every possible order. Which did not work. I also don't have other libraries included in the file that would have $. Are there any other potential solutions? robust solution wrote: > > > I think in your case you should do this > echo $javascript->link('prototype'); > echo $javascript-

Re: Model Files do not get read in by the system.

2009-10-07 Thread AD7six
On 7 oct, 21:23, AD7six wrote: > On 7 oct, 19:46, brian wrote: > > > You're the second person today. Clear out app/tmp/cache/models/ and > > set debug > 0 to have Cake check the model schema on each request. > > That's not relevant. > > paullb - see conventions[1] your class isn't named correc

Re: Model Files do not get read in by the system.

2009-10-07 Thread AD7six
On 7 oct, 19:46, brian wrote: > You're the second person today. Clear out app/tmp/cache/models/ and > set debug > 0 to have Cake check the model schema on each request. That's not relevant. paullb - see conventions[1] your class isn't named correctly, and neither is your model file. hth, AD

Re: Odd Image Path

2009-10-07 Thread Jimbo2150
I am accessing the site through a redirected domain (dev.mydomain.com) which is redirected in the hosts file so that a DNS lookup does not occur. I did the same on my laptop. That domain is redirected to the IP of my desktop (where the server is). I have MOD_REWRITE disabled since it is not availa

Re: Model Files

2009-10-07 Thread AD7six
On 7 oct, 15:22, Brendan Paull wrote: > 3 questions for the group regarding Models > > 1. Does CakePHP even read the contents of the model files. I run my > code, then I completely clear the contents of the file or put garbage > data in for values such as $useTable and there is absolutely no >

Re: unit tests not creating tables?

2009-10-07 Thread Tomás Laureano Peralta Tormey
On Tue, Oct 6, 2009 at 7:07 PM, p_W wrote: > > I have app_production and an app_test databases, and I set > app_production up just how I wanted it, kept app_test empty, and > used ./cake bake all to generate the models, controllers, views, and > tests. I have not altered the tests in any way.

Textarea and whitespaces

2009-10-07 Thread DBDash
Hi, I am kind of new to CakePHP and right now I am working on an example (Blog) from the book Practical CakePHP Projects from Kai Chan and John Omokore. But right now I am facing a problem with the handling of a textarea. When I am trying to edit a post, it is possible that the post can not be ed

Re: pagination: remember the page from where i come

2009-10-07 Thread brian
In the view with the paging, do debug($this->params['paging']). The page number should be in $this->params['paging']['ModelName']['page']. You could pass that to the 2nd controller, which would use it to get you back where you came from. On Wed, Oct 7, 2009 at 7:29 AM, Obelix wrote: > > Hallo, >

Re: regardin options and default

2009-10-07 Thread $$$
Thankyou Marcelo Andrade and Vekija...Session Helper worked too. and regarding the other doubt...I got it... my name wasnt there in the $managers list...so it wasnt showing upthank you and sorry for the silly mistake.. On Oct 5, 12:00 pm, "$$$" wrote: > add function in the controller:- >

Re: Model Files do not get read in by the system.

2009-10-07 Thread brian
You're the second person today. Clear out app/tmp/cache/models/ and set debug > 0 to have Cake check the model schema on each request. On Wed, Oct 7, 2009 at 9:51 AM, paullb wrote: > > > I have noticed that my model files do not get read by Cake -AT ALL-. I put > garbage characters into one file

Re: Validating a HABTM relationship

2009-10-07 Thread brian
I can't answer your question about HABTM/saveAll() but what I've done in the past is put the validation rule in the 'JoinModel'. In the controller for the other model: $this->SavingModel->JoinModel->set($this->data); if (!$this->SavingModel->JoinModel->validates()) { $this->SavingModel->

Re: Model Files

2009-10-07 Thread Miles J
Try clearing the cached versions first. On Oct 7, 6:22 am, Brendan Paull wrote: > 3 questions for the group regarding Models > > 1. Does CakePHP even read the contents of the model files. I run my > code, then I completely clear the contents of the file or put garbage > data in for values such a

Re: fopen: failed to open stream

2009-10-07 Thread brian
file.php is where the error was triggered; it's not the file that cannot be opened. Look more closely at the first path--you need to allow the webserver to have write access to your app/tmp directory (and all subdirectories). On Wed, Oct 7, 2009 at 9:43 AM, Jacksm wrote: > > Hi, >  I am setting

Re: Can I have more than 1 user tables and still use acl component to manage rights?

2009-10-07 Thread Vijay Pandey
No answer??? Please help...This question is not letting me sleep properly... regards, Vijay Pandey On Oct 7, 12:02 am, Vijay Pandey wrote: > Hi ! > > I am relatively new to cakePHP and I love it for its robustness and > simplicity... I have got question for experienced programmers. > > I am wo

Re: Model Files

2009-10-07 Thread brian
On Wed, Oct 7, 2009 at 9:22 AM, Brendan Paull wrote: > > 3 questions for the group regarding Models > > 1. Does CakePHP even read the contents of the model files. I run my > code, then I completely clear the contents of the file or put garbage > data in for values such as $useTable and there is a

Re: Set:sort "A Set-compatible path"

2009-10-07 Thread brian
On Wed, Oct 7, 2009 at 10:17 AM, alberto wrote: > > Where I can find the syntax of the variable $path that are passed to > the Set:sort ? For sort() you'll probably be using '{n}.ModelName.field_name'. The '{n}' part represents the array index and you provide that exactly as shown. You just need

Re: Image Gallery Design Help

2009-10-07 Thread KevinM2k
Doesn't anyone have anything to add? I dont' know the best way of doing this so any help would be great! Kev On 5 Oct, 11:18, KevinM2k wrote: > Hi, > > I am creating a custom image gallery, I have categories and sub > categories, then images within each one. > > I am pretty new to cakephp and I

Re: How can I specify "at least one is required" between HABTM models

2009-10-07 Thread WebbedIT
@john: I didn't say custom rules were not cake-like, I just said why direct people towards custom validation when they ask this question when a rule exists in the core to deal with it? You cannot deny that the multiple rule is supposed to validate multiple select fields (which 99 times out of 100

Re: Problem with Security component and form submit

2009-10-07 Thread WebbedIT
My problem was not TinyMCE it was down to a field I had set as disabled=>true ... it needed added to security's disabledFields attributes to allow the form to submit. Would still like to know if there is a way to get Security to tell you which field it is that's caused it to blackhole a request t

Re: Possible bug relative to use of memcache

2009-10-07 Thread jperras
Memcache being used as a cache configuration and Sessions have pretty much nothing in common, unless you've set your session save handler (in app/core.php) to be cache-based, which is usually not a good idea unless you know what you're doing. -j. On Oct 6, 5:19 pm, "marco.rizze...@gmail.com" wr

Set:sort "A Set-compatible path"

2009-10-07 Thread alberto
Where I can find the syntax of the variable $path that are passed to the Set:sort ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To u

Model Files do not get read in by the system.

2009-10-07 Thread paullb
I have noticed that my model files do not get read by Cake -AT ALL-. I put garbage characters into one file and it didn't impact the running at all. Obviously if the file was readin I would have got a syntax error. Could someone please enlighten me as to what is going on here? The program is abl

fopen: failed to open stream

2009-10-07 Thread Jacksm
Hi, I am setting up CakePHP on a hosted linux server. I made it through the set up, but I am still getting a lingering error on the welcome page below: Warning: fopen(/home/mysimple/public_html/login/app/tmp/cache/ persistent/cake_core_core_paths) [function.fopen]: failed to open stream: Permis

Model Files

2009-10-07 Thread Brendan Paull
3 questions for the group regarding Models 1. Does CakePHP even read the contents of the model files. I run my code, then I completely clear the contents of the file or put garbage data in for values such as $useTable and there is absolutely no effect. If CAKE is not going to read the model file,

Re: How to add a random number while including a css file ?

2009-10-07 Thread jperras
Uncomment the configure directive of Asset.timestamp in app/config/ core.php. If set to true, it will add a timestamp querystring parameter to your CSS and Javascript files when in production mode (debug = 0). -j. On Oct 7, 6:05 am, Abhishek wrote: > Hi, > I was facing some caching related issu

How to use ACL for Multiple Groups

2009-10-07 Thread Dave Maharaj :: WidePixels.com
Still cant figure this one out. I have my var $actsAs = array('Acl' => array('requester')); in scout and agent model, so when either is created it adds an entry to the aros table /*ACL NODE FUNCTION*/ function parentNode() { if (!$this->id && empty($this->data)) {

pagination: remember the page from where i come

2009-10-07 Thread Obelix
Hallo, i have a Problem with pagination. In my Example i have 2 Controllers defined (CmsFolders / CmsContens). In each Controller i have a Action with the name index. This Action and the View display all Data from the Database. The normal work is, to jump from one View to the other View and back.

Re: How can I specify "at least one is required" between HABTM models

2009-10-07 Thread John Andersen
Sorry, but this is a cake solution! Cake offers the custom rules :) Anyway, it may seem that I misunderstood the OP issue! The OP has a multiple choice (f.ex. checkboxes) and wish to be sure that at least one is specified! I thought it was that at least one associated record must be specified/ ch

Re: Jquery noConflict not working

2009-10-07 Thread robust solution
I think in your case you should do this echo $javascript->link('prototype'); echo $javascript->link('jquery', true); ... var $j = jQuery.noConflict(); so... prototype before jquery... just reverse the order of inclusion On Oct 7, 2:11 am, hahmadi82 wrote: > Hi, > In my layout default.ctp I'm t

Re: Problem with Security component and form submit

2009-10-07 Thread WebbedIT
@martin: I am having problems with security and a white screen. I suspect it's a field using TinyMCE which is causing my token to fail, and I am aware of how to specify a blackHoleCallback method, but what should I be placing in my echo debug(); to see security's errors? I don't want to disable

Re: How can I specify "at least one is required" between HABTM models

2009-10-07 Thread WebbedIT
@john: why does everyone refer people with this problem to creating their own custom rules when cake has one in it's core which would work fine if saveAll checked it before saving? Surely we should be making the core work properly than just diverting people to solve it via custom rules? --~--~---

Re: How to add a random number while including a css file ?

2009-10-07 Thread Abhishek
got the solution .. css("style.css"."?cb=".time());?> :) .. On Oct 7, 3:05 pm, Abhishek wrote: > Hi, > I was facing some caching related issues .. so i thought including a > random value might help solve the problem .. > > This is what i added while including a css file > > css("style"."?cb=

How to add a random number while including a css file ?

2009-10-07 Thread Abhishek
Hi, I was facing some caching related issues .. so i thought including a random value might help solve the problem .. This is what i added while including a css file css("style"."?cb=".time());?> which worked fine on my local apache server .. but when i uploaded it to the production server (wh

Re: How can I specify "at least one is required" between HABTM models

2009-10-07 Thread John Andersen
I suggest you to look into the custom validation rules, see http://book.cakephp.org/view/150/Custom-Validation-Rules#Adding-your-own-Validation-Methods-152 Enjoy, John On Oct 7, 9:57 am, WebbedIT wrote: > For info the lines I now apply my hack to in 1.2.5 stable are: > > /cake/libs/model/mode

Re: installing cakephp

2009-10-07 Thread Dr. Loboto
Simplest way is to put all into /home/acctName/public_html One of "the best" ways is: /home/acctName/app /home/acctName/cake /home/acctName/public_html -> aka webroot -> set name & path of webroot folder to this one On Oct 7, 6:00 am, Spence wrote: > Hi All, > > I'm a little confused about the

Re: Jquery noConflict not working

2009-10-07 Thread Dr. Loboto
There is still use of $ somewhere left in your or third party jQuery JS. Not all plugins are written with noConflict compatibility. On Oct 7, 6:11 am, hahmadi82 wrote: > Hi, > In my layout default.ctp I'm trying to do: > echo $javascript->link('jquery', true); > echo $javascript->link('prototype

Re: Possible bug relative to use of memcache

2009-10-07 Thread byqsri
Have someone any suggestion about this? On 6 Ott, 23:19, "marco.rizze...@gmail.com" wrote: > Hi > I have installed memcache on my system. > I have setted CakePHP to use memcache. > I have setted the       Configure::write('Security.level', 'medium'); > All seems to work but sometimes I lost the