Skip to:
Content
Pages
Categories
Search
Top
Bottom

Private Pages Glitch?


  • Engine44
    Participant

    @engine44

    I have the latest versions of WP, BP and bbPress. When I change a BP page (e.g. User Groups) to Private visibility, I get an error message. It says that a BP component is not associated with a page. Under Settings/BP/Pages, the page associated with User Groups has reset itself to None. The option to return it to User Groups does not exist. When I change the page visibility back to Public, everything is fixed. It seems like this is a bug.

Viewing 16 replies - 1 through 16 (of 16 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    This may be considered as bug in current behavior. Currently, BuddyPress only looks for published pages when looking for component associated pages in bp_core_get_directory_pages().

    You may want to report it on the BuddyPress trac and the core developers and weigh their opinions on this.


    Engine44
    Participant

    @engine44

    Thanks. It is important that the BP pages of my site be private. I guess I’ll have to wait for a fix.


    burger0815
    Participant

    @burger0815

    Hello Brajesh Singh and Engine44

    I am a newcomer to buddypress and I think I had similar problems as Engine44.
    Frankly I could imagine that there are more people who have this
    problem but eventually don’t even realize it as a problem.
    In particular I can’t imagine that all that bp networks which
    are used by schools want to have kids discuss in public. So it might
    be a severe problem. But as said I am a newcomer so I might easily be
    wrong.

    The following concerns mostly the member and activity pages (I hope they are called
    this way, this is a direct translation from german), which are either set
    public -or if set private can’t be found anymore (which seems to kill more or less all major bp functions, like you can’t see profile etc.) I haven’t looked into groups yet.

    I asked a person for help who is pretty proficient in solving general programming
    problems but who is not a programmer and in particular not a PHP programmer. So eat with
    utmost caution.

    He came up with the following hack:
    The activity and member pages need to be public in order to assign them
    on the bp page. (I think this is the default upon installation)
    Then set the pages to private.

    go to buddypress/bp-core/bp-core-functions.php
    and then in function bp_core_get_directory_pages() {…

    change

    $page_names = $wpdb->get_results( „SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) AND post_statues = ‘publish’ ” );

    into

    // temporary hack
    if ( is_user_logged_in() ) {
    $page_names = $wpdb->get_results( “SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) ” );
    } else {
    $page_names = $wpdb->get_results( “SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) AND post_statues = ‘publish’ ” );
    }
    // was:
    // $page_names = $wpdb->get_results( “SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) AND post_statues = ‘publish’ ” );
    // /temporary hack


    fscbmwcca
    Participant

    @fscbmwcca

    I installed BP Simple Private it seems to let you mark pages as private and if not logged in it redirects the page. I am only testing now and seems to be working. What I ultimately want to do is exclude “Subscribers” from BuddyPress and bbPress. Haven’t found how to do that yet.


    burger0815
    Participant

    @burger0815

    @fscbmwcca

    thanks for the comment. If I understand correctly then the option:
    allows an admin to select which Post types and BuddyPress Components are private
    seems to indicate that things like the activity component or the member community component
    could be set private.
    Did you test the plugin?

    The sentence:
    provides a Private checkbox in the upper right corner of every page, post, and custom post type selected in Settings

    is a bit irritating, finally that feature exists already in a standard BP wordpress version.
    That is at least in my BP wordpress version you can already mark
    pages as private (i.e. non accessible to non-logged-in members),
    i.e. there is already a checkbox. And if there wouldn’t be the bug then
    setting the member page and activity to private would have set “the component” to
    private, if I understood correctly.
    Is the plugin checkbox another checkbox?

    There is a plugin which, by its description, seems to set everything private:
    https://wordpress.org/plugins/buddypress-members-only/
    and which lets you specify which subadresses should be open.
    But in my case this is not so helpful because
    I want the blog to be public and the blog is not behind a /blog/ adress
    but behind the year /2015/… etc.
    so I would need to set each year adress open, which seems OK but not really
    straightforward.


    shanebp
    Moderator

    @shanebp

    …is a bit irritating, finally that feature exists already in a standard BP wordpress version.

    If you’re referring to the Visibility checkbox feature – Private means only viewable by admins and editors.
    https://en.support.wordpress.com/post-visibility/


    fscbmwcca
    Participant

    @fscbmwcca

    With the WordPress 4.4/BuddyPress 2.4.3/bbPress 2.5.8, if you set any of the BuddyPress pages set to private you get the following error “The following active BuddyPress Components do not have associated WordPress Pages: Activity Streams. Repair”

    I tried the https://wordpress.org/plugins/buddypress-members-only/ and that didn’t seem to do what I wanted. I want people to be able to register as Subscribers but Subscribers should not see any of the BuddyPress/bbPress stuff, only the Contributors and above should be part of the BuddyPress/bbPress community. So I need to be able to exclude Subscribers from BuddyPress/bbPress. I have looked and there is some code out there that seems pretty old so I don’t know if it would work and I am not so great with php so I am a little hesitant. I am also new to BuddyPress so I’m not sure of all the ins and outs.

    I tested the plugin and it’s working, in the settings there are two areas [edited – please do not copy & paste such data ]
    I hope I am being clear.


    fscbmwcca
    Participant

    @fscbmwcca

    ooops, forgot to mention, I am not referring to the Visibility


    shanebp
    Moderator

    @shanebp

    With the WordPress 4.4/BuddyPress 2.4.3/bbPress 2.5.8, if you set any of the BuddyPress pages set to private you get the following error “The following active BuddyPress Components do not have associated WordPress Pages: Activity Streams. Repair”

    True – If you set Visibility to Private!
    Not true if you set the ‘Public or Private’ checkbox provided by the BP Simple Private.

    I want people to be able to register as Subscribers but Subscribers should not see any of the BuddyPress/bbPress stuff, only the Contributors and above should be part of the BuddyPress/bbPress community.

    So you want to limit access to BP content based on a user’s role.
    That is a different issue from the original poster’s issue.
    You should create a new topic.
    The BP Simple Private plugin discussed above is not applicable to your issue.


    burger0815
    Participant

    @burger0815

    @shanebp

    If you’re referring to the Visibility checkbox feature – Private means only viewable by admins and editors.

    OOOOK. thanks for the hint….I admit I haven’t yet looked into the manual, as said I am a newcomer -that is I first tried to make sense of what I saw.

    In my application sofar all members are editors (and currently planned to be editors), so the private check in the visibility box on pages makes those pages private for “members”. And since if I understood correctly the BP member functions (activity component etc.) are “instanced” by filling the member page it seems it would in principle be enough to set this page to private….if the BP code would have found the page, which it didnt therefore the above hack.
    But for the future eventually we might want to include non-editing members as well so thanks this is certainly important to know.


    @fscbmwcca

    I haven’t tried the plugin, as said it seems as if it doesn’t go together that straightforward with the blog. By your description it sounds almost as if it’s not secluding the whole subadress, (like …/member/wildcart) but only specific adresses then this would
    not go together with the blog at all. What are subscribers?
    Can you set all your members to be editors? Then maybe the above solution I sofar use might help.


    burger0815
    Participant

    @burger0815

    correction:
    if it’s not secluding the whole subadress,
    I wanted to write
    if it’s not secluding/opening the whole subadress


    burger0815
    Participant

    @burger0815


    I want people to be able to register as Subscribers but Subscribers should not see any of the BuddyPress/bbPress stuff, only the Contributors and above should be part of the BuddyPress/bbPress community.

    So you want to limit access to BP content based on a user’s role.
    That is a different issue from the original poster’s issue.

    I am not sure I understand what you are talking about. What are subscribers?
    I mean if I subscribe to get email notification that shouldn’t make the corresponding postings open to non-members even if they subscribed to the corresponding postings. so what do you mean by subscribers?


    fscbmwcca
    Participant

    @fscbmwcca

    I know the plugin doesn’t address my issue but keeps BuddyPress for members only and hide it from non-logged in users. Privacy is very important to our members. I will upload the members that are truly members from a csv file from a list that is provided for me and give the Contributor Role. What I meant by subscriber is the “Subscriber” Role (vs Contributor, Author, Editor, Administrator).
    I’m sorry I haven’t expressed myself well and now off topic. I was just trying to provide a solution for making pages private.


    burger0815
    Participant

    @burger0815

    @fscbmwcca

    I’m sorry I haven’t expressed myself well and now off topic.

    no. Your comments were definitely helpful and in no way off topic. Thanks again.
    I understand now what you mean by subscriber – it’s called “abonnent” in german.
    I actually tested wether abonnent may still be able to see the activities with the above hack (and not only admin or editor) and the activities are still viewable for all who are logged in, so if subscriber isn’t blocked by Shane’s plugin then may be the above hack would work for you (at least for a while until the next update).
    But it is somewhat weird that this works since I just checked back – as Shane said: private pages are really only visible for admins and editors….at least after the last automatic update.(….somehow I had the impression that private had also worked for authors before the update….but thats another thing). Its weird.


    burger0815
    Participant

    @burger0815

    I wrote:

    ….somehow I had the impression that private had also worked for authors before the update….but thats another thing”

    and

    In my application sofar all members are editors (and currently planned to be editors),

    The last sentence is wrong, I actually intended sofar all members to be authors (Autor in german) not editors (Redakteur in german).

    I wrote the first sentence because before Shane’s comment I am pretty sure that I had tested wether the private pages are visible for authors and not only for editors or admins and thus I am pretty sure that they were so before. It is just that after Shane’s comment I wanted to check back. Unfortunately before I could check back there was an
    automatic wordpress update, which now unfortunately screwed up the intended application.


    burger0815
    Participant

    @burger0815

    @fscbmwcca

    now I make an offtopic comment: If you know (or anybody reading this) know how to switch off automatic WP updates I would be gratelful to learn about this.

Viewing 16 replies - 1 through 16 (of 16 total)
  • The topic ‘Private Pages Glitch?’ is closed to new replies.
Skip to toolbar