• Resolved ilwoody

    (@ilwoody)


    Hi guys,

    if you can help please, It should be easy for you but I really need to fix that. I’ll explaing you the full process to be as much accurate as I can.

    I’m always refering to this site: https://suonareaorecchio.com (with SSL)

    1) Visitor register my site: OK

    2)They get email with generated password: OK

    3) Email gives them a link to the login page:
    https://suonareaorecchio.com/wp-login.php
    They enter credentials, but they are redirect NOT to the Welcolme Login Page, but to the Membership Page. Basically as they weren’t subribed and tried to access a page with no permission (infact in this case s2member redirect users to the membership page to upgrade.) NOT OK. Actually it happens some time that they redirect to the home page

    4) Checked the Login Welcome Page (/la-mia-pagina/) and is correctly set as Login Welcome Page as shown.

    5) For test purpose I put in the Login Welcome Page a link to this same page in header. In this case subscribers are able to access this Login Page. Basically the redirection after they logged in isn’t working, since it redirect them some time to the Membership Page as they weren’t logged in and some other time to the Home page (no clue why)

    That’s the end for subscribers but what’s worse is for paid customers!

    1) In my specific case, I’m safe to assume that no visitor will pay without being first a subscriber. Don’t need to explain why, just assume that my case concern user upgrading from Level#0 Free to Level#1

    2) In Login Welcome Page i put a PayPal button generated with S2member. User is redirect to PayPal. They pay. PayPal auto-return is set to

    https://suonareaorecchio.com/?s2member_paypal_return=1

    3) They receive an email with confirmation (what you call Modification Confirmation Email)
    with link to their new Level#1 page. OK

    4) They click on the link.
    /corso-completo-di-pianoforte/
    then theyr’re redirect to the Membership Login Page as they didn’t paid (but just did!!!!) and even to the Home Page (why?). NOT OK

    5) Cheked the PayPal button and it’s correctly created for Level#1 access (no mistake wth other levels). Checked the /corso-completo-di-pianoforte/ page and is set for Level#1 access.

    6) In this case no matter how many external link I put, paid visitor cannot access the main page they paid for.

    Please I’m completely stuck. Jason knows I’m a paid customer, I understand how he cannot help anybody but at least giving a minimum of support.

    I created this user as paid user with Level#1 access

    username: jason
    paassword: HelpThisGuy!!!S2m (yeah, exactly that ?? )

    To experience subscriber process feel free to register so you can recreate the exact situation. Otherwise use this credential for Level#0:

    username: test
    password: HelpThisGuy!!!S2m

    Thanks anyone for the help.

    https://www.ads-software.com/plugins/s2member/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter ilwoody

    (@ilwoody)

    I guess I found something out.

    That happened because the plugin couldn’t “see”, “understan” (don’t know the right word) the https://www. links.

    Infact, talking about the paid customers, in the Modification Confirmation email the link to the main page I wrote was:

    https://www.suonareaorecchio.com/corso-completo-di-pianoforte/

    There are some features I don’t know that redirect the paid user to the membership. Now that I changed the link to:

    https://suonareaorecchio.com/corso-completo-di-pianoforte/

    Everythings fine concerning the paid customer.

    Still, Subscribers and paid users after login, are redirect to the home page instead of the Login Welcome Page.

    As I told you I triple checked the page set as Login W P in s2 general options.

    Thanks again

    Thread Starter ilwoody

    (@ilwoody)

    Ok I got it. Not solved it but got it.

    Login Welcome Page I had to set the option:

    “No, do NOT modify (use WordPress default behaviour)”

    And I even understand why they are redirect to the home page.

    Because this line of code in the functions.php

    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
            ob_start();
            wp_loginout('index.php');
            $loginoutlink = ob_get_contents();
            ob_end_clean();
            $items .= '
    <li>'. $loginoutlink .'</li>
    ';
        return $items;
    }

    This code allow me to have a Login/Logout button on the top right header. The only proble is that when I click in the button to login, it implements an autodirect:

    https://suonareaorecchio.com/wp-login.php?redirect_to=index.php

    That’s why (I guess) I was used to be redirect to the home page. I cannot see in these lines the redirection code, though?

    Any idea how can I take this “?redirect_to=index.php” off, so I will use S2member redirection?

    Thanks again

    Thread Starter ilwoody

    (@ilwoody)

    add_filter('wp_nav_menu_items', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
            ob_start();
            wp_loginout('index.php');
            $loginoutlink = ob_get_contents();
            ob_end_clean();
            $items .= '<li>'. $loginoutlink .'</li>';
        return $items;
    }

    That’s the code I meant. What the hell happened in this page!

    Thread Starter ilwoody

    (@ilwoody)

    I apologize just forgot to add the “code” tag and page got all messed up!

    Try eliminating this line:
    wp_loginout('index.php');

    Thread Starter ilwoody

    (@ilwoody)

    Thanks for answering mate.

    Just tried it. If I eliminate that it disappear the login/logout button.

    It might work but there won’t be anything to click ??

    Then I’d suggest Googling Stack Exchange for some alternative code. This is not an s2Member issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Redirection won't work, paid users can't see pages’ is closed to new replies.