We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    Using revo 2.1.3 with the latest 1.7 login package... I cannot get the password changed success message to display!

    Here is my source, everything works BUT the cp.successMessage& cp.error_message placeholders... any thoughts??

    [[!ChangePassword?
    	&successMessage=`<div class="inline-success">Password changed successfully.</div>`
    	&submitVar=`change-password`
    	&placeholderPrefix=`cp.`
    	&validateOldPassword=`1`
    	&validate=`nospam:blank`
    ]]
    
    
    
    [[!+cp.error_message]]
    [[!+cp.successMessage]]
    
    <form class="form" action="[[~[[*id]]]]" method="post" name="change-password" >
    	<ul class="user-form change-password">
    		<li>
    			<input type="hidden" name="nospam" value="" />
    			<label for="password_old">Old Password  </label>
    			<input type="password" name="password_old" id="password_old" value="[[+cp.password_old]]" />
    			[[!If? &subject=`[[!+cp.error.password_old]]` &operator=`!empty` &then=`<span class="error">[[!+cp.error.password_old]]</span>` ]]
    		</li>
    		<li>
    			<label for="password_new">New Password </label>
    			<input type="password" name="password_new" id="password_new" value="[[+cp.password_new]]" />
    			[[!If? &subject=`[[!+cp.error.password_new]]` &operator=`!empty` &then=`<span class="error">[[!+cp.error.password_new]]</span>` ]]
    		</li>
    		<li>
    			<label for="password_new_confirm">Confirm New Password  </label>
    			<input type="password" name="password_new_confirm" id="password_new_confirm" value="[[+cp.password_new_confirm]]" />
    			[[!If? &subject=`[[!+cp.error.password_new_confirm]]` &operator=`!empty` &then=`<span class="error">[[!+cp.error.password_new_confirm]]</span>` ]]
    		</li>
    		<li>
    			<button type="submit" name="change-password" value="Change Password" class="change-password"><span>change password</span></button>
    		</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
      • 36666
      • 19 Posts
      I too have the "missing success message" problem using Login 1.7.0.

      As far as
      [[!+cp.error_message]]
      goes, each of the 3 fields in the form are validated independently and the appropriate error messages are displayed with them, so I don't see a need for it in my form.

      The LoginChangePasswordController function for producing the successMessage is:
          public function setSuccessMessagePlaceholder() {
              $placeholderPrefix = $this->getProperty('placeholderPrefix');
              $this->modx->setPlaceholder($placeholderPrefix.'passwordChanged',true);
              $successMessage = $this->getProperty('successMessage');
              if (!empty($successMessage)) {
                  $this->modx->setPlaceholder($placeholderPrefix.'successMessage',$successMessage);
              }
          }


      So...
      [[!+cp.successMessage]]
      should in fact work.

      I have also tried other ways to display the success message, none of them work.
      I thought about using an input filter to process $_GET, but input filters are undocumented.
      I have tried using the returned $_GET value IE: /pwdchange.html?logcp-success=1.

      In fact, I have tried all of these and none evaluate to TRUE.
        [[!+cp.successMessage:notempty=`<p class="success">1</p>`]]
        [[!+cp.logcp-successMessage:notempty=`<p class="success">2</p>`]]
        [[!+cp.logcp-success:notempty=`<p class="success">3</p>`]]
        [[!+logcp-successMessage:notempty=`<p class="success">4</p>`]]
        [[!+logcp-success:notempty=`<p class="success">5</p>`]]
        [[!+cp.passwordChanged:notempty=`<p class="success">6</p>`]]
      


      It is important that users receive this message confirming the password was changed.

      Is there a way to dump all placeholders with a specific prefix? IE cp.*
      [ed. note: cp@pcs last edited this post 12 years, 6 months ago.]
        • 26503
        • 620 Posts
        I did file a bug report for this, will also be looking deeper into the issue shortly since the site this is for is to be live soon....

        -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
          • 36666
          • 19 Posts
          When using property
          &reloadOnSuccess=`1`
          , placeholder
          [[+cp.successMessage]]
          is not returned. Success is indicated via ?logcp-success=1 in the URL.

          I am using
          [[!If? &subject=`[[!getUrlParam? &name=`logcp-success` &int=`1`]]` 
                 &operator=`EQ` 
                 &operand=`1` 
                 &then=`<span class="SuccessMsg">Your Password has been changed</span>`
          ]]
            • 36931
            • 206 Posts
            Hello,
            I got the same problem and I tried on Firefox and Safari.
            I do not why but suddenly it works.
            After testing it , I noticed that it works on Safari but not on Firefox.
            The difference between both is that I was logged in Manager on Manager.
            When I logout, it works on Firefox.

            But I do nt think is the only reason, because it was not workinf on Safari too.

            Here is my code:
            First I created a page and I pasted this:
            <h1>Modification du mot de passe</h1>
            [[!ChangePassword? &submitVar=`change-password` &reloadOnSuccess=`0` &successMessage=`Votre mot de passe a été changé` &placeholderPrefix=`cp.` &redirectToLogin=`1`  &validateOldPassword=`1` &validate=`nospam:blank` ]]
            <p>[[$myLgnChangePassword]]</p>
            

            Then I created a chunk (myLgnChangePassword) and I pasted this:
            <div class="error">[[!+cp.error_message]]</div>
            <p class="confirm">[[!+cp.successMessage]]</p>
            
            <form class="form" action="[[~[[*id]]]]" method="post"> 
             
              <input type="hidden" name="nospam" value="" />
              <label for="password_old">Ancien mot de passe</label>
              <br />
              <input id="password_old" type="password" name="password_old" value="[[+cp.password_old]]" />
              <br />
              <span class="error">[[!+cp.error.password_old]]</span>
              <br />
            
              <label for="password_new">Nouveau mot de passe</label>
              <br />
              <input id="password_new" type="password" name="password_new" value="[[+cp.password_new]]" />
              <br />
                <span class="error">[[!+cp.error.password_new]]</span>
              <br />
             
              <label for="password_new_confirm">Confirmer le nouveau mot de passe</label>
              <br />
              <input id="password_new_confirm" type="password" name="password_new_confirm" value="[[+cp.password_new_confirm]]" />
              <br />
               <span class="error">[[!+cp.error.password_new_confirm]]</span>
              <br />
              <input type="submit" name="change-password" value="Changer" />
            </form>
             
            


            Then, now even if it works, I wondering why it was not working before, but first why it does not work when we a re logged into Manager?
              • 39325
              • 5 Posts
              It's works

                  [[!ChangePassword?
                    &submitVar=`change-password` 
                    &placeholderPrefix=`cp.` 
                    &validateOldPassword=`1` 
                    &validate=`nospam:blank` 
                    &reloadOnSuccess=`0` 
                    &successMessage=`Password has been changed` 
                    &placeholderPrefix=`cp.`
                  ]]
              
                  [[!+cp.error_message:notempty=`
                    <div class="alert alert-danger">[[!+cp.error_message]]</div>
                  `]]
                  [[!+cp.successMessage:notempty=`
                    <div class="alert alert-success">[[!+cp.successMessage]]</div>
                  `]]    
              
                  <form class="form" action="[[~[[*id]]]]" method="post">
                    <input type="hidden" name="nospam" value="">
              
                    <div class="form-group">
                      <label for="password_old">Old password</label>    
                      <input class="form-control" type="password" name="password_old" id="password_old" value="[[+cp.password_old]]">
                      <span class="error">[[!+cp.error.password_old]]</span>
                    </div>
              
                    <div class="form-group">
                      <label for="password_new">New password</label>
                      <input class="form-control" type="password" name="password_new" id="password_new" value="[[+cp.password_new]]">
                      <span class="error">[[!+cp.error.password_new]]</span>
                    </div>
              
                    <div class="form-group">
                      <label for="password_new_confirm">Retype new password</label>
                      <input class="form-control" type="password" name="password_new_confirm" id="password_new_confirm" value="[[+cp.password_new_confirm]]">
                      <span class="error">[[!+cp.error.password_new_confirm]]</span>
                    </div>
              
                    <div class="clearfix">
                      <button type="submit" name="change-password" class="btn btn-primary">Change password</button>
                    </div>
              
                  </form>
              


              Destroy Enjoy my brothers:)