Non member not getting restricted area page

I am having a problem setting up the Membership Plugin.

I have the plugin set up on a test site: http://virtualstaffschool.com/

Non members are not being redirected to the "No Access" page that I have created and set on the Options page.

Instead they get a message "Not Found Apologies, but the page you requested could not be found. Perhaps searching will help."

I have one page and one post category that I would like to restrict to visitors who are not members.

Category: Member Videos
Page: Member Videos Page

I have two levels set:

New Visitor

Set to Stranger level on the options page.

Level Settings:

Negative Rules= Categories- Member Videos; Pages- Member Videos Page

Member

Positive Rules= Categories- Member Videos; Pages- Member Video Page

I have set it up with a number of different configurations as far as negative and positive rules with the same results.

One more question: What is the best way to create a Member Sign in page? For members who come to the site and want to login to access the member info?

  • WBSolutions
    • New Recruit

    Adding the No Access Page to the positive rules didn't change anything. Besides that since the Member Videos page was added to the Negative area, I had to remove the negative to add the new positive. But like I said it still didn't work.

    I have attached screenshots of the Options page settings, the Member Level settings and the New Visitor settings.

    The site I'm testing this on is: http://www.virtualstaffschool.com

  • Barry
    • DEV MAN’s Mascot

    I think that because you are negative ruling the category it's correctly stopping posts from that category from showing in the results - so getting a 404 not found is actually a correct response from WP as as far as it is concerned there are no posts with that category / in fact the category doesn't exist.

  • Barry
    • DEV MAN’s Mascot

    It's tricky - for the negative category rule you're effectively telling WP not to list those posts on that category, so when it doesn't find any posts you'll get a 404 as none are found. We used to have 404's for posts / post lists returning the No access page, but had a lot of forum posts about that not working correctly so switched back to letting WP handle the 404.

    The only way, I can see, to handle it is to run multiple queries for every page to see if a post would be returned if the restrictions weren't in place - but that pushes page building time up. Another way could be to allow customisation of the 404 so that it could say "We couldn't find anything, but that could mean you are not a member and therefore couldn't access it - click here to signup".

    If I don't give it a negative the content shows.

    It will.

  • saraswati1111
    • Design Lord, Child of Thor

    I'm having a similar problem. If I make a page restricted from either unchecking positive rules or checking positive rules the page isn't showing up in the menu. This makes no sense, how can I re-direct them to the page that is set for them to land on if they have no access to the page?

  • WBSolutions
    • New Recruit

    It seems that your telling me, Barry, that if I give a negative value in the to a page, for a level that is set to the stranger value, the page will not show up and the "non member" page will not show up because WP doesn't recognize it.

    If I don't give it a page, category, etc... a negative value everyone who visits my site can see it.

    Am I understanding this correctly?

    From the way I read the description this plugin is suppose to notify a viewer when a page is called up that is restricted. Without it, it could seem like there are dead links all over the site.

    I have spent a lot of time trying to configure this correctly. Please help.

    DUG

  • WBSolutions
    • New Recruit

    Barry, I understand what your saying about rewriting a 404 error that could cover it, but there are three main things I don't like about that.

    One -- it's not always going to be the case that a person is going to reach a 404 error because they're not a member. They could be just a page that doesn't exist.

    Two -- It's kind of sloppy.

    Three -- That's not how the description of the plugin is written.

  • Barry
    • DEV MAN’s Mascot

    If I make a page restricted from either unchecking positive rules or checking positive rules the page isn't showing up in the menu. This makes no sense, how can I re-direct them to the page that is set for them to land on if they have no access to the page?

    That's how it's supposed to work - they don't have access to the pages, so why show them the links?
    If you want the links to show there - then you need to use the Nav menus functionality in WP.

  • Barry
    • DEV MAN’s Mascot

    One -- it's not always going to be the case that a person is going to reach a 404 error because they're not a member. They could be just a page that doesn't exist.
    Two -- It's kind of sloppy.
    Three -- That's not how the description of the plugin is written.

    One - yep that's right, but according to the level the user is a member of (or the stranger level) that page/post doesn't exist - they have no access to it, so it doesn't exist.
    Two - it's how WP works - we can change it but it will add a lot of extra queries to every page load to see if it is a proper 404 or not. An easier solution would be to set your 404 page to also be a no access page and display the same message.
    Three - I've gone around and around on this in previous versions - if i set the no access page to take priority and override 404's I get tons of forum posts saying that's not how it should work, and if i set it the other way (which it is now) I get tons of forum posts saying that's not how it should work.
    Not sure what I can do?

  • Barry
    • DEV MAN’s Mascot

    One -- it's not always going to be the case that a person is going to reach a 404 error because they're not a member. They could be just a page that doesn't exist.
    Two -- It's kind of sloppy.
    Three -- That's not how the description of the plugin is written.

    One - yep that's right, but according to the level the user is a member of (or the stranger level) that page/post doesn't exist - they have no access to it, so it doesn't exist.
    Two - it's how WP works - we can change it but it will add a lot of extra queries to every page load to see if it is a proper 404 or not. An easier solution would be to set your 404 page to also be a no access page and display the same message.
    Three - I've gone around and around on this in previous versions - if i set the no access page to take priority and override 404's I get tons of forum posts saying that's not how it should work, and if i set it the other way (which it is now) I get tons of forum posts saying that's not how it should work.
    Not sure what I can do?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.