<![CDATA[ edit profile not working - My Forums]]> https://forums.modx.com/thread/?thread=44219 <![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-481009 Quote from: betoranaldi at Jan 31, 2008, 07:05 AM
I finally figured this out... Once I created a custom form I changed the save button's value="saveprofile" to value="saveprofilesimple" and it started working.

Great, that solve my probleme, is it an old probleme, it's should be fixed in the template or mention somewhere.

thanks betoranaldi

p.s. that's a great snippets]]>
Egam Oct 24, 2013, 02:46 PM https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-481009
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-455421 i have read the thread but i don't understand how to solve the problem to 'profile' mode.

I have tried also the source code in http://code.google.com/p/webloginpe/downloads/detail?name=wlpe131_with_instances3.zip&can=2&q="" target="_blank" rel="nofollow">google code but the problem still.

I'm able to register new webuser with customised field, but when the user go to the modify page the button save does nothing :-( No errors is displayed but the phrase is shows: "Your profile has been updated." . It is very frustrating because in reality the profile is not updated.

I use Modx evo 1.0.6 and WebLoginPE 1.3.1 (i have also tryed the version v1.3.2 Beta 1)

My register call
[!WebLoginPE?
&type=`register` 
&groups=`dottori`  
&lang=`it` 
&regType=`verify` 
&registerTpl=`register-dottore-form` 
&notifySubject=`NUOVO DOTTORE ` 
&regHomeId=`1` 
&profileHomeId=`220` 
&liHomeId=`1`
&loHomeId=`1` 
&customFields=`titolo,nome,cognome,struttura,telefono,cellulare,via,civico,provincia,cap,citta,data_nascita,anno_laurea,tipo_attivita,specialita_1,specialita_2,specialita_3,numero_albo,albo_provincia,policy_1,policy_2,policy_3` 
&regRequired=`titolo,nome,cognome,username,data_nascita,tipo_attivita,specialita_1,numero_albo,albo_provincia,policy_2,policy_3`
!]


My profile call
[!WebLoginPE?
&type=`profile` 
&groups=`dottori`  
&lang=`it`  
&profileTpl=`modifica-dottore-form` 
&notifySubject=`MODIFICA DOTTORE ` 
&regHomeId=`1` 
&profileHomeId=`220` 
&liHomeId=`1`
&loHomeId=`1` 
&regRequired=`nome,cognome,email,username,data_nascita,tipo_attivita,specialita_1,numero_albo,albo_provincia,policy_2,policy_3` 
!]


My profile-template
<div style="color:red;">[+wlpe.message+]</div>
<!--<div id="wlpeRegister">--><div class="contactform">
<form id="wlpeRegisterForm" name="wlpeRegisterForm" action="[~[*id*]~]" method="POST">
<fieldset id="wlpeRegisterFieldset">
    <p class="wlpeRegisterInfo">[*intro*]</p>
<fieldset>
<h4>Dati generali</h4>
Titolo:
<select name="titolo" width="10" value="[+form.titolo+]">
<option selected="selected" value=""></option>
<option value="Dr." >Dr.</option>
<option value="Prof." >Prof.</option>
</select>
* Nome:
    <input  name="nome" type="text" style="width:105px;" value="[+user.nome+]">
* Cognome:
<input  name="cognome" type="text" style="width:105px;" value="[+user.cognome+]">
Struttura:
<input  name="struttura"  type="text" style="width:99%;" value="[+user.struttura+]">
Telefono:
<input  name="telefono"  type="text" style="width:150px;" value="[+user.telefono+]">
Cellulare:
<input name="cellulare" type="text" style="width:150px;" value="[+user.cellulare+]">
* Email:
<input name="email" type="text" style="width:150px;" value="[+user.email+]">
* Ripeti email:
<input name="email.confirm" type="text" style="width:150px;" value="[+user.email+]">
Via:
<input  name="via" type="text" style="width:270px;" value="[+user.via+]">
N. civico:
<input name="civico" title="" type="text" value="[+user.civico+]">
Provincia:
<select name="provincia" value="[+user.provincia+]">									<option selected="selected" value="">Nessuno</option>								<option value="Alessandria" title="">Alessandria</option>								<option value="Ancona" title="">Ancona</option>
<option value="Aosta" title="">Aosta</option>
<option value="Arezzo" title="">Arezzo</option>
</select>
Cap:
<input name="cap" title="" type="text" value="[+user.cap+]">
Città:
<input name="citta" type="text" style="width:85px;" value="[+user.citta+]"></td>
<h4>Per il medico</h4>
* Data nascita:
<input  name="data_nascita" type="text" id="sel3" size="10" value="[+user.data_nascita+]">
Anno laurea:
<input name="anno_laurea" title="" type="text" value="[+user.anno_laurea+]">
    * Tipo attività:
<select name="attivita" value="[+user.attivita+]">
<option selected="selected" value="Spec. ambulatoriale" title="">Spec. ambulatoriale</option>
<option value="Medico di Medicina Generale" title="">Medico di Medicina Generale</option>
<option value="Ospedaliero" title="">Ospedaliero</option>
</select>
* Spec. 1:
<select name="specialita_1" value="[+user.specialita_1+]">
<option selected="selected" value="Agopuntura" title="">Agopuntura</option>
<option value="Tisiologo pneumologo" title="">Tisiologo pneumologo</option>
<option value="Urologo" title="">Urologo</option>
<option value="Vulnologo" title="">Vulnologo</option>
</select>
* Albo della provincia:
<select name="albo_provincia" value="[+user.albo_provincia+]">								<option value="Lecco" title="">Lecco</option>
<option value="Livorno" title="">Livorno</option>
<option value="Lodi" title="">Lodi</option>
</select>
Spec. 2:
<select name="specialita_2" value="[+user.specialita_2+]">
<option selected="selected" value=""><Nessuno></option>
<option value="Idrologia Medica" title="">Idrologia Medica</option>
<option value="Igienista" title="">Igienista</option>
<option value="Immunologo" title="">Immunologo</option>
<option value="Infettivologo" title="">Infettivologo</option>
</select>
* Numero iscriz. albo:
<input name="numero_albo" title="(Campo obbligatorio)" type="text" style="width:110px;" value="[+user.numero_albo+]">
<select name="specialita_3" value="[+user.specialita_3+]">
<option selected="selected" value=""><Nessuno></option>
<option  value="Agopuntura" title="">Agopuntura</option>
<option value="Alfa Wassermann" title="">Alfa Wassermann</option>
</select>
Codice omaggio:
<input name="codice_omaggio" title="" type="text" style="width:140px;" value="[+user.codice_omaggio+]">    

[*policy_1*]

* Scegli un Username:
    <input name="username" type="text" style="width:120px;" value="[+user.username+]">
</fieldset>

<fieldset id="wlpeUserProfileButtons">
<button type="submit" id="wlpeSaveProfileButton" name="service" value="saveprofile">Salva</button>
<button type="submit" id="wlpeProfileLogoutButton" name="service" value="logout">Logout</button>
<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofile">Elimina il mio profilo</button>
<button type="submit" id="wlpeRegisterCancelButton" name="service" value="cancel">Cancella</button>
</fieldset>
</form>


Some ideas?


]]>
fabryshock Feb 16, 2013, 07:35 PM https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-455421
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255060 Quote from: Gav at May 26, 2009, 11:23 PM


I also followed the advice above and altered a couple of the buttons by adding the word "simple" to the value string:
<button type="submit" id="wlpeSaveProfileButton" name="service" value="saveprofilesimple">Save</button>
<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofilesimple">Delete My Profile</button>


Seems to work fine now, fingers crossed...

Thanks! Helped me get it working. I also found the way to get these functions working with the default template change the case values (ie. saveprofilesimple = saveprofile) around line 267 in SNIPPET code. I found this (earlier in this post) http://code.google.com/p/webloginpe/issues/detail?id=17#c1: Reported by [email protected], May 09, 2009

What steps will reproduce the problem?
1. run snippet in &type=simple mode w/standard templates
2. go to edit profile in frontend
3. try to save/delete profile

What is the expected output? What do you see instead?
The expected actions. But wheter save nor delete/confirm delete is executed

What version of the product are you using? On what operating system?
repo-2142 / 1.3.1

Please provide any additional information below.
Modify the snippet code at line ~267 to the correct service values
according to the standard template values:
"saveprofile","deleteprofile","confirmdeleteprofile"


Comment 1 by songsfortiredears, Sep 25, 2009

i repo’d this error in entirety and found the same solution by correcting the same
service values. However there was also a typo in webloginpe.templates.php at line
~141 which does not allow the completion of the delete profile process.

Change: name="profileDelteForm"
To: name="profileDeleteForm"
]]>
Hlight Aug 13, 2010, 03:28 PM https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255060
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255059
One thing I was doing was using a cut-down version of the $wlpeProfileTpl template in webloginpe.templates.php, so my snippet call was:
[!WebLoginPE? &type=`simple` &liHomeId=`3,4,6,7,8,9,2` &profileTpl=`simpleProfileTpl`!]

simpleProfileTpl just omitted all but the full name, email, password and password-confirm fields.

The problem here was that I wasn’t getting any error messages if the passwords were too short or mismatched.
The error I made was that I missed out the [+wlpe.message+] in the first line of simpleProfileTpl.

I discovered this by going back to the default $wlpeProfileTpl template:
[!WebLoginPE? &type=`simple` &liHomeId=`3,4,6,7,8,9,2`!]

(This is a good way to isolate errors caused by faulty templates, as opposed to bugs in WLPE).

I then got my error messages, but the message for mismatched password fields was "Your fields do not match. Please try again."

I had a look at the code in webloginpe.class.php:

Around about line 859 is the following code block:
	else
	{
		$this->FormatMessage($this->LanguageArray[2]);
		return;
	}

This prints the error message $wlpe_lang[2] from assets/snippets/webloginpe/lang/en.php, but without replacing the "[+000+]" substring.

This can be sorted by replacing these lines with the following:
	else
	{
		$error = $this->LanguageArray[2].'<br />';
		$errorMessage .= str_replace('[+000+]', '"password"', $error);
		$this->FormatMessage($errorMessage);
		return;
	}


Alternatively, you can just comment out the lines within the else block. This will allow the function to continue and the error message will be handled correctly in the next 20 or so lines.

I also followed the advice above and altered a couple of the buttons by adding the word "simple" to the value string:
<button type="submit" id="wlpeSaveProfileButton" name="service" value="saveprofilesimple">Save</button>
<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteprofilesimple">Delete My Profile</button>


Finally, I tried the New Password (confirm) field named both "password.confirm" and "password_confirm", and both worked fine, even though the field value is called as $_POST[’password_confirm’] in webloginpe.class.php.

Seems to work fine now, fingers crossed...]]>
Gav May 26, 2009, 06:23 PM https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255059
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255058 http://wiki.modxcms.com/index.php/Category:WebLoginPE

Then we can share the discoveries we’ve made. I started several pages there
I hear that Scotty has a new baby, so he’s busy with family matters for a while.
]]>
Everettg_99 May 25, 2009, 11:48 AM https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255058
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255057
Will attempt to see if using a single button improves things.

]]>
Galen May 25, 2009, 03:34 AM https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255057
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255056
I am using WebLoginPE the first time and have the same problems as stated by Everett. I am wondering why other developers are not facing the same problems. Are we alle speaking of WebLoginPE 1.3.1 on MODx 0.9.6.3?

@Everet: Thanks for you last tipp, now at least I can handle editing the profile somehow.

Thanks,
Bogdan]]>
Bogdanio May 21, 2009, 09:20 AM https://forums.modx.com/thread/44219/edit-profile-not-working?page=3#dis-post-255056
<![CDATA[Something Worked!]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=2#dis-post-255055
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?]]>
Everettg_99 Apr 21, 2009, 02:23 PM https://forums.modx.com/thread/44219/edit-profile-not-working?page=2#dis-post-255055
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=2#dis-post-255054
<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... -_-]]>
Everettg_99 Apr 21, 2009, 12:59 PM https://forums.modx.com/thread/44219/edit-profile-not-working?page=2#dis-post-255054
<![CDATA[Re: edit profile not working]]> https://forums.modx.com/thread/44219/edit-profile-not-working?page=2#dis-post-255053
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!)

]]>
therebechips Apr 21, 2009, 12:35 PM https://forums.modx.com/thread/44219/edit-profile-not-working?page=2#dis-post-255053