• Resolved baponline

    (@baponline)


    I’m using page level content restriction to hide pages for logged out users. This works fine except under one circumstance.

    When a user attempts to open a page when logged out, they correctly get a message saying content is restricted and they need to log in and I have a link to the Login page. The user successfully logs in but….when they attempt to access that same page now that they are logged in, they still get the message saying content is restricted.

    This happens on all restricted pages when the user first attempts to access it before logging in. If they never tried to access it before logging it, it is accessible after log in as it should be.

    It’s almost as if a ‘switch’ is set for that page and not cleared when the user logs in. Seems like the value is being cached someplace. (I use siteground hosting and have dynamic caching turned off).

    I must have something set incorrectly somewhere but can’t seem to find it.

    Thank you in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @baponline

    Could you please provide a screenshot of your Page Content Restriction settings?

    Regards,

    Thread Starter baponline

    (@baponline)

    Will do but not sure how to get that info to you.
    I used Snipping Tool to capture the screenshot and then attempted to cut/paste in this reply but it wouldn’t paste.

    Thread Starter baponline

    (@baponline)

    More information:
    It turns out similar situation happens with more than those pages that are restricted.

    I have pages that are accessible to Everyone. I also have some menu items that are accessible to Everyone and some to logged in users only.

    Here’s what happens:
    1) User successfully accesses page X when not logged in (page X is for Everyone)
    2) User logs in successfully
    3) Menu changes to logged in/restricted menu
    4) User can access all restricted pages
    5) BUT when user accesses page X (from step 1), the menu changes to the accessible to Everyone menu. Page X is accessible
    6) User accesses a page only accessible when logged in and menu goes back to logged in menu

    Here are my UM Settings > Access > Restriction Content
    Global Site Access – Site accessible to Everyone
    Restricted Access Message –
    “This content is restricted to logged in users only. Please login to view this content. (where login is a link to Login page)”
    Allow Gutenberg Blocks restriction options – NOT checked
    Restricted Access to Posts – all checked except for Templates and Content Block
    Restricted Access to Taxonomies – all checked

    Thread Starter baponline

    (@baponline)

    I tested for plugin conflicts.
    Deactivated all plugins except UM. Changed theme to Twenty Fifteen.

    Issues still occur.
    So it must be something I have configured incorrectly or perhaps something in the UM DB. Is there any way to ‘clean/reset’ the DB?

    Thanks

    Thread Starter baponline

    (@baponline)

    Figured out that it was definitely a caching issue. I had dynamic caching turned off on my hosting side. But what I needed to do was turn off caching on the browser side.
    Ultimately I cleared all cache (static, dynamic, mem) and turned all caching back on with the exception of the Login page. After that everything appears to be working as I expected.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Content Restriction for logged in user not working if attempted when logged out’ is closed to new replies.