We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6551
    • 11 Posts
    Quote from: betoranaldi at Feb 02, 2008, 12:19 AM

    I found a fix for this... if you change name="password.confirm" to name="passwordconfirm" on the last password txt field it seem to fix the problem.

    I still cannot get anything else to update though. sad or rather, I can add stuff to blank fields and it will save. but when I try to clear out the blank field or replace it with something else it will not save. I have to put a blank space in, in order for it to "remove" it.

    I found out that WebLoginPE is indeed supposed to work like this...

    Did you find anything about the profile update ? The password update work, and the profile update also work but only if I replace with text. If I leave blank a field it is just ignored.

    Thanks
      • 3232
      • 380 Posts
      Quote from: daria at Feb 19, 2008, 02:58 PM


      Did you find anything about the profile update ? The password update work, and the profile update also work but only if I replace with text. If I leave blank a field it is just ignored.

      Thanks

      There is nothing to fix... this is how it is supposed to function.

      see this quote...

      No.
      This is just the way WebLoginPE works to make sure that data you have not provided in a form does not get overwritten.

      WebLoginPE uses an array of all the columns in the default attributes table, then loops $_POST to see if those columns are in there. if they ARE NOT, then they are not posted to the db. so if you previously filled out the zipcode, then set it to ""(blank), well that value will not end up in the $_POST Array and thus not end up being saved into the database.

      Using the "Zip code" example:
      Let’s say you have a userprofile form where you DO NOT let them edit the zip code, so you do not provide a text input named "zip". If WebLoginPE did not work the way it does, the zip column in the database would be set to blank everytime the user saved their profile since no value was passed for it. That is why I had it loop through and get rid of fields with no value before saving to the db.

      You can change the value to whatever you want, just not (Blank). This is simple data protection 101.

      -sD-
      Dr. Scotty Delicious, DFPA
        • 29774
        • 386 Posts
        Sorry to bump this old thread, but I experienced this problem with the default install of WebLoginPE 1.31 (bugfix) in Firefox 3 (Mac).

        The problem is the use of the multiple <button> elements for the form submit, and the associated javascript that fixes a bug with buttons in IE. The javascript throws an error in Firefox 3, and so the form does not submit the form data.

        One solution is to comment out this line 95 in webloginpe.snippet.php (that you copied into the manager):
        /* $modx->regClientStartupScript(’assets/snippets/webloginpe/js/ieButtonFix.js’); */

        And then add the script back in to the head of your document template using IE conditional comments:
        	<!--[if IE]>
        		<script type="text/javascript" src="assets/snippets/webloginpe/js/ieButtonFix.js"></script>
        	<![endif]--> 
        
        


        If you would rather not rely on JS for the form submission in IE, the solution is to make the ’save’ button an <input type="submit" value="save" />, create a hidden input with the name ’service’ and the value ’saveprofilesimple’, and then make the other buttons anchors with the service appended as a query string instead (eg <a href="[~[*id*]~]?service=cancel">Cancel</a>). (Edit: Note that this approach is considered bad practice as RESTful links are meant to be ’safe’, ie not perform a delete/add/edit action).

          Snippets: GoogleMap | FileDetails | Related Plugin: SSL
          • 31441
          • 5 Posts
          For those who are not able to get WebLoginPE Profile Editing to work, I just wanted to share my experience with this problem and what finally ended up working for me... Hopefully this will help end hours of frustration. The solution to my problem ended up being rather simple.

          I am using &type=`simple` and using the $wlpeProfileTpl form template found in webloginpe.templates.php to allow users to edit their own profiles. As many users experienced, I was not able to save any data entered in the form to my database. In testing my login facility I noticed that the Forgot Password & Reset Password functions were working (aka saving the new password to the database). Why does this work and not the Profile Editor?

          The Forgot Password / Reset Password uses the $wlpeActivateTpl form, which uses the following form element.

          <input type="hidden" name="userid" value="[+request.userid+]" />

          This form element is missing from the $wlpeProfileTpl form template. When I added it, the Profile Editor saved all user profile edits to my MODx database. I’m working with a pretty vanilla install of MODx and the WebLoginPE plugin, so I didn’t have to do anything else. No FURLS issues, no JavaScript workarounds, etc. That’s all I did. smiley
          • I’ve read through this thread and I still can’t get the profile editing to work. I’m on a Mac running Safari 3.2.1. I added the userid form element to the webloginpe.templates.php, but that didn’t change anything... when viewing the form, the value never populated. Even when I hard-coded the value with a userid, the profile would not update. I also tried commenting out the IE button fix, but that had no effect either.

            This is pretty frustrating. What else could be going on here? My Snippet call looks like this:
            [!WebLoginPE? &type=`simple` &registerTpl=`registerTpl` &regType=`verify`!]


            I’ve verified that the data is not making it into the database... the fields aren’t updating at all.

            Thanks.
              • 29774
              • 386 Posts
              @Everett

              Try adding this to the bottom of your register template, in place of the existing buttons:

              <input type="hidden" name="service" value="register" />
              <button type="submit">Register</button>
              
                Snippets: GoogleMap | FileDetails | Related Plugin: SSL
              • I’m not having trouble registering users... that part is working fine. I did try editing my profileTpl in the manner you outlined. But it still doesn’t work... I don’t see how it can if it isn’t reading the userid value.

                Here’s what I put in my profileTpl:

                			<fieldset id="wlpeUserProfileButtons">
                				<input type="submit" id="wlpeUserProfileButtons"  name="service"  value="saveprofile"/>
                				<input type="submit" id="wlpeProfileDoneButton" name="service" value="cancel"/>
                				<input type="submit" id="wlpeProfileLogoutButton" name="service" value="logout"/>
                				<input type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofile"/>
                			</fieldset>
                


                Just for kicks, I put in a Snippet that does a print_r($_REQUEST), and the edit profile page coughs up this stuff:
                Array ( 
                [q] => simple 
                [serviceButtonValue] => profile 
                [service] => profile 
                [WebLoginPE] => 96c7b01c8aa73837972478aedd41a6bc|323030efb5036e6d91b7c8465c8f91bb 
                [webfxtab_resourcesPane] => 2 
                [SN49ece1a413e53] => ffed8f5d62347a009cd58b881a43c02f 
                [QE_linksShown] => 1
                 ) 


                Is the userid in the session or cookie? Otherwise I don’t see how this is supposed to work. Any other ideas?
                  • 29774
                  • 386 Posts
                  @Everett

                  So you tried this right?
                  <input type="hidden" name="service" value="saveprofile" />
                  <button type="submit">Save</button>
                  


                  Note that using multiple input submit buttons will fail in IE without the javascript hack that you commented out before. (But with the hack it will fail in Firefox 3 - hence I don’t use multiple submit buttons!)

                    Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                  • Thanks for the response. Nope, that doesn’t work. Just to make sure I’m doing what you suggested: I made a custom chunk and referenced it in profileTpl and removed all the submit buttons except for this one:
                    <input type="hidden" name="service" value="saveprofile" />
                    <button type="submit">Save</button>


                    I’m calling the Snippet and the profile chunk using this:
                    [!WebLoginPE? &type=`simple` &profileTpl=`profileTpl`!]


                    I also tried adding the userid field:
                    <input type="hidden" name="userid" value="[+request.userid+]" />


                    But when the form is rendered, the value is always empty:
                    <input type="hidden" name="userid" value="" />


                    So long as the userid never makes it through, I don’t see how this can possibly work. The Snippet needs to know the userid, otherwise it can’t update the database. Even if I HARDCODE the userid, this thing fails. I think this Snippet is critically flawed... I’m about at the point where I just code my own solution, but I’m still holding on to some hope because I need login functionality for about 3 or 4 other sites.

                    Frustrated... -_-
                    • Ok, if I call the Snippet using the type=`profile`, I can update the profile:
                      This works:
                      [!WebLoginPE? &type=`profile` !]


                      If I call the Snippet using type=`simple`, I can NOT update the profile:
                      This does NOT work:
                      [!WebLoginPE? &type=`simple`!]


                      Even if I specify the "corrected" version of the profileTpl, the type=`simple` fails. At least now I can make this work somehow for my site.

                      Anyone have any ideas as to why this Snippet fails under these conditions?