My forgotPassword form is not showing errors when a user enters an invalid email or username [or both]
It does forward to the correct page if you enter a valid username/email
No errors in the modx or system logs, even if I crank up reporting to 4
here is my code [Revo 2.2.0]:
[[!ForgotPassword? &resetResourceId=`19` &tpl=`ForgotPasswordTpl` &loginResourceId=`17` &emailTpl=`ForgotPassEmailTpl` &tplType=`embedded`]]
<p>Sed nulla turpis, mattis ut placerat a, sagittis non libero. Vivamus iaculis consectetur odio, eget dapibus sem cursus et. Aenean aliquam felis eu risus suscipit suscipit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis quis neque viverra tellus feugiat ultricies. Donec tristique lectus id ipsum bibendum convallis. Quisque consequat vulputate augue, eget dapibus nunc lacinia dignissim.</p>
[[+loginfp.errors:notempty=`<div class="error"><label>Error: </label>[[+loginfp.errors]]</div>`]]
[[+loginfp.errors]]
<form name="forgotpass" class="default" action="[[~[[*id]]]]" method="post">
<input class="returnUrl" type="hidden" name="returnUrl" value="[[+loginfp.request_uri]]" />
<input class="loginFPService" type="hidden" name="login_fp_service" value="forgotpassword" />
<ul>
<li>
<label>Enter your user name to reset your password;</label>
<input class="loginFPUsername" type="text" name="username" value="[[+loginfp.post.username]]" />
</li>
<li>
<label>OR, enter your email address if you forgot your username to reset your password;</label>
<input class="loginFPEmail" type="text" name="email" value="[[+loginfp.post.email]]" />
</li>
<li>
<button type="submit" name="login_fp" class="resetpass" value="[[%login.reset_password]]"><span>Forgot Pass</span></button>
<label> </label>
</li>
</ul>
</form>
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
-
☆ A M B ☆
- 2,475 Posts
Did you ever figure this out? I'm running into the same thing... no documentation on what the correct placeholders are for the error messages...
I think maybe I did finally get it solved ....
calling the error like this:
[[!+errors:notempty=`[[!+errors]]`]]
did not work, however this does:
[[+errors:notempty=`[[!+errors]]`]]
just the ! in front of the +errors:notempty....
dunno why, but it's working for me now.
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
it works by itself like that - though in every case I tested it fails if you try to call it un-cached with a filter [though that is the only filter I tested]
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
HA! here's something funny....
this does work:
[[!+errors:!empty=`[[!+errors]]`]]
I guess we file that under "gotcha!" [or mabey "!gotcha"

]
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
More info on this - actually just kinda documenting it since I ran into this issue AGAIN!
[[ForgotPassword]] takes an additional !undocumented! attribute ...
&errTpl=`` // default is lnErrTpl chunk
// the placeholder is actually [[+msg]]
// in fact, read the snippet code
// forgotPassword more parameters than are actually documented
// here is one of my calls
[[!ForgotPassword?
&resetResourceId=`52`
&tpl=`ForgotPassTpl`
&emailTpl=`ForgotPassEmail`
&errTpl=`fpErrorTpl`
&redirectTo=`51`
&redirectParams=`{"forgot=password":"true","reset-password":"true"}`
]]
// redirects to itself
// creates some url variables to be read into a 'success' message
ForgotPassword apparently expects to use the Login defalt error template which of course I rename and alter the content of....
[ed. note: sean69 last edited this post 13 years, 8 months ago.]
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525