We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Hi All,

    I have added weblogin to a site however when I try to log out it just goes to a white page. The login etc works great, just cant seem to get it to go to the correct logout page.

    I have ste up the login page with the following in it:
    [!WebLogin? &tpl=`FormLogin` &loginhomeid=`51` &logouthomeid=`53`!]


    This then goes to the login page where I will display content and the logout link:
    <p>This is private</p>
    <div>[!WebLogin? &tpl=`FormLogin` &loginhomeid=`51` &logouthomeid=`53`!]</div>


    The template I am using is:
    <!-- #declare:separator <hr> --> 
    <!-- login form section-->
    	<form method="post" id="loginfrm" action="[+action+]"> 
    		<fieldset>
    			<input type="hidden" value="[+rememberme+]" name="rememberme" /> 
    			<div>
                                  <label for="username">User: </label>
                                  <input type="text" name="username" id="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" value="[+username+]" />
                           </div>
    			<div>
                                  <label for="password">Password:</label>
                                  <input type="password" name="password" id="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" value="" />
                            </div>
    			<div>
                                   <label for="checkbox_1" class="checkbox">Remember me</label>
                                   <input type="checkbox" id="checkbox_1" name="checkbox_1" tabindex="3" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" />
                          </div>
                          <div>
    			<input type="submit" value="[+logintext+]" name="cmdweblogin" class="button" />
    </div>
    		<p><a href="#" onclick="webLoginShowForm(2);return false;" id="forgotpsswd">Forget Your Password?</a></p>
    		</fieldset>
    	</form>
    
    <hr>
    <!-- log out hyperlink section -->
    
    <p>Do you wish to <a href="[+action+]" class="button">[+logouttext+]</a>?</p>
    
    <hr>


    For some reason it appears to be adding &webloginmode=lo to the end of the url on the current page instead of redirecting.

    Does anyone know where I’m going wrong ??

    I’m using the currrent download of Modx.

    Cheers