Welcome Guest, Not a member yet? Register   Sign In
Google Chrome and keep_flashdata
#1

[eluser]Mark Price[/eluser]
I have some pretty simple code that will redirect a user to the requested page once the user logs in.
Code:
if($this->session->flashdata('auth_redirect'))
{
    $this->session->keep_flashdata('auth_redirect');
    $auth_redirect = $this->session->flashdata('auth_redirect');
}
else
{
    $auth_redirect = '/members';
}

This works great in Firefox and IE but in Google Chrome auth_redirect clears once the login form is submitted and is not kept for another request.

For some reason keep_flashdata is not working in Chrome. Any Ideas?

Thanks
#2

[eluser]Mark Price[/eluser]
I think I have narrowed this down to be a bug in HMVC because it works with just CI's core files.
#3

[eluser]skunkbad[/eluser]
check your server logs for any 404s, or anything that might be using up your flash data instance
#4

[eluser]Mark Price[/eluser]
You are a genius to think of that.

Chrome had these assess logs:
Code:
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:15 -0500] "GET /admin HTTP/1.1" 302 962 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3"
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:15 -0500] "GET /users/login HTTP/1.1" 200 1883 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3"
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:15 -0500] "GET /favicon.ico HTTP/1.1" 404 2571 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3"

And Firefox had these:
Code:
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:56 -0500] "GET /admin HTTP/1.1" 302 1377 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/10.04 (lucid) Firefox/3.6.9"
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:56 -0500] "GET /users/login HTTP/1.1" 200 1888 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/10.04 (lucid) Firefox/3.6.9"

It was the 404 error on the favicon.ico that was screwing things up. Its weird that I would get a 404 in chrome for the favicon.ico but not in other browsers.

Thanks for the help.
#5

[eluser]skunkbad[/eluser]
[quote author="Mark Price" date="1284886835"]You are a genius to think of that.

Chrome had these assess logs:
Code:
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:15 -0500] "GET /admin HTTP/1.1" 302 962 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3"
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:15 -0500] "GET /users/login HTTP/1.1" 200 1883 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3"
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:15 -0500] "GET /favicon.ico HTTP/1.1" 404 2571 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.55 Safari/534.3"

And Firefox had these:
Code:
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:56 -0500] "GET /admin HTTP/1.1" 302 1377 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/10.04 (lucid) Firefox/3.6.9"
*.dev:80 **.***.***.** - markp [18/Sep/2010:22:39:56 -0500] "GET /users/login HTTP/1.1" 200 1888 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100825 Ubuntu/10.04 (lucid) Firefox/3.6.9"

It was the 404 error on the favicon.ico that was screwing things up. Its weird that I would get a 404 in chrome for the favicon.ico but not in other browsers.

Thanks for the help.[/quote]

I'm not a genius. I've just encountered this issue before (a few times). Now you know, and you are the genius.




Theme © iAndrew 2016 - Forum software by © MyBB