Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter devgains

    (@devgains)

    Hello,

    I couldn’t get to the bottom of this but I have managed to solve it with a workaround.

    I am just using JS to post the data to the logout url and then redirect once the response comes back.

    I did try some debug code, ip_based_login_update_check runs every time. It looks like the problem was being caused by the $_REQUEST variable being empty on occasion, but I was pulling my hair out trying to find the cause, gave up in the end.

    Hopefully this advice helps somebody.

    Happy for the topic to be closed now, thanks for all your support.

    Thread Starter devgains

    (@devgains)

    I do have a dev site but the site is only accessible internally. Is there anything in particular you would look for in debugging or any code I could add myself?

    I will disable all the other plugins on my dev version and try to find the conflicting one, I would have tried this before but was confident we shouldn’t have anything else that hooks to the logout.

    Thread Starter devgains

    (@devgains)

    No worries, sorry about that. I uploaded it on vimeo too

    https://vimeo.com/517117238

    Thread Starter devgains

    (@devgains)

    I mainly use Firefox but the issue is the same in Chrome.

    Thank you for looking into this, I’ve captured a quick video here which hopefully helps.

    https://drive.google.com/file/d/1ZIRbA7Cy7zmfGwvdDInoMLLP_ZCuZPmL/view?usp=sharing

    Also, bare in mind, my users are not taking these steps. They just contact me when they have the problem and these are the steps I take to recreate the issue.

    • This reply was modified 4 years, 1 month ago by devgains.
    Thread Starter devgains

    (@devgains)

    I’m afraid that hasn’t fixed my problem.

    Perhaps my explanation was not great?

    It doesn’t matter where your plugin redirects to after setting the cookie, what matters is that the session is actually terminated but this doesn’t always happen.

    I can still recreate the issue. I will try and explain it simpler.

    I have a webpage that requires all users to login.
    If they logon from specific IP addresses used with this plugin they are logged in as a subscriber automatically.

    Some users need to login as an admin, so they use the logout link [wp-admin/options-general.php?page=ip-based-login&no_login=15]

    When clicking this we would expect them to be returned to the login page as there existing session has been terminated and they now need to login.
    At the login page, I can see the IPBL_username no_login cookie has been set.

    In order to recreate the problem my users experience, I DELETE this cookie, then try browsing to my site again.

    IPBL see’s that no cookie is set, and logs the user in automatically.

    I have a code in my themes function file that sets the logout button to the ipbl link below if the user is logged in with IPBL.

    From this point, the logout link [wp-admin/options-general.php?page=ip-based-login&no_login=15] essentially does nothing whenever you click on it. No further cookie is set and the user cannot login as another user.

    I think what is happening is the browser is clearing cookies on a scheduled basis which is then causing the problem for my users.

    Can you try the steps I have listed as I can recreate the problem every time?

    Thread Starter devgains

    (@devgains)

    Sorry, it’s probably worth mentioning that the we force all users to login on the site I am experiencing this issue on, hence why I am mentioning the login screen rather than the homepage as users who are not logged in will be directed to the login screen.

    Thread Starter devgains

    (@devgains)

    Hi,

    On that step I am redirected to the login page as I would expect.

    Though for some users this doesn’t work at all, I am able therefore able to recreate the problem they have by deleting the ipbl_username cookie on my own machine.

    Sorry for bumping an old thread, just wanted to say this issue also affected a theme one of our websites uses.

    Following LoriT’s suggesting removing PHPMailer from the relevant function and leaving just $mail resolved the issue.

    Thread Starter devgains

    (@devgains)

    Ah! You’ve cracked it. The inputs where not wrapped in labels but I had a label tag around some text that already had h2 tags which seemed to be causing the problem.

    All fixed now, thanks Jules.

    Thread Starter devgains

    (@devgains)

    You are correct – I’ve tested with the plugin disabled and the issue is still occuring. The problem only began on Friday after implementing the conditional fields so naturally I assumed the error was related.

    Appologies as I should have really tested that before making the topic.

    I did make some CSS changes too so I will have to look deeper into this on my end.

    Thanks for looking anyway.

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