Redirect/category error Membership Pro non-logged in users

Hi guys,

I have had a search in the forums but so far nothing directly relevant, so apologies if this is a repeated issue.

Basically, with my membership site (beta), I want to make the latest blog posts available to everyone, but then change the category/remove the "latest" category after a time so it's only available to members. However, while everything works fine for logged in members, for unlogged in users, the posts are being listed as "uncategorised" and the link is still pointing to "latest", so the post cannot be found. Disabling Membership Pro fixed the issue so it's clearly related.

I have permalinks set up in my favourite, simple way: /%category%/%postname%/.

Thanks in advance for your help.

Arthur

  • Vaughan

    Hi Arthur,

    Hope you're well?

    It's a bit hard to determine what could be going on from your description.

    Could you grant support access from the dashboard plugin so we can take a closer look? See https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    When you say you are removing the category after a while, are you using a script to do this automatically, or are you manually removing the category from the post itself?

    Thanks

  • Arthur

    Hi Vaughan,

    I've granted support access - very familiar with this; in fact there are also still a couple of WPMU Dev test accounts still in the system!

    If you go first to the homepage (unlogged in) and either search or click on a tag in the sidebar - e.g. whistleblower - you will see posts in protected categories appear, but as Uncategorised. You will see from hovering over the link that it shows /latest/ as the category, for some reason. If you then log in you will see everything working fine. On the other hand, if you go directly to /strategy/ for example as a protected category you will get the protected content message.

    The second scenario of going straight to a protected page is more strange - type "Volkswagen" into the search box at it goes straight to the VW article; clicking on the tag takes you to the list, from where you can also access the article (at least I can, despite clearing the cache and cookies and restarting the browser).

    Hope that helps!

    Arthur

  • Arthur

    Hi Vaughan,

    I've granted support access.

    I've also tried changing permalink to just post-name and the only difference is that now the VW article cannot be found at all, though it still appears in the list. I've tested other articles in protected categories and they are still appearing. (Now changed back to /%category%/%postname%/)

    Part of the issue is the Tag cloud. Ideally, the cloud would be there to demonstrate the range of topics covered in the blog, and I don't actually mind the list/excerpts appearing in search results or tag pages. It's just that when you click on the article/post it should take you to a protected content page.

    Not sure if Membership Pro 2 is set up like that, so I'm not sure what to do with the tag cloud in that instance (probably hide it for non-members, which is not ideal, but so be it).

    Thanks,
    Arthur

  • Vaughan

    Hi,

    Something is blocking support access now, it redirects me to a page not found when I try to use Support access, do you have any security plugins installed at all?

    Might be easier if that's the case to send me login details.

    Can you send your details using the following contact form:

    https://premium.wpmudev.org/contact/#i-have-a-different-question

    Alternatively you can email direct to contact@wpmudev.org

    Mark for attn: Vaughan
    Include a ref URL to this thread.

    Please include the following details;
    - Site login details (super-admin if on multisite)
    - FTP login details so I can take a look at the theme/plugin files.

    Thanks

  • Arthur

    Hi Vaughan,
    Better, in the sense it's now showing the categories correctly, but I can still see the protected content while not logged in.

    I've realised on another site using M2 that the same thing and that I could solve it by manually enabling protection on each post, which I guess is logical and a simple solution, even if, in theory they should automatically be protected by the category protection rule.

    Trouble is, I can't do the same with this site - the enable protection will not work. Any thoughts?

    Thanks,
    Arthur

  • Arthur

    Hi Vaughan,

    In the absence of news, I've had another look/think about this and tried switching off individual post protection, leaving category protection in place. This now has the desired effect of showing the excerpt but taking non-logged-in users to the protected content page (as well as displaying a big "No Access" image where the profile image would be, a nice touch I hadn't seen before).

    While I would like to have the flexibility of using both category and individual post protection (for instance I would like to protect most categories but leave some high traffic pages visible by un-protecting the category but protecting individual posts/pages), the obvious workaround is to set up more categories and protect or not protect them (e.g. /case-study/ and /case-study-members/).

    So I reckon I can go ahead on this basis now. It is obviously worth making sure the developers are aware of this issue, though - there seems to be some sort of conflict between the add-ons in M2, which causes the post protection to fail - the options on each post cannot be changed (including the "enable protection" switch).

    Happy to help with this if needed, especially with testing and feedback.

    Thanks,
    Arthur