Hi Eduardo,
currently the monitor of my laptop is damaged and I only have my Windows/Photoshop Laptop running. But I cannot code with this “os imitate”. 😀 That’s why I couldn’t answer your mail yet. I hope tomorrow I will get my new one.
To get the scenario right, you installed the plugin and on a multisite installation? And the forbidden pages just show a white page? No redirection to the login? That’s strange. Can you tell me, where the parser exits the script?
If a user is unauthorized, he will always be redirected to the login or to the page you told the plugin to redirect to, so I’m a little bit confused. Does the error log tells you anything? Maybe it’s another error, that isn’t shown on the page.
Some answers:
1) you installed the plugin and on a multisite installation?
Yes. It is a fresh networked wp install. It also has Buddypress plugin.
2) And the forbidden pages just show a white page? No redirection to the login?
Yes and Yes. I made a new test: On the advanced options I defined a URL to redirection (e.g.: http://www.ibm.com) and it worked ok.
Cleared the Field and all I get is a blank page.
I also tried defining URL redirection to the login (wp-login.php). It shows me the profile page (which is exactly what wp shows me if I am logged in and try to access the login page).
I also tried defining URL redirection to “/”. And this shows me the main site initial page (which is really what makes sense to me).
After all, if you are logged in but do not have access rights to a given site, I think the user would best be redirected to the main site’s initial page. If that page is forbidden, then this site should present the login.
(but of course that’s just an opinion)
3) Can you tell me, where the parser exits the script?
I can’t. I do not know. I have basic programming skills but not enough to debug the program.
4) Does the error log tells you anything? Maybe it’s another error, that isn’t shown on the page
Well, attached is the debug file generated with debug mode on.
On chrome I have nothing when I show page’s source code.
On IE it tells me:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD> <BODY></BODY></HTML>
Many many thanks in advance
The debug log only tells about a notice (not realy relevant for anything). The problem seems to have nothing to do with the plugin but with the function auth_redirect in wordpress. I think, it’s a problem with auth_redirect itself because of the buddypress plugin.
Please do the following. Open lib/xfw_private.class.php and find in line 356
auth_redirect();
Remove this line and replace it with this:
if(function_exists('auth_redirect'))
auth_redirect();
else
{
wp_redirect(get_option(‘siteurl’) . ‘/wp-login.php’);
exit;
}
I would send you the file, but I currently backup my data from the old laptop. Thank you!
// Edit: Please be careful with the quotes, because the forum replaces all single quotes.
// Edit2: You got mail! 🙂
Ok, we solved the problem by mail. For some reasons his installation sends the headers before the redirection could apply and the wp_redirect and auth_redirect does not work correctly. This will be solved in 170 and another option was added for a simple error message.