WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Sidebar Login] FF3 - Recognizes Login Success only after Refresh (7 posts)

  1. alkafy
    Member
    Posted 5 years ago #

    Sidebar Login Version 2.2.4. Noticing other folks here with similar problems but I'm not sure that it's the same.

    I have the login form on my homepage using the template tag. After I submit the form with my username and password, I need to refresh or move to a different page for it to recognize that I'm now logged in. It isn't shy about displaying errors if fields are blank or incorrect, the only problem arises when the submission is valid.

    The form works just fine in Safari. Testing in IE 7 shortly.

    Edit: Just wanted to note - I'm using my admin account only. Haven't tested subscriber or contributor.

  2. alkafy
    Member
    Posted 5 years ago #

    Appears to only be an issue on the homepage. http://www.example.com/ has the issue, but http://www.example.com/?p=70 works fine.

  3. alkafy
    Member
    Posted 5 years ago #

    Ha! I got it.

    Login form submission sends me to http://www.example.com/#login when on index.

    Without a filename or $_GET variable, Firefox doesn't recognize the form submission as a page request and doesn't refresh the DOM, even though the server still seems to receive the request. It's the same as clicking a link with an anchor - the page simply moves (or doesn't move if #login is near the top of your page.)

    I'll be hacking the plugin to insert a $_GET variable - possibly with a random int to force refresh.

    Hope this helps other folks running into this quirk.

  4. alkafy
    Member
    Posted 5 years ago #

    Added Line 388:

    if (substr($pageURL,-1)=='/') $pageURL = substr($pageURL,0,-1);
    if (!strpos($pageURL,'rn=')) {
    $rand = (!strpos($pageURL,'?')) ? '?rn='.rand(0,99) : '&rn='.rand(0,99);
    $pageURL .= $rand;
    }

    Above:

    if ($url != "nologout") {
    $pageURL .='#login';
    }

    Appears to work, but caching problems are always tricky...

    Edit: Typo.

  5. Mike
    Member
    Posted 5 years ago #

    thanks, Ill give it a whirl.

  6. Mike
    Member
    Posted 5 years ago #

    For me, this stopped it from working on the homepage entirely.

  7. bellamychris
    Member
    Posted 5 years ago #

    I'm having the exact same problem with version 2.2.5 and Firefox. I was going to try the above hack, but I can't find the insertion point in this version.

Topic Closed

This topic has been closed to new replies.

About this Topic