[yast-devel] Re: [yast-commit] <web-client> basesystem : when module failed in control panel, the result was endless redirect loop
On 08/26/2009 06:58 PM, Martin Kudlvasr wrote:
ref: refs/heads/basesystem commit ea5740fcf91f51284a51cb1bf9345823ddd57cee Author: Martin Kudlvasr <mkudlvasr@suse.cz> Date: Wed Aug 26 18:58:19 2009 +0200
when module failed in control panel, the result was endless redirect loop added another view to separate controlpanel from basesystem. now user actually see the error --- .../app/controllers/controlpanel_controller.rb | 25 +++++++++++++------ webclient/app/views/controlpanel/basesystem.rhtml | 4 +++ 2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/webclient/app/controllers/controlpanel_controller.rb b/webclient/app/controllers/controlpanel_controller.rb index b9ba795..09d7494 100644 --- a/webclient/app/controllers/controlpanel_controller.rb +++ b/webclient/app/controllers/controlpanel_controller.rb @@ -38,8 +38,6 @@ class ControlpanelController < ApplicationController
# Constant that signalizes, that all steps from base system setup are done - # This constant and constant in rest-service -> basesystem.rb are not connected - # and do not have to be the same value FINAL_STEP = "FINISH" # nextstep and backstep expect, that wizard session variables are set def ensure_wizard @@ -62,8 +60,9 @@ class ControlpanelController < ApplicationController # basesystem.save will set always current to FINAL_STEP basesystem.save session[:wizard_current] = FINAL_STEP + redirect_to "/controlpanel" end - redirect_to "/controlpanel" + redirect_to get_redirect_hash(session[:wizard_current]) end
Hi, you cannot do what this change (I already fix it, so this is just note). You redirect_to /controlpanel if basesystem steps is done and then you again redirect to last wizard step, which broke system. You can look at my commit for correct behavior ( only one redirect per action!) -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (1)
-
Josef Reidinger