Should flash still be persisting through redirects? Until the recent release, when I had: flash[:error] = "Foo" redirect_to login_url The flash would be populated and displayed on the login page. Now the flash is being cleared. Is this intentional, and if so why? -- Amos King aka: Adkron http://dirtyInformation.com http://github.com/Adkron -- Looking for something to do? Visit http://ImThere.com
Are you sure there''s not a double redirect? This can happen if you''re using a plugin like ssl_requirement, where the initial redirect to login_path goes to port 80, then the plugin jumps in and redirects to the same url on port 443. -John On Wed, Apr 22, 2009 at 7:30 AM, Amos King <amos.l.king@gmail.com> wrote:> > Should flash still be persisting through redirects? Until the recent > release, when I had: > > flash[:error] = "Foo" > redirect_to login_url > > The flash would be populated and displayed on the login page. Now the > flash is being cleared. Is this intentional, and if so why? > > -- > Amos King > aka: Adkron > http://dirtyInformation.com > http://github.com/Adkron > -- > Looking for something to do? Visit http://ImThere.com > > > >-- John Trupiano President SmartLogic Solutions http://www.smartlogicsolutions.com @jtrupiano --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
We are only using ssl. It worked before the last upgrade. I can''t find a double redirect. On Wed, Apr 22, 2009 at 7:10 AM, John Trupiano <jtrupiano@gmail.com> wrote:> Are you sure there''s not a double redirect? This can happen if you''re using > a plugin like ssl_requirement, where the initial redirect to login_path goes > to port 80, then the plugin jumps in and redirects to the same url on port > 443. > > -John > > On Wed, Apr 22, 2009 at 7:30 AM, Amos King <amos.l.king@gmail.com> wrote: >> >> Should flash still be persisting through redirects? Until the recent >> release, when I had: >> >> flash[:error] = "Foo" >> redirect_to login_url >> >> The flash would be populated and displayed on the login page. Now the >> flash is being cleared. Is this intentional, and if so why? >> >> -- >> Amos King >> aka: Adkron >> http://dirtyInformation.com >> http://github.com/Adkron >> -- >> Looking for something to do? Visit http://ImThere.com >> >> > > > > -- > John Trupiano > President > SmartLogic Solutions > http://www.smartlogicsolutions.com > @jtrupiano > > > >-- Amos King http://dirtyInformation.com http://github.com/Adkron -- Looking for something to do? Visit http://ImThere.com
> Should flash still be persisting through redirects? Until the recent > release, when I had: > > flash[:error] = "Foo" > redirect_to login_url > > The flash would be populated and displayed on the login page. Now the > flash is being cleared. Is this intentional, and if so why?No, and this works for me at present. As John mentioned, the double redirect is the likely cause. What do your logs show?> -- > Amos King > aka: Adkron > http://dirtyInformation.com > http://github.com/Adkron > -- > Looking for something to do? Visit http://ImThere.com > > > >-- Cheers Koz
I''l have to find it. The team changed it to a render instead of a redirect(as a temp fix) I have to change it back to tell you. We really hacked it. I had redirect_to :index and now it is: #update_code index render :index #failed update code Horrible! I''ll get on changing it back and let you know. On Wed, Apr 22, 2009 at 6:28 PM, Michael Koziarski <michael@koziarski.com> wrote:> >> Should flash still be persisting through redirects? Until the recent >> release, when I had: >> >> flash[:error] = "Foo" >> redirect_to login_url >> >> The flash would be populated and displayed on the login page. Now the >> flash is being cleared. Is this intentional, and if so why? > > No, and this works for me at present. As John mentioned, the double > redirect is the likely cause. What do your logs show? > > >> -- >> Amos King >> aka: Adkron >> http://dirtyInformation.com >> http://github.com/Adkron >> -- >> Looking for something to do? Visit http://ImThere.com >> >> > >> > > > > -- > Cheers > > Koz > > > >-- Amos King http://dirtyInformation.com http://github.com/Adkron -- Looking for something to do? Visit http://ImThere.com
err render(redirect_to) :action=> ''index'' sorry On Tue, Apr 28, 2009 at 9:22 AM, Amos King <amos.l.king@gmail.com> wrote:> I''l have to find it. The team changed it to a render instead of a > redirect(as a temp fix) I have to change it back to tell you. We > really hacked it. I had redirect_to :index and now it is: > > #update_code > index > render :index > #failed update code > > Horrible! > > I''ll get on changing it back and let you know. > > On Wed, Apr 22, 2009 at 6:28 PM, Michael Koziarski > <michael@koziarski.com> wrote: >> >>> Should flash still be persisting through redirects? Until the recent >>> release, when I had: >>> >>> flash[:error] = "Foo" >>> redirect_to login_url >>> >>> The flash would be populated and displayed on the login page. Now the >>> flash is being cleared. Is this intentional, and if so why? >> >> No, and this works for me at present. As John mentioned, the double >> redirect is the likely cause. What do your logs show? >> >> >>> -- >>> Amos King >>> aka: Adkron >>> http://dirtyInformation.com >>> http://github.com/Adkron >>> -- >>> Looking for something to do? Visit http://ImThere.com >>> >>> > >>> >> >> >> >> -- >> Cheers >> >> Koz >> >> >> >> > > > > -- > Amos King > http://dirtyInformation.com > http://github.com/Adkron > -- > Looking for something to do? Visit http://ImThere.com >-- Amos King http://dirtyInformation.com http://github.com/Adkron -- Looking for something to do? Visit http://ImThere.com
It is a single redirect. Here is the log. Processing User::MemberInfoController#index (for 127.0.0.1 at 2009-04-28 09:44:23) [GET] Parameters: {"action"=>"index", "controller"=>"user/member_info"} Member Load (12.4ms) SELECT * FROM `member` WHERE (`member`.`username` = ''factoryusername1'') LIMIT 1 MemberAvatar Load (0.2ms) SELECT * FROM `member_avatars` WHERE (`member_avatars`.member_id = ''id1'') LIMIT 1 Rendering template within layouts/main Rendering user/member_info/index Rendered user/member_info/_form (8.1ms) Rendered user/member_info/_avatar (3.6ms) Skill Load (0.3ms) SELECT * FROM `skills` WHERE (`skills`.member_id = ''id1'') Rendered user/member_info/_skill_summary (93.3ms) Rendered user/member_info/_password_form (4.0ms) Rendered layouts/_doctype (0.1ms) Rendered shared/_welcome (0.1ms) Rendered layouts/_navigation (0.4ms) Rendered layouts/_header (0.9ms) Rendered layouts/_error_section (0.2ms) SiteLink Load (0.4ms) SELECT * FROM `customlink` WHERE ( (`customlink`.`type` = ''SiteLink'' ) ) SQL (0.3ms) SELECT count(*) AS count_all FROM `memberproject` WHERE (((`memberproject`.`status` = ''ACT'') AND (`memberproject`.memberid = ''id1'')) AND (`memberproject`.memberid ''id1'')) LIMIT 6 Rendered layouts/_page_footer (4.3ms) Rendered layouts/_navigation (0.3ms) Rendered layouts/_footer (0.6ms) Completed in 137ms (View: 121, DB: 14) | 200 OK [http://www.example.com/user/member_info] REQUESTING PAGE: POST /user/member_info/updatePass with {"commit"=>"Change Password", "password_confirmation"=>["111111"], "memberid"=>["id1"], "new_password"=>["111111"], "password"=>["111111"]} and HTTP headers {"HTTP_REFERER"=>"/user/member_info"} Processing User::MemberInfoController#updatePass (for 127.0.0.1 at 2009-04-28 09:44:24) [POST] Parameters: {"commit"=>"Change Password", "password_confirmation"=>"[FILTERED]", "memberid"=>["id1"], "action"=>"updatePass", "controller"=>"user/member_info", "new_password"=>"[FILTERED]", "password"=>"[FILTERED]"} Member Load (12.3ms) SELECT * FROM `member` WHERE (`member`.`username` = ''factoryusername1'') LIMIT 1 Member Load (1.5ms) SELECT * FROM `member` WHERE (`member`.`memberid` IN (''id1'')) LIMIT 1 Redirected to http://www.example.com/user/member_info Completed in 17ms (DB: 15) | 302 Found [http://www.example.com/user/member_info/updatePass] REQUESTING PAGE: GET http://www.example.com/user/member_info with {} and HTTP headers {"HTTP_REFERER"=>"/user/member_info/updatePass"} Processing User::MemberInfoController#index (for 127.0.0.1 at 2009-04-28 09:44:24) [GET] Parameters: {"action"=>"index", "controller"=>"user/member_info"} Member Load (1.0ms) SELECT * FROM `member` WHERE (`member`.`username` = ''factoryusername1'') LIMIT 1 MemberAvatar Load (0.2ms) SELECT * FROM `member_avatars` WHERE (`member_avatars`.member_id = ''id1'') LIMIT 1 Rendering template within layouts/main Rendering user/member_info/index Rendered user/member_info/_form (2.7ms) Rendered user/member_info/_avatar (0.4ms) Skill Load (0.2ms) SELECT * FROM `skills` WHERE (`skills`.member_id = ''id1'') Rendered user/member_info/_skill_summary (1.2ms) Rendered user/member_info/_password_form (0.8ms) Rendered layouts/_doctype (0.1ms) Rendered shared/_welcome (0.1ms) Rendered layouts/_navigation (0.4ms) Rendered layouts/_header (0.8ms) Rendered layouts/_error_section (0.2ms) SiteLink Load (0.3ms) SELECT * FROM `customlink` WHERE ( (`customlink`.`type` = ''SiteLink'' ) ) SQL (0.3ms) SELECT count(*) AS count_all FROM `memberproject` WHERE (((`memberproject`.`status` = ''ACT'') AND (`memberproject`.memberid = ''id1'')) AND (`memberproject`.memberid ''id1'')) LIMIT 6 Rendered layouts/_page_footer (3.6ms) Rendered layouts/_navigation (0.3ms) Rendered layouts/_footer (0.6ms) Completed in 17ms (View: 13, DB: 3) | 200 OK [http://www.example.com/user/member_info] SQL (1.0ms) ROLLBACK The first action is getting to the page that lists all the information. Then there is an updatePass action the redirects to index. Sorry about the conventions this is an old part of the application and was written before the team had known much about ruby or rails. Right now it is difficult to change because we are interacting with a legacy application that is not well tested. On Tue, Apr 28, 2009 at 9:24 AM, Amos King <amos.l.king@gmail.com> wrote:> err > render(redirect_to) :action=> ''index'' > sorry > > On Tue, Apr 28, 2009 at 9:22 AM, Amos King <amos.l.king@gmail.com> wrote: >> I''l have to find it. The team changed it to a render instead of a >> redirect(as a temp fix) I have to change it back to tell you. We >> really hacked it. I had redirect_to :index and now it is: >> >> #update_code >> index >> render :index >> #failed update code >> >> Horrible! >> >> I''ll get on changing it back and let you know. >> >> On Wed, Apr 22, 2009 at 6:28 PM, Michael Koziarski >> <michael@koziarski.com> wrote: >>> >>>> Should flash still be persisting through redirects? Until the recent >>>> release, when I had: >>>> >>>> flash[:error] = "Foo" >>>> redirect_to login_url >>>> >>>> The flash would be populated and displayed on the login page. Now the >>>> flash is being cleared. Is this intentional, and if so why? >>> >>> No, and this works for me at present. As John mentioned, the double >>> redirect is the likely cause. What do your logs show? >>> >>> >>>> -- >>>> Amos King >>>> aka: Adkron >>>> http://dirtyInformation.com >>>> http://github.com/Adkron >>>> -- >>>> Looking for something to do? Visit http://ImThere.com >>>> >>>> > >>>> >>> >>> >>> >>> -- >>> Cheers >>> >>> Koz >>> >>> >>> >>> >> >> >> >> -- >> Amos King >> http://dirtyInformation.com >> http://github.com/Adkron >> -- >> Looking for something to do? Visit http://ImThere.com >> > > > > -- > Amos King > http://dirtyInformation.com > http://github.com/Adkron > -- > Looking for something to do? Visit http://ImThere.com >-- Amos King http://dirtyInformation.com http://github.com/Adkron -- Looking for something to do? Visit http://ImThere.com
I''m dealing with this issue as well and as far as I can tell there is only a single redirect. Has anybody figured out the problem? On Apr 28, 10:48 am, Amos King <amos.l.k...@gmail.com> wrote:> It is a single redirect. Here is the log. > > Processing User::MemberInfoController#index (for 127.0.0.1 at > 2009-04-28 09:44:23) [GET] > Parameters: {"action"=>"index", "controller"=>"user/member_info"} > Member Load (12.4ms) SELECT * FROM `member` WHERE > (`member`.`username` = ''factoryusername1'') LIMIT 1 > MemberAvatar Load (0.2ms) SELECT * FROM `member_avatars` WHERE > (`member_avatars`.member_id = ''id1'') LIMIT 1 > Rendering template within layouts/main > Rendering user/member_info/index > Rendered user/member_info/_form (8.1ms) > Rendered user/member_info/_avatar (3.6ms) > Skill Load (0.3ms) SELECT * FROM `skills` WHERE > (`skills`.member_id = ''id1'') > Rendered user/member_info/_skill_summary (93.3ms) > Rendered user/member_info/_password_form (4.0ms) > Rendered layouts/_doctype (0.1ms) > Rendered shared/_welcome (0.1ms) > Rendered layouts/_navigation (0.4ms) > Rendered layouts/_header (0.9ms) > Rendered layouts/_error_section (0.2ms) > SiteLink Load (0.4ms) SELECT * FROM `customlink` WHERE ( > (`customlink`.`type` = ''SiteLink'' ) ) > SQL (0.3ms) SELECT count(*) AS count_all FROM `memberproject` > WHERE (((`memberproject`.`status` = ''ACT'') AND > (`memberproject`.memberid = ''id1'')) AND (`memberproject`.memberid > ''id1'')) LIMIT 6 > Rendered layouts/_page_footer (4.3ms) > Rendered layouts/_navigation (0.3ms) > Rendered layouts/_footer (0.6ms) > Completed in 137ms (View: 121, DB: 14) | 200 OK > [http://www.example.com/user/member_info] > REQUESTING PAGE: POST /user/member_info/updatePass with > {"commit"=>"Change Password", "password_confirmation"=>["111111"], > "memberid"=>["id1"], "new_password"=>["111111"], > "password"=>["111111"]} and HTTP headers > {"HTTP_REFERER"=>"/user/member_info"} > > Processing User::MemberInfoController#updatePass (for 127.0.0.1 at > 2009-04-28 09:44:24) [POST] > Parameters: {"commit"=>"Change Password", > "password_confirmation"=>"[FILTERED]", "memberid"=>["id1"], > "action"=>"updatePass", "controller"=>"user/member_info", > "new_password"=>"[FILTERED]", "password"=>"[FILTERED]"} > Member Load (12.3ms) SELECT * FROM `member` WHERE > (`member`.`username` = ''factoryusername1'') LIMIT 1 > Member Load (1.5ms) SELECT * FROM `member` WHERE > (`member`.`memberid` IN (''id1'')) LIMIT 1 > Redirected tohttp://www.example.com/user/member_info > Completed in 17ms (DB: 15) | 302 Found > [http://www.example.com/user/member_info/updatePass] > REQUESTING PAGE: GEThttp://www.example.com/user/member_infowith {} > and HTTP headers {"HTTP_REFERER"=>"/user/member_info/updatePass"} > > Processing User::MemberInfoController#index (for 127.0.0.1 at > 2009-04-28 09:44:24) [GET] > Parameters: {"action"=>"index", "controller"=>"user/member_info"} > Member Load (1.0ms) SELECT * FROM `member` WHERE > (`member`.`username` = ''factoryusername1'') LIMIT 1 > MemberAvatar Load (0.2ms) SELECT * FROM `member_avatars` WHERE > (`member_avatars`.member_id = ''id1'') LIMIT 1 > Rendering template within layouts/main > Rendering user/member_info/index > Rendered user/member_info/_form (2.7ms) > Rendered user/member_info/_avatar (0.4ms) > Skill Load (0.2ms) SELECT * FROM `skills` WHERE > (`skills`.member_id = ''id1'') > Rendered user/member_info/_skill_summary (1.2ms) > Rendered user/member_info/_password_form (0.8ms) > Rendered layouts/_doctype (0.1ms) > Rendered shared/_welcome (0.1ms) > Rendered layouts/_navigation (0.4ms) > Rendered layouts/_header (0.8ms) > Rendered layouts/_error_section (0.2ms) > SiteLink Load (0.3ms) SELECT * FROM `customlink` WHERE ( > (`customlink`.`type` = ''SiteLink'' ) ) > SQL (0.3ms) SELECT count(*) AS count_all FROM `memberproject` > WHERE (((`memberproject`.`status` = ''ACT'') AND > (`memberproject`.memberid = ''id1'')) AND (`memberproject`.memberid > ''id1'')) LIMIT 6 > Rendered layouts/_page_footer (3.6ms) > Rendered layouts/_navigation (0.3ms) > Rendered layouts/_footer (0.6ms) > Completed in 17ms (View: 13, DB: 3) | 200 OK > [http://www.example.com/user/member_info] > SQL (1.0ms) ROLLBACK > > The first action is getting to the page that lists all the > information. Then there is an updatePass action the redirects to > index. Sorry about the conventions this is an old part of the > application and was written before the team had known much about ruby > or rails. Right now it is difficult to change because we are > interacting with a legacy application that is not well tested. > > > > On Tue, Apr 28, 2009 at 9:24 AM, Amos King <amos.l.k...@gmail.com> wrote: > > err > > render(redirect_to) :action=> ''index'' > > sorry > > > On Tue, Apr 28, 2009 at 9:22 AM, Amos King <amos.l.k...@gmail.com> wrote: > >> I''l have to find it. The team changed it to a render instead of a > >> redirect(as a temp fix) I have to change it back to tell you. We > >> really hacked it. I had redirect_to :index and now it is: > > >> #update_code > >> index > >> render :index > >> #failed update code > > >> Horrible! > > >> I''ll get on changing it back and let you know. > > >> On Wed, Apr 22, 2009 at 6:28 PM, Michael Koziarski > >> <mich...@koziarski.com> wrote: > > >>>> Should flash still be persisting through redirects? Until the recent > >>>> release, when I had: > > >>>> flash[:error] = "Foo" > >>>> redirect_to login_url > > >>>> The flash would be populated and displayed on the login page. Now the > >>>> flash is being cleared. Is this intentional, and if so why? > > >>> No, and this works for me at present. As John mentioned, the double > >>> redirect is the likely cause. What do your logs show? > > >>>> -- > >>>> Amos King > >>>> aka: Adkron > >>>>http://dirtyInformation.com > >>>>http://github.com/Adkron > >>>> -- > >>>> Looking for something to do? Visithttp://ImThere.com > > >>> -- > >>> Cheers > > >>> Koz > > >> -- > >> Amos King > >>http://dirtyInformation.com > >>http://github.com/Adkron > >> -- > >> Looking for something to do? Visithttp://ImThere.com > > > -- > > Amos King > >http://dirtyInformation.com > >http://github.com/Adkron > > -- > > Looking for something to do? Visithttp://ImThere.com > > -- > Amos Kinghttp://dirtyInformation.comhttp://github.com/Adkron > -- > Looking for something to do? Visithttp://ImThere.com
hey there, I have the same issue here with rails 2.3.2, have you come to some advance with this? thanks in advance, joaquin
Any chance the entire app is open source on github? I''d take a look around. On Wed, Jun 17, 2009 at 7:29 AM, Joaquin Rivera Padron <joahking@gmail.com>wrote:> hey there, > I have the same issue here with rails 2.3.2, have you come to some advance > with this? > > thanks in advance, > joaquin > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---