views:

555

answers:

1

I have simple front controller plugin which contains this code: http://pastebin.com/m155c59b0

When session expire if user is on /admin/controller_name it will be redirected to auth module but if user is on /admin/controller_name/action_name it wouldn't be redirected, he will get error from error controller with message that action doesn't exist. Anybody know what's the problem and how to fix it!?

+1  A: 

You have to change the action name as well (using ->setActionName()). Otherwise the original request's action remains unchanged and the request ends up being redirected to /auth/index/original_action_name, which presumably doesn't exist and causes the error.

mercator
Tnx, a lot this is logical solution but I wasn't able to figure this out without your help
Splendid