• Resolved bryanhiggs

    (@bryanhiggs)


    I have a page that was using content restrictions such that only Administrator, Author, Contributor, Editor, and Subscriber access was allowed. We have now decided that we want to make this page readable by everyone, and not restrict it. So, I unchecked the items in the Content Permissions / Limit access to the content to users of the selected roles, so that none of them is checked for that page, and updated the page in the page editor. Unfortunately, the page still refuses to come up for a logged out user, producing the message that the Members plugin specifies (“Sorry, but you must be logged in to see this page. … “).
    I have other pages that are restricted, and other pages that are unrestricted, and they all behave properly; only this page isn’t behaving right.
    I am not using a caching plugin.
    I have been wracking my brain trying to figure this out. I suspect it’s something “obvious” that is simple, but that I haven’t thought of.

    I’d appreciate it a lot if someone could give me some idea where else to look for a solution to this problem. Thank you in advance!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter bryanhiggs

    (@bryanhiggs)

    Investigating further, I tried duplicating the page using the Duplicate Page plugin. No change.
    Then I tried changing the parent page, and finally found that this was the reason for the restriction. Here’s the details:

    I was displaying the page in a menu hierarchy, and displaying breadcrumbs to correspond with the hierarchy. Some of the header items in the menu are just custom links (with a # link) so that they can’t be clicked on to go somewhere. (I find this to be a very kludgy approach on the part of WordPress). Since, the breadcrumb displays the intermediate items in the hierarchy as links, I wanted to avoid user confusion when they clicked on the interior link in the breadcrumb and find themselves in a can’t find page situation, so I had created a page of that name that would be a ‘safe place’ for them to go to.

    Anyway, when I changed the parent/child hierarchy of the page that wasn’t behaving to have a parent page that was unrestricted, things started to work again.

    I don’t understand why this might be, but at least it’s solved my problem — with the disadvantage that the breadcrumb for this page doesn’t match its menu location. I suspect most of our users won’t notice, but it’s still annoying.

    If anyone can explain this behavior, I’d be interested in learning the whys and wherefores.

    Thanks for listening…

    Thread Starter bryanhiggs

    (@bryanhiggs)

    Note that because of the changes I made, described in the above reply, the “page I need help with” in the original post is now https://uucm.org/member-section-home/church-policies/

    Currently, child pages inherit from their parent page by default. I added a ticket on the issue tracker to expose a setting for this in 3.0: https://github.com/justintadlock/members/issues/217

    Until then, you can drop this one line of code in your theme’s functions.php to override how this works:

    
    add_filter( 'members_check_parent_post_permission', '__return_false' );
    
    Thread Starter bryanhiggs

    (@bryanhiggs)

    Thank you, Justin. Very helpful!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page inaccessible to logged out users after removing restrictions’ is closed to new replies.