On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • 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