Class ExsController extends AppController{
public function list(){
$this->Session->setFlash('Hello');
$this->redirect('/exs/new',null,true); // or redirect + die()
}
public function new(){}
}
// view layout
<?php $session->flash() ?>
Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
safari and chrome.
Session is working, if I write something manually I can see it in
firefox. I can even see that at some point the message was put in
session because if I print the session I see the empty message array.
If I take out the redirect it shows the message in that page even in
firefox, somehow it gets wiped. As if the script would have continued
after the redirect... but only in firefox, wich just flips me out. It
can't be catching a template, I can't imagine that... Anyone has a
clue about what's happening here?
This happened in a big project but I reduced to something as simple as
what I pasted and the problem persists.
I hope someone at least tries this and tells me it works for them,
just to know if I have some weird configuration on browser or server,
or this really doesn't work.
> Class ExsController extends AppController{
> public function list(){
> $this->Session->setFlash('Hello');
> $this->redirect('/exs/new',null,true); // or redirect + die()}
> public function new(){}
> }
> // view layout
> <?php $session->flash() ?>
> Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
> safari and chrome.
> Session is working, if I write something manually I can see it in
> firefox. I can even see that at some point the message was put in
> session because if I print the session I see the empty message array.
> If I take out the redirect it shows the message in that page even in
> firefox, somehow it gets wiped. As if the script would have continued
> after the redirect... but only in firefox, wich just flips me out. It
> can't be catching a template, I can't imagine that... Anyone has a
> clue about what's happening here?
> This happened in a big project but I reduced to something as simple as
> what I pasted and the problem persists.
> I hope someone at least tries this and tells me it works for them,
> just to know if I have some weird configuration on browser or server,
> or this really doesn't work.
> Sorry, Cake is 1.2.5, server is Apache 2.2 running on windows, and PHP
> is 5.2.
> Don't know if it's relevant.
> On 9 oct, 17:12, Franco Bonazza <fviki...@gmail.com> wrote:
> > Hello,
> > Here's my problem
> > Something this simple:
> > // controller
> > Class ExsController extends AppController{
> > public function list(){
> > $this->Session->setFlash('Hello');
> > $this->redirect('/exs/new',null,true); // or redirect + die()}
> > public function new(){}
> > }
> > // view layout
> > <?php $session->flash() ?>
> > Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
> > safari and chrome.
> > Session is working, if I write something manually I can see it in
> > firefox. I can even see that at some point the message was put in
> > session because if I print the session I see the empty message array.
> > If I take out the redirect it shows the message in that page even in
> > firefox, somehow it gets wiped. As if the script would have continued
> > after the redirect... but only in firefox, wich just flips me out. It
> > can't be catching a template, I can't imagine that... Anyone has a
> > clue about what's happening here?
> > This happened in a big project but I reduced to something as simple as
> > what I pasted and the problem persists.
> > I hope someone at least tries this and tells me it works for them,
> > just to know if I have some weird configuration on browser or server,
> > or this really doesn't work.
> On 9 okt, 23:56, Franco Bonazza <fviki...@gmail.com> wrote:
> > Sorry, Cake is 1.2.5, server is Apache 2.2 running on windows, and PHP
> > is 5.2.
> > Don't know if it's relevant.
> > On 9 oct, 17:12, Franco Bonazza <fviki...@gmail.com> wrote:
> > > Hello,
> > > Here's my problem
> > > Something this simple:
> > > // controller
> > > Class ExsController extends AppController{
> > > public function list(){
> > > $this->Session->setFlash('Hello');
> > > $this->redirect('/exs/new',null,true); // or redirect + die()}
> > > public function new(){}
> > > }
> > > // view layout
> > > <?php $session->flash() ?>
> > > Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
> > > safari and chrome.
> > > Session is working, if I write something manually I can see it in
> > > firefox. I can even see that at some point the message was put in
> > > session because if I print the session I see the empty message array.
> > > If I take out the redirect it shows the message in that page even in
> > > firefox, somehow it gets wiped. As if the script would have continued
> > > after the redirect... but only in firefox, wich just flips me out. It
> > > can't be catching a template, I can't imagine that... Anyone has a
> > > clue about what's happening here?
> > > This happened in a big project but I reduced to something as simple as
> > > what I pasted and the problem persists.
> > > I hope someone at least tries this and tells me it works for them,
> > > just to know if I have some weird configuration on browser or server,
> > > or this really doesn't work.
@John: You are mistaken. First, if that were the case, flashes
wouldn't work in all the other browser which the OP clearly stated it
does, and secondly, the entire point of flash is to pass a message to
the user through a redirect. I use them all the time and they work
perfectly well through redirects.
To the OP, it works fine in Firefox 3.5.4 for me, Cent OS server, PHP
5.2.9. Is it just Firefox 3.5.3? Have you tried installing the
latest version of firefox in a VM (or somewhere) to repeat the result?
Nick
On Nov 5, 3:33 am, John Andersen <j.andersen...@gmail.com> wrote:
> > > > Class ExsController extends AppController{
> > > > public function list(){
> > > > $this->Session->setFlash('Hello');
> > > > $this->redirect('/exs/new',null,true); // or redirect + die()}
> > > > public function new(){}
> > > > }
> > > > // view layout
> > > > <?php $session->flash() ?>
> > > > Doesn't work at all when I'm using Firefox. It works in opera 10, ie8,
> > > > safari and chrome.
> > > > Session is working, if I write something manually I can see it in
> > > > firefox. I can even see that at some point the message was put in
> > > > session because if I print the session I see the empty message array.
> > > > If I take out the redirect it shows the message in that page even in
> > > > firefox, somehow it gets wiped. As if the script would have continued
> > > > after the redirect... but only in firefox, wich just flips me out. It
> > > > can't be catching a template, I can't imagine that... Anyone has a
> > > > clue about what's happening here?
> > > > This happened in a big project but I reduced to something as simple as
> > > > what I pasted and the problem persists.
> > > > I hope someone at least tries this and tells me it works for them,
> > > > just to know if I have some weird configuration on browser or server,
> > > > or this really doesn't work.
@Nick: Yes, you are right! My mistake, even saw it in my own code :)
Firefox 3.5.2 works fine! Will install 3.5.3 just to test it!
Enjoy,
John
On Nov 6, 11:30 am, nurvzy <nur...@gmail.com> wrote:
> @John: You are mistaken. First, if that were the case, flashes
> wouldn't work in all the other browser which the OP clearly stated it
> does, and secondly, the entire point of flash is to pass a message to
> the user through a redirect. I use them all the time and they work
> perfectly well through redirects.
> To the OP, it works fine in Firefox 3.5.4 for me, Cent OS server, PHP
> 5.2.9. Is it just Firefox 3.5.3? Have you tried installing the
> latest version of firefox in a VM (or somewhere) to repeat the result?
> @Nick: Yes, you are right! My mistake, even saw it in my own code :)
> Firefox 3.5.2 works fine! Will install 3.5.3 just to test it!
> Enjoy,
> John
> On Nov 6, 11:30 am, nurvzy <nur...@gmail.com> wrote:> @John: You are mistaken. First, if that were the case, flashes
> > wouldn't work in all the other browser which the OP clearly stated it
> > does, and secondly, the entire point of flash is to pass a message to
> > the user through a redirect. I use them all the time and they work
> > perfectly well through redirects.
> > To the OP, it works fine in Firefox 3.5.4 for me, Cent OS server, PHP
> > 5.2.9. Is it just Firefox 3.5.3? Have you tried installing the
> > latest version of firefox in a VM (or somewhere) to repeat the result?