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

    I’m having real problems with the weblogin. When i enter my web users name and password and i hit ’enter’ nothing happens. When i click on the ’forgotten password’ link, the page jumps to the index.php page.
    I’ve taken out the attribute of ’name’ and added ’id’ (if it wasn’t already there) for XHTML validation puposes.
    Here’s my chunk code called FormLogin:
    <!-- #declare:separator <hr> --> 
    <!-- login form section-->
    <form method="post" action="[+action+]" id="clientlogin"> 
        <!--<input type="hidden" value="[+rememberme+]" name="rememberme" />-->
        <fieldset>
            <h3>Client Area</h3>
            <input type="text" id="username" class="field" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" value="username" />
        	<input type="password"  class="field" id="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" value="password" />
      <!--<input type="checkbox" id="checkbox_1" name="checkbox_1" tabindex="3" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" /><label for="checkbox_1" class="checkbox">Remember me</label>-->
        	<input type="submit" value="Go" id="cmdweblogin" class="submit"/>
    	<a href="#" onclick="webLoginShowForm(2);return false;" id="forgotpsswd">Forget Your Password?</a>
    	</fieldset>
    </form>
    <hr>
    <!-- log out hyperlink section -->
    <h4>You're already logged in [+username+]</h4>
    Do you wish to <a href="[+action+]" class="button">[+logouttext+]</a>?
    <hr>
    <!-- Password reminder form section -->
    <form name="loginreminder" method="post" action="[+action+]" id="clientlogin2">
        <fieldset>
            <h3>Forgotten Password?</h3>
            <input type="hidden" id="txtpwdrem" value="0" />
            <label for="txtwebemail">Enter your account email address to reset your password: <input type="text" name="txtwebemail" id="txtwebemail" class="field"/></label>
            <label>To return to the login form, press the cancel button.</label>
        	<input type="submit" value="Go" id="cmdweblogin" class="submit" /> <input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" class="cancel" style="clear:none;display:inline" />
        </fieldset>
    </form>
    


    On the weblogin.inc.php i have just taken out the javascript at around line 30, and replaced with <script type="text/javascript" src="assets/snippets/weblogin/weblogin.js"></script>. I have pasted the javascript into a file called weblogin.js

    The call appears in a ’left column’ chunk as follows:
    [!WebLogin? &tpl=`FormLogin` &loginhomeid=`[(site_start)]`!]

    Can anyone help??

    Thanks

    J
      www.9thwave.co.uk
         WEB | DESIGN | PRINT
      • 3749
      • 24,544 Posts
      Try separating the comment tags from the rest of the HTML with a space in these lines -- it’s possible they’re not being parsed correctly:

      <!--<input type="hidden" value="[+rememberme+]" name="rememberme" />-->
      <!--<input type="checkbox" id="checkbox_1" name="checkbox_1" tabindex="3" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" /><label for="checkbox_1" class="checkbox">Remember me</label>-->


      If that has no effect, I’d try pasting the js code back in and see if that fixes things -- if so, that file probably isn’t being found.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36549
        • 572 Posts
        Hi,

        Thanks for the reply.
        I’ve taken those lines out completely as the ’remember me’ is not needed.
        The form still doesn’t work though. The only time it has ever worked is when i had XHTML urls turned off in Configuration and using the oringinal weblogin.inc.php...but i don’t want the XHTMLS turned off, i want the pages of the site to validate.

        can anyone offer any suggestions?

        Thanks
          www.9thwave.co.uk
             WEB | DESIGN | PRINT
        • Please show us your call and tell us if your page is set to be cached or not. Thanks.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 36549
            • 572 Posts
            Hi Ryan,

            The call is:
            <div id="sidebarlogin">[!WebLogin? &tpl=`FormLogin` &loginhomeid=`[(site_start)]`!]</div>

            This call is placed in a chunk called ’LeftColumn’ which is then called in the Templates like so:
            <div id="sidebar">
            {{leftColumn}}           
            </div>

            So it appears in the left sidebar of every page.
            Does that make sense?

            I wonder if it is a cache issue...as it appears within the template so it’s effectively on every page which are all set to cache????
              www.9thwave.co.uk
                 WEB | DESIGN | PRINT