I got some script to redirect a page to another depending on what user group is logged in to the site. Unfortunately, when the editor try to edit this page in the CMS, he is redirected the whole thing to another page.
I wonder if there is a way to disable the preview panel totally? Personally, i think the preview panel is just a distraction. and it doesn't work well for complex websites.
So are you checking the group before the redirect? And are the groups with access to the CMS preview different groups?
What you do in this case is over in your code where you do the redirect, you give it a bypass if an Admin (or whatever group you choose) user is already logged in so it doesn't happen in preview mode.
The one trouble I have found with this is that this also applies if an admin is logged in to the CMS and ventures over to the frontend. This code will bypass the redirect and behaviour might not be as expected depending on how your app works. Shouldn't be a problem if the Frontend logins use Silverstripe's member class too.