• Good day,

    as asked by Jorge from support team, I will now create a topic regarding this issue over here instead of using mail.

    Short issue description: I’ve got one parent category and 3 sub-categories. The posts within the sub-categories being shown even if I call parent category, and this is totally ok, this is not the issue. But I want to block access for not logged-in users to these 4 categories so that they can’t see the posts until they sign up to my homepage. I’m trying to solve it over DEFAULT membership but still got issues.

    I’m sorry for the essay you will find below, but it’s thought for a better transparancy. Below please find entire correspondece so far, right after I will give you a current update / statement according to the last answer (suggesting you to start reading from the end of blockquote):

    Hey there Denys, thank you for your reply.

    I was wondering how the roles are created? Did you manually added the new roles or it was through a plugins?
    What I can think is that those roles don’t have the same capabilities as subscriber for example, could you please add a user manually and assign the subscriber role and try again.

    I understand that your site is not available yet but we are going to need you to create a support thread so one of our support staff can take a look.

    Hope that helps, let us know if you have any further questions.

    Have a great day!

    Kind Regards.
    Jorge

    Jorge,
    Pre-sales, Accounts & Billing
    contact@wpmudev.org | Latest WordPress News – wpmudev.org
    wpmudev.com | Facebook | Twitter
    ___________________________________________________________

    Hello Jorge,

    this is what I was looking for before, thanks for hint. Just couldn’t remember where to find it. However it still doesn’t seem to work…

    As you’ve mentioned, I’ve checked for “Member Capabilities” addon. It was installed, however the “capability” option was set to “ON”, so I did turn it off in order to be able to assign existing roles to memberships. Afterwards I’ve clicked at “User Roles” tab located under “Protection Rules” and made following assignments:

    http://i.imgur.com/Ii8bhXu.jpg

    As you see, the wordpress role “Gamer” is now assigned to my DEFAULT membership, as I wanted before. Now I’ve defined access to my categories as already mentioned in my past email (also see screenshot below):

    http://i.imgur.com/8vH7OKW.jpg

    Afterwards I’ve manually added a new user over wordpress backend. Because my website is still closed for public I was forced to do it over dashboard. And still as far as I understand, even if I add a user manually now with the user role “Gamer”, then “Membership 2” plugin should automatically assign “Free Membership” to this user.

    http://i.imgur.com/e5kX4TH.jpg

    After I’ve checked the category with my test user it was empty again, so not even one post came up… As a proof I’ve checked this test user under “Membership 2” –> “All users”, then selected my test user from the field at the top right and this is what I see:

    http://i.imgur.com/loEfv9W.jpg

    I can’t even assign Default membership to a member manually and it says that my test user doesn’t have any active subscriptions… Any further ideas?…

    Thank you very much for sticking at this issue.

    Regards

    Dennis
    _______________________________________________________

    Hey there Denys, thank you for your reply.

    And thank you for your detailed email 🙂 I think that in this case you need to enable the Member Capabilities add-on in order to assign a membership level to the mentioned role, I believe that this is the problem.

    If that doesn’t work then we need to look into further details so if possible, create a thread in our forum so one of our support staff can take a look.

    Hope that helps, let us know if you have any further questions.

    Have a great day!

    Kind Regards.
    Jorge

    Jorge,
    Pre-sales, Accounts & Billing
    contact@wpmudev.org | Latest WordPress News – wpmudev.org
    wpmudev.com | Facebook | Twitter
    ______________________________________________________

    Hello Jorge,

    I get your point and how the code you’ve suggested should work. But this is not exactly the problem. Parent category shows up entire posts from sub categories, this is not the problem. Let me try to explain it to you with screenshots.

    These are entire memberships I’ve created for my website with Membership 2 plugin:

    http://i.imgur.com/8ZrTBXd.jpg

    The user I’m testing has got a default role “Gamer” (overridden by template configuration, this is why it’s not the wordpress default “Subscriber”):

    http://i.imgur.com/oadQnq3.jpg

    This user HASN’T GOT any subscriptions active (so if you take a look at FIRST screenshot it should be logically the “Free Membership (DEFAULT)). This as preamble.

    Now what I wanted to achieve is: 1. to block access to a menu called “CS:GO Tutorials” for NOT LOGGED IN users; 2. to block access to category called “CS:GO Tutorials” and it’s entire sub-categories for NOT LOGGED IN users. My approach looks as following: as first I went to “Membership2” –> “Protection rules” –> “Menu items” and defined access as following:

    http://i.imgur.com/c94BVmF.jpg

    So far no problem, the user I’m testing it with sees the menu item “CS:GO Tutorials” as he should because he has got the DEFAULT membership. Afterwards I went to Membership2″ –> “Protection rules” –> “Categories” and defined access as following:

    http://i.imgur.com/xZdbuDA.jpg

    On this screenshot please only pay attention to following categories: “CS:GO Common Mistakes”, “CS:GO General Tutorial”, “CS:GO Smokes & Co.” and “CS:GO Tutorials”. The last mentioned category is a parent one, 3 others are sub-categories. In general the logic is following: grant access to those categories to all memberships including default one, so that a not-logged in user can’t access it. Now I’ve tried to check it with my test user:

    http://i.imgur.com/XebFukj.jpg
    http://i.imgur.com/FhH8zST.jpg

    As you can see there’re NO POSTS inside… If I check it with my admin account it looks as following and as it actually should:

    http://i.imgur.com/ZRsC6Lq.jpg

    Now I’ve disabled the access definitions I’ve set for categories:

    http://i.imgur.com/n0LMc5s.jpg

    … and checked it with my test user, which has got a default membership and look what happens:

    http://i.imgur.com/SOHedkF.jpg

    Here we go: All posts are back!

    I hope I could explain it clear enough now. The only thing I want to achieve is to be able to block category access from not logged in users. What I’m not sure about is if the user I was testing it with has got the Free (DEFAULT) membership set by your plugin (maybe) causing this problem… However still haven’t figured out what’s the problem.

    Sorry for the “essay” 🙂 Was just trying to explain it detailed.

    Regards
    Dennis

    Now my last short update: I’ve tested the theory regarding roles. Some of those roles are created by a plugin (PressPermit), so basically custom roles, one role is automatically generated by template code (the role “gamer” you could already see on screenshots from the correspondence) and is defined in functions.php file of the template. I’ve tested it with my test user and gave him a “Subscriber” role, but nothing has changed.

    Right after I’ve remembered there’s this great simulation tool “Test Memberships” on the admin bar, so I’ve tried it out.

    Result: on my opinion Default (Free membership) doesn’t apply the rights as it should. Furthermore Memberships plugin somehow doesn’t differ between logged in and logged out user. The first screenshot shows how “Free membership (DEFAULT)” sees the category (within the test mode):

    http://i.imgur.com/bu6lucN.jpg

    Do you remember? I’ve set Free membership to GRANT access to this categories:

    http://i.imgur.com/XiWdxfy.jpg

    Now let’s switch to premium membership:

    http://i.imgur.com/tZniUbE.jpg

    Here we go: it does show up posts as it should… Now let’s switch to visitor (not logged-in):

    http://i.imgur.com/gtOf3ll.jpg

    Excuse me what? Granted by FREE MEMBERSHIP? I doubt that 🙂 Somehow plugin messes up something over here. And here is the list with entire memberships once again:

    http://i.imgur.com/b0YzbGd.jpg

    Looks like as if “Memberships 2” plugin has got problem with Default memberships for me but definetly not user role related. Would be glad about a hint of how to fix…

    Thank you very much in advance for spending time on this thread.

    Regards
    Dennis

    https://wordpress.org/plugins/membership/

Viewing 1 replies (of 1 total)
  • Plugin Author Bojan Radonic – WPMU DEV Support

    (@wpmudev-support4)

    Hey,

    For others checking this one we’ve continued the conversation via email and there is definitely a bug in the free version of membership.

    Category protection is not properly applied to Default Membership. As this works properly on the premium version the same will be fixed in the following free Membership 2 update.

    Cheers,
    Bojan

Viewing 1 replies (of 1 total)
  • The topic ‘Default membership issue’ is closed to new replies.