DV-JF Posted March 23, 2023 Share Posted March 23, 2023 Hey, following problem: I'm trying to redirect all guest users which have no access to a specific page where they can login. My template access settings: This works fine until I switch the language. All users are redirected to the login-page but in default language. Is this supposed to be that way, how can I fix this so that the user will be redirected to the corresponding login-page in correct language e.g. example.com/fr/login/?id=1030 example.com/en/login/?id=1030 example.com/es/login/?id=1030 Any hints or ideas? Link to comment Share on other sites More sharing options...
Zeka Posted March 26, 2023 Share Posted March 26, 2023 Hi @DV-JF Probably you can use 1 option and then make a hook to 'ProcessPageView::pageNotFound' and within the hook, definition make a redirect to the login page like $this->wire()->pages('/login/')->url([ 'language' => $this->wire()->user->language, ]) 1 Link to comment Share on other sites More sharing options...
DV-JF Posted March 31, 2023 Author Share Posted March 31, 2023 Yes this would be an option, thanks for the hint @Zeka. I think this should be a feature that Processwire provides natively, therefore I've created a feature request here: https://github.com/processwire/processwire-requests/issues/486 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now