• Resolved Sinkadus

    (@niwin)


    Hi

    When I log in the body CSS class “logged-in” is always activated properly. But sometimes when I have ‘stayed logged in’ over the night, and go to a restricted page, this CSS-class is suddenly not active anymore. If I log out and then immediately in again, it appears. But I cant expect clients to understand and do that.

    Do you know why this is happening?

    Login details:

    Guest / TempLosenord2024

    Thanks in advance 🙂

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter Sinkadus

    (@niwin)

    Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us. Do you have the following feature Logout Member on Browser Close enabled? The following documentation can help you further.

    https://simple-membership-plugin.com/automatically-logout-members-browser-closure-force-member-logout/

    Do you have a cache plugin running in your site?

    Kind regards.

    Thread Starter Sinkadus

    (@niwin)

    Thanks for the quick reply, really appreciate it.

    No, I have not that option checked, and there is no cache plugin on the site, yet – could it be a problem if I had?

    Plugin Support mbrsolution

    (@mbrsolution)

    No, I have not that option checked, and there is no cache plugin on the site, yet – could it be a problem if I had?

    No, it does not cause any issues. Could you maybe provide more information. I am just trying to workout exactly what is it that you are trying to achieve.

    Kind regards.

    Thread Starter Sinkadus

    (@niwin)

    Okay, I’ll try.

    1. When I log in with your plugin, this CSS-class is added to the body of any restricted page: “logged-in”.
    2. I use this class with some custom CSS to hide the sidebar/footer, on restricted pages when a visitor is NOT logged in.
    3. Sometimes, when I’ve been logged in for an extended timeframe (a day or two), and the browser and/or (?) plugin has kept me logged in, I visit a restricted page, I can tell that I am still logged in (se screengrab above), but the CSS-class has disappeared from the body.

    Only solution as of now, is to log out, and then back in again. Then the CSS-class is in place, as it should be.

    So what’s happening here? Is it a conflict of how the browser visavi the plugin keeps a user logged in?

    Plugin Support mbrsolution

    (@mbrsolution)

    I use this class with some custom CSS to hide the sidebar/footer, on restricted pages when a visitor is NOT logged in.

    What is the custom CSS that you are adding? Does your server run any caching system?

    Kind regards.

    Thread Starter Sinkadus

    (@niwin)

    On restricted pages the sidebar is still visible, so I hide that. And since I couldn’t solve the issues with my footer, I also hide this.

    And no, there is no caching going on on the server.

    Plugin Support mbrsolution

    (@mbrsolution)

    You have not shared your custom CSS code?

    Regards.

    Thread Starter Sinkadus

    (@niwin)

    body:not(.logged-in).page-template-template-section-nav #grve-sidebar,
    body:not(.logged-in).page-template-template-section-nav #grve-footer {
    display: none;
    }
    Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for sharing your custom css code. Looking at the custom css code, it really has nothing to do with our plugin. So, your issue is unique to your set up. Have you tried different browsers? Does your browser have any addon or extension that might cause this type of interference? In most case scenarios, no one leaves their login active overnight. The majority of users login and then logout. If this worries you a lot, you can always display a custom message to all users when they log in reminding them to make sure they log out when they finish their session.

    Does the above help you in any way?

    Kind regards.

    • This reply was modified 1 year, 3 months ago by mbrsolution.
    Thread Starter Sinkadus

    (@niwin)

    Ah, so the “logged-in”-part of the css, is not generated by your plugin, but is a WP standard class for a password protected page?

    Plugin Support mbrsolution

    (@mbrsolution)

    Please have a look at some of our custom CSS code we have available for our plugin.

    https://simple-membership-plugin.com/miscellaneous-css-tweaks-simple-membership-plugin/

    Let me know if this helps you in any way.

    Kind regards.

    Thread Starter Sinkadus

    (@niwin)

    Thanks, but no – this doesn’t affect my problem or needs. I was just wondering if the css class .logged-in that is added to the body for password restricted pages after I log in, was generated by your plugin or wp core.

    Plugin Support mbrsolution

    (@mbrsolution)

    I was just wondering if the css class .logged-in that is added to the body for password restricted pages after I log in, was generated by your plugin or wp core.

    Unfortunately no. Our plugin does not use the following class “.logged-in”.

    Kind regards.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘CSS class “logged-in” not active when logged in’ is closed to new replies.