Hey,
I’ve been using/learning modx for only a few weeks now, and have come across an issue that I cannot fix myself.
Issue:
My website
www.katskinner.com has a user login and register section. I have been using the sample content that is optional at install.
The register section works fine for web users, however I do find an issue when a web user attempts to log in. Upon clicking login, the following "page" is displayed:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« `` is not numeric and may not be passed to makeUrl() »
Parser timing
MySQL: 0.0091 s (32 Requests)
PHP: 0.0607 s
Total: 0.0698 s
If immediately browsing to a different page within my website, the login code recognizes that the web user is logged in.
The logout button seems to work fine.
This is the code that I am using for the FormLogin (slight editing from the sample content):
<!-- #declare:separator <hr> -->
<!-- login form section-->
<form method="post" name="loginfrm" action="[+action+]">
<input type="hidden" value="[+rememberme+]" name="rememberme" />
<fieldset>
<h3>Your Login Details</h3>
<label for="username">User: <input type="text" name="username" id="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" value="[+username+]" /></label>
<label for="password">Password: <input type="password" name="password" id="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" value="" /></label>
<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="[+logintext+]" name="cmdweblogin" class="button" />
<a href="#" onclick="webLoginShowForm(2);return false;" id="forgotpsswd">Forget Your Password?</a>
</br>
<a href="index.php?id=5" onclick="" id="forgotpsswd">Become a Member</a>
</fieldset>
</form>
<hr>
<!-- log out hyperlink section -->
<h4>You’re already logged in</h4>
Do you wish to <a href="[+action+]" class="button">[+logouttext+]</a>?
<hr>
<!-- Password reminder form section -->
<form name="loginreminder" method="post" action="[+action+]">
<fieldset>
<h3>It happens to everyone...</h3>
<input type="hidden" name="txtpwdrem" value="0" />
<label for="txtwebemail">Enter the email address of your account to reset your password: <input type="text" name="txtwebemail" id="txtwebemail" size="24" /></label>
<label>To return to the login form, press the cancel button.</label>
<input type="submit" value="Submit" name="cmdweblogin" class="button" /> <input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" class="button" style="clear:none;display:inline" />
</fieldset>
</form>
Could someone please tell me what I am doing wrong (I am assuming its in the above code)and how to fix it? I preferably want the user to be automatically redirected straight back to the page they were previously on, but if absolutely necessary then to the home page.
I can provide more information upon request.
For your assistance I have created a test web user account for my site -
Login: test
Password: password
Please note: I have a very limited scripting and modx experience.