Skip Navigation

[Resolved] BuddyPress and Access Control

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 8.76 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2629027
Screenshot 2023-08-01 5.18.04 AM.png

Tell us what you are trying to do?
I am using BuddyPress, which designates certain pages for Activity, Members, Groups, etc. I have added those pages to a Post Group that should remove read access for Guests and redirect them to a Welcome page. This is removing the corresponding links to those BP pages in the navigation, but if you browse directly to the page URLs, they remain visible to guests. See for example:
hidden link
hidden link
hidden link

I want to configure BuddyPress pages so that they are only accessible to logged in users.

Is there any documentation that you are following?
https://toolset.com/course-lesson/restricting-access-to-pages/

Is there a similar example that we can see?
The site homepage is in the same Post Group. It redirects to the Welcome pages as expected if user is not logged in. See:
hidden link OR hidden link

What is the link to your site?
hidden link

#2629481

Hi,

Thank you for contacting us and I'd be happy to assist.

I tried to view the 3 pages that you've shared and they all redirect to the '/signup/' page.

Have you made any changes after writing to us?

regards,
Waqar

#2629563

Hi Waqar: Sorry bout that. After I submitted this issue, I kept working on the problem. I found a free third-party plugin (hidden link) that enabled me to configure a workaround. The workaround was active when you tested those links. I've disabled it so that you can observe the described behavior -- this is, if I'm just relying on Toolset to restrict access.

If there's a compatibility issue between Toolset and BuddyPress, I'd be happy to use the workaround and consider this issue resolved. What are your thoughts?

#2629973

Thank you for sharing this update.

Looking into the code of these pages (precisely the body tag classes), they all have the ID '0'. This suggests that these are not regular WordPress pages or even archives.

BuddyPress seems to be using special templates to control what is displayed on these links/endpoints, which explains why Toolset Access restrictions are not applying to them.

The third-party plugin approach that you've used is a good option, especially considering the fact that you need to redirect visitors to a different page.

Toolset Access restrictions can either make the page/post inaccessible by showing a '404 - not found' message or by showing a different content template. But they don't support the redirection.

#2630057

Thank you for confirming. That was my sense as well. I'll mark this item as resolved.