It seems Multiple Memberships plugin needs some logic work

Hello, I have been working a lot with protected content and have run into a couple problems. It seems to me that the logic for having users in multiple membership groups isn't totally solid. Either that or it doesn't work they way I'd expect it to. I find this in two areas: with the protection shortcodes and with URL protection.

I have granted you access to my test site so that you can take a look if needed.
http://summitldev.wpengine.com/members/

I am using short codes to protect content on the TIMELY page.
http://summitldev.wpengine.com/members/timely/
There is content visible to the Role_KOF ms and content not visible to them (access="no"). If a user is part of Role_KOF and Role_Has_Account (Used to give visibility to logged in users) then the content on TIMELY shows correctly. If I add the user to the group Role_Broadcast as well then the TIMELY page displays content as if they aren't in the Role_KOF group. This is what I suspect to be an error is the plugin's logic.

The second place that I get a similar error is on the Events Calendar Pro Plugin calendar page.
http://summitldev.wpengine.com/members/broadcast-calendar/
I have protected this page using URL protection. If the user is only in the Role_Broadcast mc (The mc set to have access to the url) then the calendar page shows up correctly. When I add the user to another groups such as Role_KOF then I get directed to the protected content page when trying to access the broadcast page.

On another note it would be nice if the Test Memberships Simulation supported multiple memberships.

I am hoping you can help me with my problem or report this to the developers to get fixed. You have been very helpful in the past, so thank you. I look forward to hearing back from you.

  • Michael Bissett
    • Recruit

    Hey @tslmedia, hope you're doing well! :slight_smile:

    I wasn't able to reproduce the first issue inside of my test Multisite, I'd like to ask if you've tried switching to a default theme (e.g. Twenty Fifteen) & disabling the other plugins on this subsite, and seeing if that gets things working as they should here?

    I would advise trying that for the issue regarding the Events Calendar Pro & URL Protection. :slight_smile:

    Kind Regards,
    Michael

  • tslmedia
    • Web Cre8Thor

    I did deactivate all plugins and changed the theme and still ran into the problem. I did some more test and found that the problem was being caused by the Role_Broadcast membership. If I did the same thing with any other group then I wouldn't get the problem. After realizing this I deleted and recreated the Role_Broadcast group and the problem seems to have gone away. I am not sure what was causing the problem. Maybe there was some kind of DB corruption when it was created? I am not sure but it seems to be working now and hopefully it continues to do so.

    I think the problem may have still have originated from an error in the plugin but I do not know how I would test that. I looked in the DB to try and find a difference with the rows for that group but as far as I could tell they looked fine. I could have easily missed something though.

    Thank you for your help. I hope no one else runs into this problem.

  • tslmedia
    • Web Cre8Thor

    The problem has come back with a number of different memberships. I am not sure what is going on but it is still there when I deactivate all plugins and I am using a default theme. :slight_frown: I hope we can figure out the source of the problem.

  • tslmedia
    • Web Cre8Thor

    Hello again, I have gotten closer to finding the source of my problem. Here is what I have done: I created a test site from my main install, removed all other plugins, and enabled 2015 Default WP theme. At this point the problem was still there. I created a new account which I intended you to use to see my issue. I gave the user the the same permissions as my test user and found that the problem was gone. This made me realize that the problem was related to my user. With that information I realized that it may be possible that all my problems would go away if I recreated my test users. I decided that was not a very good way to do things because I have no idea if the problem will come back after this section of the site goes live to other users. I have now simulated the problem with both users. I attached images to help you understand the problem. I have granted you admin access to my test site at: http://summitldev.wpengine.com/
    I have done these tests here: http://summitldev.wpengine.com/members/test-page/
    I have two users you can login with to see the problem further.

    (access details removed by moderator)

    markhayward is the user which is having the problem. This is all the information I have collected on the problem and hope it can help figure out what is going on. Please let me know if any other explanation is needed.

    Thank You,
    Mark Hayward

  • tslmedia
    • Web Cre8Thor

    Hello, it is great to see that a fix has been released to take care of this bug for shortcodes! It makes a huge difference! Still one problem though. I seem to still be getting this same bug with URL protection. I hope the solution is simple and look forward to the fix. Thanks for the great work!

  • Adam Czajczyk
    • Support Gorilla

    Hello @tslmedia,

    I hope you're having a great day!

    I understand that you've updated the plugin on your site? It seems like there're still some issue with Protected Content that need to be reviewed. So far, I've notified the developer about this, so please don't stop following this thread!

    All the best,
    Adam

  • Philipp Stracker
    • The Crimson Coder

    Right, I have found the problem with URL protection and solved it!
    There will be an update later today for this issue.

    Also the idea to test multiple memberships in simulation mode is very good :slight_smile: However, this requires some serious rewriting of the testing module and will not be included today or in near future. Maybe in 1.2... :wink:

  • Michael Bissett
    • Recruit

    Hey @tslmedia! :slight_smile:

    We released the update to Protected Content earlier today, could you try updating now, and letting us know how that works please?

    If you're not seeing it yet inside your site's Dashboard, you may need to go to:

    WPMU DEV -> Updates

    And click on the "Update Now" link at the bottom of the page there, that should get the update to show up. :slight_smile:

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.