Membership 2 Pro causes blank screens for everyone

We use a lot of user roles in our Membership system here, but we’ve recently started trying to wall of certain content for certain groups. What ended up happening was turning content protection on on any page caused users to see nothing (or to see the content protection error) even if they should have been allowed to see it (we had a “default” group set up). This bug didn’t affect me or any administrators.

The other strange thing is that, if the user were logged out, the system would present a login form that would tell the user their credentials were incorrect, even if they were definitely using the correct credentials to log in. (They were able to go to a different login form and log in just fine.)

I’m totally stumped as to what’s causing this bug to manifest itself, but it’s pretty important to us that we get it working so I’d love any help. I can verify that it manifests if there is ANY content protection on at all. Some users report blank pages, other users report seeing our content warnings.

  • Adam Czajczyk
    • Support Gorilla

    Hello Adam,

    I hope you’re well today and thank you for your question!

    You and other administrators were/are not affected by the issue because users of “administrator” user role are excluded from any protection rules, meaning that no access is ever limited for them and they are not/should not be members of any memberships.

    That being said, I have accessed your site and apart from “Content Protection” being disabled on “Membership 2 -> Settings” page I noticed that there are currently only two memberships (both inactive) and only a single page set to be protected with one of these memberships. Turning content protection on and making that membership active however didn’t result in that page being protected for me.

    That’s a bit different than what you described so I’m wondering if other content has been protected too when you were experiencing the issue. Can you tell me what other content was set to be protected (just a couple of examples) and with which membership(s)?

    I’d then try to set it up again that way in attempt to recreate the issue on your site and hopefully that would let me find the main culprit. Also, have you been using Membership 2 Pro before on that site and it worked fine or didn’t it work from the beginning? If it worked but stopped – were there any additional changes (e.g. some updates, plugins added, changes in configuration) made to the site?

    Please advise!

    Best regards,

    Adam

  • Adam
    • Site Builder, Child of Zeus

    Sure the one page we wanted to have protected immediately was the quick order page. We set it to be protected for the default group so that only logged in users could see it. The result was that all users were unable to see the page.

  • Predrag Dubajic
    • Support

    Hi Adam,

    I did some tests on your installation with M2 protection enabled and new account created for these testing purposes.

    I have protected your quick order page and the page was still available to everyone but only until I cleared W3TC cache, after that the page was available for me while logged in and while logged out it was protected.

    I also had no issues to login with my newly created user.

    W3TC uses some aggressive caching and this is most likely the cause of the issues you’re having, can you try excluding your protected pages from caching and see if everything works fine after that?

    Best regards,

    Predrag

  • Adam
    • Site Builder, Child of Zeus

    I didn’t even think that the caching might become the problem here. So that leads me to a different question. Presuming I need to disable/alter my caching to such an extent, what can I do to maintain page speeds for our users? Some of them are on low-bandwidth connections and giving them a fast response is very important

  • Lindeni Mahlalela
    • Recruit

    Hello Adam.

    I hope you are doing great.

    To speedup your website you can try minifying or compressing your website’s assets using a plugin like Hummingbird or W3TC as you were already using it. Please note that minification is not the same as caching so you can have caching disabled if it cause problems but still have your assets like .js and .css files minified or compressed improve load speeds. You can also server those assets including images from a CDN, both those plugins have CDN integration available.

    If you will have a lot of images, you may like to try WP Smush Pro plugin which will be a very useful tool to optimize your images.

    I hope this helps.

    Cheers,

    Mahlamusa

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.