Re: CakePHP should be more strict with unclean configuration, e.g. when specifying missing components! --psybear

2010-11-16 Thread Joshua Muheim
@Miles: oh no for sure I won't! That's exactly what I was expecting from CakePHP <2.0 already... :-P On Tue, Nov 16, 2010 at 7:24 PM, Miles J wrote: > Well you're going to hate Cake 2.0 which is getting rid of the error > system in place of exceptions :P > > On Nov 16, 12:47 am, Joshua Muheim wr

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread Zaky Katalan-Ezra
There is a known debate about if the controller should know about the model and view while the model and view should not know about each other Or, the view should know about the model for update purpose for example. I prefer the the first approach but I understand the other is ok too. Considering

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread Miles J
I guess it all boils down to personal preference then :P On Nov 16, 8:20 pm, cricket wrote: > On Tue, Nov 16, 2010 at 9:44 PM, Miles J wrote: > > Actually that's wrong. If this was a pure OOP framework, then we would > > be passing the model or some kind of object to the view, but we are > > not

Re: Auth / Acl redirect issue CakePHP 1.3.4

2010-11-16 Thread Amit Badkas
Hi, Auth component uses 'loginRedirect' (by default, /users/login or /admin/users/login) class property for redirecting non-logged in users to login page if you are on restricted page. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Nov 17, 2010 at 12:56 AM, danielnola

Re: Constants in hasAndBelongsToMany relationship.

2010-11-16 Thread kura
Hi John, Thanks for your reply!! It was very helpful and I got the idea now. I understand that having those constants in a table is totally fine as the database design. Yes, the payment method in my case could be added in the future, so this time I'll take the classifiers table approach. Thank

Re: Problem with Cake session time out and security level

2010-11-16 Thread Amit Badkas
Hi, Have you also added following code to your custom session settings file? ini_set('session.cookie_lifetime', 0); Also try after removing existing session cookies manually from the browser. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Nov 16, 2010 at 7:37 PM, th

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread cricket
On Tue, Nov 16, 2010 at 9:44 PM, Miles J wrote: > Actually that's wrong. If this was a pure OOP framework, then we would > be passing the model or some kind of object to the view, but we are > not since Cake uses array as its primary data structure. I didn't mention OOP. But, now that you have, n

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread Miles J
Actually that's wrong. If this was a pure OOP framework, then we would be passing the model or some kind of object to the view, but we are not since Cake uses array as its primary data structure. Say you had a method like this in your User model: public function isActive() { return $this-

Re: Baffling blank screen problem

2010-11-16 Thread cricket
On Tue, Nov 16, 2010 at 7:00 PM, Jules wrote: > I have a new CakePHP installation I'm fiddling around with. I've built > a reasonably sophisticated CakePHP app before, so I like to think I > know my way around CakePHP, but am by no means an expert. > > On my new installation, my test page (/pages/

Baffling blank screen problem

2010-11-16 Thread Jules
I have a new CakePHP installation I'm fiddling around with. I've built a reasonably sophisticated CakePHP app before, so I like to think I know my way around CakePHP, but am by no means an expert. On my new installation, my test page (/pages/home) works fine. If I come back after a few hours and r

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread cricket
On Tue, Nov 16, 2010 at 5:22 PM, Miles J wrote: > @Cricket - How so? Just because the model has database access? It > really doesn't matter if you pass the model to the view if you are > using it for convenience methods. I think you are completely missing > the point, this isn't about passing data

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread Miles J
@Cricket - How so? Just because the model has database access? It really doesn't matter if you pass the model to the view if you are using it for convenience methods. I think you are completely missing the point, this isn't about passing data to the view. On Nov 16, 11:24 am, cricket wrote: > On

array fieldName length

2010-11-16 Thread gabrielr
Hi. Everybody. I have a problem with the length of the fieldName in the array data. In my Database Table Have fieldNames with lenght of 42 words, but when I read this row, CakePHP truncate the name of that field. For example if the field is name "total_incidencias_1_5_materias_todos_grados" CAKE

Re: Auth / Acl redirect issue CakePHP 1.3.4

2010-11-16 Thread danielnolan
I am not sure that is one hundred percent accurate, if I am logged in as an admin and i type a restricted URL in the address bar of the browser I get redirected to the main site home page. If i am not logged in and I type the same restricted URL in the address bar of the browser i get redirected to

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread cricket
On Tue, Nov 16, 2010 at 2:09 PM, Jamie wrote: > No - the point of MVC is really to separate the manipulation of model > data from the view through the use of a controller. There's nothing > wrong with reading data from a model in a view, unless you like > needless overhead. Lots of respected frame

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread Jamie
No - the point of MVC is really to separate the manipulation of model data from the view through the use of a controller. There's nothing wrong with reading data from a model in a view, unless you like needless overhead. Lots of respected frameworks do it (like the Zend Framework). On Nov 16, 10:5

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread cricket
The whole point of the MVC pattern is to separate the Model from the View through the use of a Controller. On Tue, Nov 16, 2010 at 3:45 AM, Joshua Muheim wrote: > Also an interesting idea, Miles. Thanks for mentioning it. > > On Fri, Nov 12, 2010 at 8:00 PM, Miles J wrote: >> I dislike this also

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-16 Thread cricket
On Tue, Nov 16, 2010 at 1:37 PM, qua...@gmail.com wrote: > I do call Create() before any Save operation. You think I need to do > that even for Read operation? Possibly. Are you reading inside a loop? But I won't speculate without seeing more code. Check out the new CakePHP Questions site http:/

Re: Book software like on book.cakephp.org

2010-11-16 Thread cricket
On Mon, Nov 15, 2010 at 10:18 AM, Saša wrote: > Hey guys, > > (Maybe a little off-topic) > > I was just browsing through http://book.cakephp.org/view/875/x1-3-Collection > and marveling at the implementation of the book software. Is this > open? And if not do you know of any similar web apps that

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-16 Thread qua...@gmail.com
I do call Create() before any Save operation. You think I need to do that even for Read operation? Thanks. On Nov 16, 10:18 am, cricket wrote: > On Tue, Nov 16, 2010 at 12:50 PM, qua...@gmail.com wrote: > > Hi, > > > I have a bunch of models with various associations set up between them > > and

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-16 Thread qua...@gmail.com
No, it doesn't happen to every calls. I start the loop, and eventually it will fail due to incorrect SQL statement executed. And it happens all over the places as you can see from my examples. Thanks. On Nov 16, 10:20 am, Bogdan Bursuc wrote: > I think there is an explanation to this. To me it s

Re: Saving & Loading Session Data

2010-11-16 Thread cricket
On Tue, Nov 16, 2010 at 9:23 AM, Stephen wrote: > Hi There > > I need to give my customers the ability to save incomplete orders and > restore them at a later date. > > The orders are quite intricate and can sometimes contain a lot of data (this > is another reason why I need save and load). > > T

Re: CakePHP should be more strict with unclean configuration, e.g. when specifying missing components! --psybear

2010-11-16 Thread Miles J
Well you're going to hate Cake 2.0 which is getting rid of the error system in place of exceptions :P On Nov 16, 12:47 am, Joshua Muheim wrote: > Thank you for your replies. I was not aware that false is returned, so > I'm taking back my accusation that CakePHP is lazy. Still I'd like to > have a

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-16 Thread Bogdan Bursuc
I think there is an explanation to this. To me it seems just imposibile to generate this. Something somewhere is certainly wrong. And I don't thing cake is. Why not check the core ? For example try: recursive => -1 See if happens again. Does this happens on every call ? On Tue, Nov 16, 2010 at 7

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-16 Thread cricket
On Tue, Nov 16, 2010 at 12:50 PM, qua...@gmail.com wrote: > Hi, > > I have a bunch of models with various associations set up between them > and seems like Cakephp at times executes incorrect SQL statement and > cause MySQL to barf. > > Please refer the the "EDIT" followed by this to see some exam

CakePHP Model uses the wrong fields in SQL statements!

2010-11-16 Thread qua...@gmail.com
Hi, I have a bunch of models with various associations set up between them and seems like Cakephp at times executes incorrect SQL statement and cause MySQL to barf. Please refer the the "EDIT" followed by this to see some examples of the problem. It doesn't happen all the time but it eventually

Re: Solved: Submit button label in e.g. swedish

2010-11-16 Thread euromark
thats strange i would have thought the problem is that your file is not saved as "utf8"... On 16 Nov., 15:39, Björn N wrote: > Thank you Amit and cricket. Either of these does work. > > > > > > > > > > > echo $form->end(array('label' => 'Lägg till', 'escape' => false)); > > > Amit Badkas > > > >

Re: Problem with Cake session time out and security level

2010-11-16 Thread Amit Badkas
Hi, I think following code will do the trick alongwith custom session settings, try Configure::write('Session.timeout', 0.9); Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Tue, Nov 16, 2010 at 6:04 PM, thomaus wrote: > Hi, > > I know that but my problem is not this one

Re: Problem with Cake session time out and security level

2010-11-16 Thread thomaus
Hi, I know that but my problem is not this one. I want to know how to have these 3 conditions fullfilled: 1) Security level to "medium" (and not "high") 2) A given time-out of 90 seconds 3) An automatic log-out after browser closing So far, I can't find a way to do it! On Nov 16, 5:56 am, Am

Re: yahoo web hosting problem

2010-11-16 Thread fadhli
sorry my english is bad. :( but i will try again to explain it for you. i hope u understand this time. I built a website and use apache as a web server on my computer. then I have to upload it to yahoo web hosting. in yahoo web hosting does not allow to upload . htaccess files (so i think they us

Re: Is there a reason why I shouln't make $this->Html available in views as $html? --psybear

2010-11-16 Thread Joshua Muheim
Thank you for the explanations, guys. I have no problems accepting a solution that seems to be suboptimal in my opinion when can comprehend your motivations behind it. :-) On Sat, Nov 13, 2010 at 5:36 PM, mark_story wrote: > One of the main reasons it was changed to a view property, was that > pe

Re: CakePHP should be more strict with unclean configuration, e.g. when specifying missing components! --psybear

2010-11-16 Thread Joshua Muheim
Thank you for your replies. I was not aware that false is returned, so I'm taking back my accusation that CakePHP is lazy. Still I'd like to have an option that CakePHP automatically cries when in development mode... On Sat, Nov 13, 2010 at 5:32 PM, mark_story wrote: > Also App::import() returns

Re: Why only pass $data to view instead of model instance?

2010-11-16 Thread Joshua Muheim
Also an interesting idea, Miles. Thanks for mentioning it. On Fri, Nov 12, 2010 at 8:00 PM, Miles J wrote: > I dislike this also. Cake really should have more than 1 model type: > DAOModel and DataModel. > > One deals with database interactions, while the other manipulates a > dataset for the vie

Re: Book software like on book.cakephp.org

2010-11-16 Thread Zaky Katalan-Ezra
In Linux create a script with this line wkhtmltopdf http://book.cakephp.org/complete/876/The-Manual cakemanual.pdf and run it every night via cron. On Mon, Nov 15, 2010 at 5:18 PM, Saša wrote: > Hey guys, > > (Maybe a little off-topic) > > I was just browsing through > http://book.cakephp.org/vi