Re: Error rendering, is it the intended functionality?

2012-09-18 Thread Mohammad Naghavi
lowpass, thats it. the problem is that FormHelper fetches the model data inside the view. I don't know why this is the case, but as said, I managed to solve the problem but I don't think it should be like that. it will be interesting for the Cake developers to know however. regards, Mohammad On

Re: Error rendering, is it the intended functionality?

2012-09-18 Thread lowpass
Just to clarify for anyone reading this, adding $useTable = false to the model is not the solution. Mohammad mentioned that he was testing the situation in which DB is shut down and how Cake would handle it. I've just confirmed with 2.1.3 that the error page comes up (Internal error has occurred)

Re: Error rendering, is it the intended functionality?

2012-09-17 Thread lowpass
I think I see the problem. It's not that Mohammad is explicitly querying the DB from the View, but that FormHelper is doing so behind the scenes. It fetches the model's schema. In this case the DB is unavailable and it's not being handled well. It's odd that the error message (inside the H4$

Re: Error rendering, is it the intended functionality?

2012-09-16 Thread Mohammad Naghavi
Hi, I do no query from inside the View, I just call this: $this-Form-create(); inside my view. the problem is that every thing inside view before this line comes as a part of the exception handling output. what I think is that because I don't call any db or model related actions inside the

Re: Error rendering, is it the intended functionality?

2012-09-16 Thread Léo Willian Kölln
Why there is some DB interaction during the View rendering? You dont need to do any query explicitly on the View file, if you are calling a method that does some DB interaction you are doing a Query during the View Context. If you need some data that comes from model (doesn't matter if it is from

Error rendering, is it the intended functionality?

2012-09-14 Thread Mohammad Naghavi
Hi, I'm dealing with an action of a controller, in which no db interaction is required until it comes to rendering the view. inside the view, again first half of the view doesn't need any db interactions until a form creation is started somewhere in the middle. I'm preparing my app for production

Re: Error rendering, is it the intended functionality?

2012-09-14 Thread lowpass
Are you making DB queries from within the View? You should be doing so from the model or controller. Then, once the controller has all the data it requires, it passes it to View to be rendered. On Fri, Sep 14, 2012 at 4:43 AM, Mohammad Naghavi moham...@gmail.com wrote: Hi, I'm dealing with an