Problems configuring Protected Content

Hello.

I am having problems configuring membership levels. I thought I was doing well, and making most of the site's content protected for logged-in members only. I gave members specific member level roles, and gave those roles access to those pages.

But if I switch to any other non-admin role, and then try to access one of the protected pages (like Activity, Members, Groups, etc), I get the "The content you are trying to access is only available to members" notice.

So what am I doing wrong???
Any help would be greatly appreciated...

(NOTE: The site -- which I've granted support access to -- is the one with "bosswebsite" at the end. It showed up in the pull-down list on your question form, but it didn't show "Protected Content" as an option to choose -- perhaps since I used Snapshot to bring the site live from a local development state).

  • Vinod Dalvi

    Hi Anton,

    I hope you are well today and thanks for posting on the forum.

    So are you assigning the custom roles "Free Member" and "Premium Member" to the users and want to automatically assign the memberships "Free Membership" and "Premium Membership"to those users respectively?

    Actually it works exactly opposite of this. You can assign the Membership to any role from the following path then this role will be added to all members of that Membership. You can even assign multiple roles to a single Membership.

    Admin Area -> Protected Content -> User Roles

    I have tested this on your site by creating a test user account and found it's working fine as described above.

    Kind Regards,
    Vinod Dalvi

  • Anton

    Hi @Vinod Dalvi

    I must be an idiot, because I still don't get it. Or something's not working correctly.

    Actually, the users with Free Membership DO seem to be working correctly -- they can see the Activity and Members pages, but NOT Groups (which is exactly how I configured the Free Membership). I admit, I hadn't tested the one Free Membership user before, but I did just now and it works -- and so does the new one you created).

    HOWEVER -- the Premium Membership users are NOT working the way I want them to. The Premium Membership people should be able to see Activity, Members AND Groups -- yet they can't seen ANY of them. All three have the protected content notice.

    Can you please check the Premium Member role also and confirm? And then can you tell me what it is I'm doing wrong? Because I'm going through all of the steps, and it seems I'm doing things the way they're supposed to be done, and it's still not working.

    Thanks!

  • Anton

    Some other problems I just discovered....

    I've been adding members manually, so I thought I would log out and try and register for a Free Membership.

    First of all, there are somehow three different register-type links competing for each other:

    There are Membership and Register menu links in the top bar menu when I'm logged out ("Register" appears when you click on the "---" link) -- but both of these are virtually identical. Any reason why these both are showing?

    Then there's also a register BUTTON next to the login button, but if I click that it just takes me to the standard BuddyPress profile form (and doesn't let me choose a Membership first). So how do I prevent this? (The register button appears when I click "Anyone Can Register" in the WP General Settings).

    Finally, and worst of all, when I actually fill out the form and hit the submit button....nothing happens. It seems to return the page again.

    So yeah....not really having luck with this plugin at all. :slight_frown:

  • Anton

    OK - That last point wasn't exactly correct. Registration IS working (for free membership at least). I think the first time I tried was with the registration BUTTON (which doesn't let me choose a membership level first). That button really shouldn't be there, but don't know how to get rid of it other than hiding it with CSS (which seems crazy to have to do).

    BUT -- The new free membership users I created are able to see GROUPS, which should be protected from free users. So....that's not working. UGH.

  • Vinod Dalvi

    Hi Anton,

    Thank you for your replies.

    Can you please check the Premium Member role also and confirm? And then can you tell me what it is I'm doing wrong? Because I'm going through all of the steps, and it seems I'm doing things the way they're supposed to be done, and it's still not working.

    I have just tested on your site by assigning Premium Membership to the test user that i have created and i could access all three Activity, Members AND Groups pages using that account.

    Could you please try using the test user account that i have created by changing the test user password after logging in as an admin?

    BUT -- The new free membership users I created are able to see GROUPS, which should be protected from free users. So....that's not working. UGH.

    It was not working because you had granted the GROUPS page access to both Free and Premium membership users as displayed in the attached screenshot.

    Now i have removed the Free membership access of this page so now it's only accessible for the members having Premium membership so please test it now.

    There are Membership and Register menu links in the top bar menu when I'm logged out ("Register" appears when you click on the "---" link) -- but both of these are virtually identical. Any reason why these both are showing?

    Because it's been added in your navigation menu as shown in the second attached screenshot.

    Then there's also a register BUTTON next to the login button, but if I click that it just takes me to the standard BuddyPress profile form (and doesn't let me choose a Membership first). So how do I prevent this? (The register button appears when I click "Anyone Can Register" in the WP General Settings).

    It's the button generated by your theme which you can hide by adding the following CSS code in the custom.css file of your Boss child theme.

    #masthead a.register {
    display: none;
    }

    You will find more information about usage of our Protected Content plugin on the following page.

    https://premium.wpmudev.org/project/protected-content/#product-usage

    Find information about using BuddyBoss themes on the following pages.

    http://www.buddyboss.com/child-themes/
    http://www.buddyboss.com/tutorials/

    And you will get general information about WordPress like menu management on the following pages.

    https://codex.wordpress.org/WordPress_Menu_User_Guide
    https://codex.wordpress.org/Getting_Started_with_WordPress
    https://codex.wordpress.org/

    Regards,
    Vinod Dalvi

  • Anton

    It was not working because you had granted the GROUPS page access to both Free and Premium membership users as displayed in the attached screenshot.

    Now i have removed the Free membership access of this page so now it's only accessible for the members having Premium membership so please test it now.

    I must have accidentally granted Groups access to Free Membership at the last minute before leaving that page, because when I first looked at it, I swear that only Premium Membership had access to that...

    I know -- I'm sounding crazy, but...read the following:

    I have just tested on your site by assigning Premium Membership to the test user that i have created and i could access all three Activity, Members AND Groups pages using that account.

    Could you please try using the test user account that i have created by changing the test user password after logging in as an admin?

    I did, and you're correct with Test user, but...
    Can YOU now do the same with the user "RojoTheBear"? Please change the password, log in as that user (who is assigned Premium Membership as shown in the attached screenshot) and then see how that user is not able to access any of the three BuddyPress pages from the menu?

    This was the only user I was testing, so that's why I assumed it was the same for all Premium Members. I can't see any difference between this Premium Member user and the other Premium Member user that I had created ("ArchiveLover" -- who IS working properly). They both have the exact same settings but are working differently....

    That discrepancy is why I have cause for concern...

    Because it's been added in your navigation menu as shown in the second attached screenshot.

    I realize both pages are in the menu, which is why they both show, but I meant to state that neither one was actually added by me. I'm assuming Protected Content automatically generates the Membership link? Now I'm wondering if my theme added the Register link (as you say it generated the Button as well, which I'll have to hide with CSS).

    Anyway, thanks for looking into all of this, and I hope you can find out why my two Premium Membership users are behaving differently! Much appreciated.

    Meanwhile, when you have a chance, could you also look back into the other problem I was having with the Chat plugin?
    https://premium.wpmudev.org/forums/topic/chat-window-not-appearing-for-non-admins#post-885085
    You had helped me partially there, but there was still a remaining issue...
    (Sorry to bring up a completely different topic here, but I've been waiting for a reply there for several days...)
    Thanks!!

  • Patrick

    Hi there @Anton

    I hope you don't mind me jumping in here. Sometimes another set of eyes can help spot something amiss. Which is exactly what just happened. :slight_smile:

    It turns out the membership of your RojoTheBear user had expired, so he had no access to protected content (screenshot).

    I had originally simply set his latest invoice to "Paid" status, but that did not reactivate his membership. However, manually removing the membership from Protected Content > Members, then adding it again did reactivate his membership. He now has full access to content, including Groups & group creation.

  • Anton

    Ah, thanks @Patrick.

    I had noticed an e-mail (which was in a separate account, so I hadn't checked until much later) that said the RojoTheBear account had expired. So that explains why that account had no access.

    BUT -- I'm confused as to why the account expired in the first place. It's a test account, and I created it at the same time as another test account with the exact same settings. (A Premium Membership payment is set to happen every 90 days -- and as you can see from your own screenshot the subscription started only a few weeks ago).

    I'm trying to play out what could have happened. I suppose there is the possibility that as I was creating the membership level, I created Rojo first, and the settings were slightly different for a brief moment before I changed it and then created the other Premium Member account (it could only be brief -- because I was very clear in my head of how I wanted the membership level to work). That's the only scenario I can think of that might have happened -- but that would mean any change to a membership level doesn't "take" to members who are already on that subscription. Is that definitely the case?

    Or maybe you have another idea of how the account became expired? Please let me know if you do, as I would not want this kind of thing to happen again when the site ultimately goes live...

    Thanks!!!

  • Ash

    Hello @Anton

    I hope you are well today.

    Or maybe you have another idea of how the account became expired? Please let me know if you do, as I would not want this kind of thing to happen again when the site ultimately goes live...

    Well, to be honest, we didn't get any similar situation before. I assume, when you added that member, then the membership duration was lower than current? Or while you were experimenting, do you think you may manually changed the user status?

    What happens when you create a new user and test with that user? As you are saying it's working fine for other users in same level, so I think during experiment you manually did something? I am sorry if it sounds that I am pushing the ball in your court, but when we play with different settings it is pretty normal to forget something we do. So, trying with a new test user is a good idea :slight_smile:

    Any reason for so many e-mails? At least the two that are completely identical?

    Please do the same for a new user, manually mark his invoice paid and check if you still get two same emails from protected content. One more question, do you use same inbox (activating forwarding) for two emails (admin email and that user email)?

    Cheers
    Ash

  • Anton

    I am sorry if it sounds that I am pushing the ball in your court, but when we play with different settings it is pretty normal to forget something we do.

    Sure, and I totally understand that! As I mentioned in one of the earlier posts above, I realized that I may have accidentally made the Groups page visible to free members, when it was meant to be protected the whole time. That was definitely me forgetting a step I had done and getting confused as a result...

    But in this case, with the expired member...I honestly can't figure out what I could have done. I definitely didn't CHANGE any membership status while experimenting (even if I had, the ONLY other one I created was the free level, which doesn't have an expiration date). As I said previously, I suppose it's possible that the Premium membership briefly started as something else by default, and then I immediately changed it to a minimum of 90 days -- but then that change didn't "take" for the user who became expired. If that IS the case, then it means any changes to a membership don't apply to members currently on that membership level? If so, it would be good to know that for future reference.

    Please do the same for a new user, manually mark his invoice paid and check if you still get two same emails from protected content. One more question, do you use same inbox (activating forwarding) for two emails (admin email and that user email)?

    I manually marked another user paid. Haven't received e-mails (yet), so can't say if I'm getting duplicates again.
    And yes, I'm using the same inbox -- but the three e-mails I got were all to the same member e-mail (and none to my admin e-mail).

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.