I try to be more clear. It's me who apologize: English is not my first
language, sorry. : )

> Heres your scenario  (as I understand it);
>
> Controller calls flash layout passing it a url,delay and message ->
> Flash layout displays. If debug == 0 it will redirect in the time
> specified. to the url specified.  ->
> the redirect lands on add.ctp where you set debug = 0.

> If that is indeed the case than I think you can see the problem.
> The code in add.ctp comes into play only AFTER the would be redirect.

No, wait, the redirect I set doesnt not land to add... it's a redirect
to the index action (to '/movies').
So, let's resume, I wanted to perform an add action: the browser
requests for the 'movies/add' url. Since I know that the code for the
save of the model will wait for a not empty $data array I'm sure that
the code of add.cpt (with the creation of the form and the change of
the debug value) will be executed before the second call of the add
action (with the flash method call inside).
It should have been worked. Well...  if I get right how the request
flow goes.

> You could illustrate this by logging the display of the flash layout
> and debug the display of add.ctp.

I'm not really into the logging by now. But I'll certainly use it to
better understand how things work and which the execution flow is.

> So I would recommend using Configure::write('debug', 0);  in the
> actual controller just before calling flash...
>
> Or you might just do as I did and override the default flash layout
> with your own, and remove the whole check for debug. I never
> understood why the page is frozen for debug to begin anyhow.

I did kind of the second way: I placed the line for the change of
debug value in the flash layout itself, and it worked. But again: I
dont understand, this change lasts till...  when? I noticed that since
the very next operation all works as the debug value was back to the
default (2, with all debug messages. And that's also what happened
before when it didnt work, I guess). So I think I didnt understand
well which is the lifecycle of this Configure object.

Thank you for your patience  : )

Fabio
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to