| Post |
|
|
Chris - Guest
02:34PM BST - 10/07/2007
|
| |
|
I love this plugin, it is exactly what I needed. However when you are a guest, and you click a link to a page that si restricted I get this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/wp-content/themes/k2/page.php:5) in /home/user/public_html/wp-includes/pluggable.php on line 331
What could be causing that? I am using WP 2.2.1 with K2 theme
|
|
|
|
ByTor
- Admin
03:57PM BST - 10/07/2007
posts 46 |
| |
|
Hmm, there were reports with the old versions of the plugin of this happening.
The only thing I can suggest, as an experiment, is to change a line at the end of the page-restrictions.php file:
Change this line:
add_action('get_header', 'check_the_user');
to this:
add_action('template_redirect', 'check_the_user');
That said, I just did a test on 2.2.1 and K2 0.9.6 and it worked perfectly both ways. Give it a shot and see what happens. It may be a clash elsewhere with the theme or another plugin.
|
|
|
|
StrangeAttractor - Guest
01:21AM BST - 12/07/2007
|
| |
|
I'm getting the same exact error. I'm using a heavily hacked/modified version of Kubrick, 2.1.x.
|
|
|
|
StrangeAttractor - Guest
03:28AM BST - 12/07/2007
|
| |
|
StrangeAttractor said:
I’m getting the same exact error. I’m using a heavily hacked/modified version of Kubrick, 2.1.x.
My apologies... I didn't realize that Graeme had responded because of the top-down order of the posts.
The redirect fix you post works... it redirects to the login page. Is there a way to redirect it to a custom page? I'd like to have a page giving anonymous visitors some notice as to why they can't access the restricted page.
Much thanks for a very useful plugin.
|
|
|
|
ByTor
- Admin
03:53AM BST - 12/07/2007
posts 46 |
| |
|
StrangeAttractor said:
My apologies… I didn’t realize that Graeme had responded because of the top-down order of the posts.
The redirect fix you post works… it redirects to the login page. Is there a way to redirect it to a custom page? I’d like to have a page giving anonymous visitors some notice as to why they can’t access the restricted page.
Much thanks for a very useful plugin.
I've changed the order of the forums - hadn't realised what a pain it would be til someone else contributed.
Great, I've built the fix into the ZIP file - only affected the restrictions file, so its at 1.5a.
If you use it with the other plugin (Page Access), you can define a page to show logged in users, but not guests 'cos they get the login page.
Do you mean that, instead of the login page, it would go straight to the "restricted content" page - i.e. "sorry, you're not allowed to see that", without the user being logged in? Hmm, interesting question...
|
|
|
|
Wen - Guest
12:38AM BST - 04/10/2007
|
| |
|
Hi Graeme,
Will you help me out with this one. I downloaded your files and activated. Everything shows up. However I run into a problem: here is a breakdown of what I did:
1. select page for restriction
2. logout
3. try to access the restricted page
4. redirects to the "wordpress logon screen." (so far so good)
5. inputed in correct user/password --instead of going to that restricted page--and I am redirected to the homepage.
|
|
|
|
ByTor
- Admin
05:49AM BST - 04/10/2007
posts 46 |
| |
|
Hey Wen,
I've just tested it on this site - WP 2.3 - and it worked perfectly. The only thing I can think of is a clash with another plugin, something that plays with the permalinks.
What plugins do you have installed? Anything like the Permalink Validator or something similar?
|
|