Page 1 of 1

Authenticated User Redirection of “un-authenticated" Request

PostPosted: May 2nd, 2011, 7:57 pm
by tkittredge
Authenticated User Results in Redirection of “un-authenticated” Requests

The Platform...

    WP... 3.1.2
    s2Memeber... 3.5.8
    s2Member Pro... 1.5.8
    Base URL has not changed (www problem should not be an issue that I am aware of, however...)
    URLs are of the form... http://machine-name.local/~username/blo ... age_id=239
    LAMP running on “localhost”, ./wp-config.php/ is set to define localhost environment... define("LOCALHOST", true);
    Developer... New to S2Memeber (purchased Pro within last 30 days), new installation, non-production (yet)
    All other plugins... Deactivated (except Exec-PHP)
    Theme... WhiteHousePro 3.1.3 (have NOT tried recreation scenario with Twenty-Ten)
    Browser... Safari

The Configuration...

    Page Access Restrictions configured for two pages, Pages That Require Level #0 Or Higher: [224,239]
    No other restrictions configured (post, tag, category, uri, alternative, or specific post/page)

The Recreation Scenario...

    Start browser
    Navigate to a restricted page [239]
    Redirected to Member Options Page [379]...
    http://machine-name.local/~username/blo ... evel_req=0
    S2MEMBER_CURRENT_USER_ACCESS_LEVEL = -1
    Log in successful via s2Member Pro PHP code embedded on MOP, <?php echo s2member_pro_login_widget(); ?>
    Redirected to Welcome Page [900] (so far so good)
    Re-navigate to originally restricted page [239] (as in step 2)
    Redirected to Member Options Page [379] Fail Whale!...
    http://machine-name.local/~username/blo ... evel_req=0
    S2MEMBER_CURRENT_USER_ACCESS_LEVEL = 1
    MOP in “logged in” state (My Profile Summary with My Account, Edit My Profile, Logout enabled)
    Navigate to the other restricted page [224]... Success! Page not restricted.

The Clues...

    Kill and RESTART the browser (after EACH test) and the results are VERY repeatable
    Reverse the order, “touch” 224 first and log in, 224 fails and 239 succeeds
    “Touch” both 224 AND 239 before logging in, then BOTH fail and behave as above (cumulative expression)
    Same result apply to Welcome page if made navigable
    Same results using Admin profile, S2MEMBER_CURRENT_USER_ACCESS_LEVEL = 4
    Log in via the sidebar widget OR wp-login.php, same results
    DON’T “TOUCH” either restricted page prior to logging in (via Widget OR wp-login) BOTH pages are accessible as designed

The Answer...

    Has something to do with what’s perceived as the restricted page “touched” prior and after log in
    Could have something to do with “localhost” and the form of the url, although seems to be disproven
    ?

Re: Authenticated User Redirection of “un-authenticated" Req

PostPosted: May 2nd, 2011, 11:57 pm
by tkittredge
Appears to be the same problem as... viewtopic.php?f=4&t=6240

Here on Safari 5.0.5 OS X 10.6.7.

Simply (UPDATED)... Any individual restricted page "touched" AFTER dumping the browser cache (Safari, Empty Cache...) but BEFORE login will not be accessible after log in. Those untouched will be accessible. Empty cache after login and all restricted pages are accessible.

Re: Authenticated User Redirection of “un-authenticated" Req

PostPosted: May 3rd, 2011, 6:29 am
by tkittredge
UPDATE (responding to Daniel's comment at viewtopic.php?f=4&t=6240&p=13981#p13968)...

Pemalinks in my case are configured to use the default URL structure and exhibit the problem... e.g. /?page_id=239

See example links above.

Re: Authenticated User Redirection of “un-authenticated" Req

PostPosted: May 3rd, 2011, 8:30 pm
by Jason Caldwell
( this thread is now closed, moving conversation to this location )