ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Site 2 front end login redirecting to site 1 index page after login

November 17, 2011 12:22pm

Subscribe [2]
  • #1 / Nov 17, 2011 12:22pm

    EWDC

    58 posts

    Hi there,
    I am running 2.2.2 with MSM.
    Currently trying to sort out some issues I am having with managing user logins.
    Basically using the following

    {exp:member:login_form return="site2"}
     <div class="label_padding">
      <label for="username">Your Username:</label> <input type="text" id="username" name="username" /></p>
      <label for="password">Your Password:</label> <input type="password" name="password" id="password" /></p>
     </div>
     <input type="checkbox" name="auto_login" id="auto_login" value="1" /> <label for="auto_login">Auto-login on future visits?</label>
     <input type="submit" name="submit" value="Login" /></p>
    {/exp:member:login_form}

    Unfortunately the user is redirected to the site 1 index page not the site 2 index page….

    Can you help?


    Cheers,
    Edd

  • #2 / Nov 18, 2011 11:53am

    Kevin Smith

    4784 posts

    Hi EWDC,

    Is “site2” the name of a template group within site 2’s templates that you’d like the login form to redirect to? If not, make sure you’re using the template_group/template syntax with the return parameter, like so:

    return="template_group/template"

    If you do this, does it fix up the issue?

  • #3 / Nov 18, 2011 12:04pm

    EWDC

    58 posts

    Hi Kevin,
    Thanks for getting back to me.

    Was using “site2” to illustrate that I want to return to the index page of site 2 which is held within the template group “8wBsite”

    Have tried both:

    return="8wBsite"
    return="8wBsite/index"

    Neither work, both return to the default/site 1 index page.

    Edd

  • #4 / Nov 22, 2011 12:03pm

    Kevin Smith

    4784 posts

    Edd,

    Are you using Multi Site Login functionality, or is each site’s login form only meant for that particular site? When the user is shown the template of the main site, are they actually redirected there (where the URL is for the main site) or is the URL of the second site still in the address bar while displaying the page from the first site?

    Could you check your server’s error logs to see if it’s throwing an relevant errors?

  • #5 / Nov 22, 2011 12:31pm

    EWDC

    58 posts

    Kevin,
    Each sites login form is only meant for that particular site. The user is redirected from the login to the second site (with second site url) to the main site with the main site url.

    Have checked the CP log and no errors recorded, is this the correct think to have checked?

    Edd

  • #6 / Nov 23, 2011 6:13pm

    Kevin Smith

    4784 posts

    Going to look into this one privately.

  • #7 / Nov 29, 2011 3:28pm

    Kevin Smith

    4784 posts

    Still working on this one privately…

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases