Fabio I may not entirely understand, if so I appoligize.
If you want to know why using Configure::write('debug', 0); in the / views/posts/add.ctp for the redirect then I offer my explanation. 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. You could illustrate this by logging the display of the flash layout and debug the display of add.ctp. 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. On Dec 18, 4:16 pm, Fabio M <fabio.mess...@gmail.com> wrote: > Wait. Changing the debug value in the core configuration make the > flash messages work. > Contrarily the change I tried to do in the add.ctp view was not holded > outside that context. So the question is: why? > > Thank you, Fabio --~--~---------~--~----~------------~-------~--~----~ 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 email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---