Forums

Everything written in this area is purely the opinion of the author of each post. The "References" section contains purely the opinions and experiences of the author of each post.

The site owner cannot be held responsible for any offence taken from what is written in any post, but any forum content considered abusive, containing foul language or illegal will be removed or edited in whatever way the site owner sees fit.

Current User: Guest login ForumsLogin register ForumsRegister
Please consider registering

search ForumsSearch 
Search Forums:


searchicon Forums 




Post
 Forums

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

 Forums

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.

 Forums

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.

 Forums

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.

 Forums

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...

 Forums

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. :(  

 Forums

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? 

addtopic ForumsAdd a New Topic addpost ForumsReply to Post


Reply to Topic: Error

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 5 + 11        (Required)

Topic Reply:


 

About the ByTor’s Brain forum

Currently Online:

1 Guest

Maximum Online: 14

Forums:

Groups: 6

Forums: 25

Topics: 28

Posts: 56

Members:

There are 6 members

There are 10 guests


ByTor has made 46 posts

Top Posters:

smithy1976 - 0

pyretta - 0

gooddeed - 0

FlikeNoir - 0

bethalina - 0

Administrator: ByTor | Moderators: ByTor


© Simple:Press Forum - Version 3.1.4 (Build 357)  information Forums

Related posts

Comments are closed.

Creative Commons Attribution-NonCommercial-NoDerivs 2.5 UK: Scotland
Creative Commons Attribution-NonCommercial-NoDerivs 2.5 UK: Scotland