For the last few days I have had constant redirect errors on my clients site – the whole site is down because of this.
All I get is an error ‘The page isn’t redirecting properly’ etc etc. However the site can be accessed if I am logged in. It is only when I log out that it has the issues. I have had to trawl through the code to see if I could detect where the problem lies – there are a few threads that exist:
see here
But I was unable to get things working using the methods explained. The issue appears to be a conditional statement in UserAccessManager.class.php – although this may just be in my case. I have commented out this part
if (!$postToShow) {
$uamOptions = $this->getAdminOptions();
if ($uamOptions['redirect'] == 'blog') {
$url = home_url('/');
} elseif ($uamOptions['redirect'] == 'custom_page') {
$post = get_post($uamOptions['redirect_custom_page']);
$url = $post->guid;
} elseif ($uamOptions['redirect'] == 'custom_url') {
$url = $uamOptions['redirect_custom_url'];
}
// if ($url != $this->getCurrentUrl()) {
wp_redirect($url);
// exit;
// }
}
}
The if ($url != $this->getCurrentUrl()) seemed to throw the whole thing into confusion. Once I commented this out I was able to access the site again without being logged in but the home page redirect no longer works and I get a 404 error ‘page doesn’t exist’.
This is driving me crazy and my client is none too pleased. Does anyone have any clues as to what can be done. Perhaps I should email the developer directly?