Quote from: labourlingue at Aug 11, 2008, 06:48 AM
I had a problem for saving profile in the simple mode that i don’t have with the profile mode. Maybe the description of the save button in the template used for editing templates in simple mode in not correct.
Now i am stucked with other problems:
-The "status" is not answering
-The "country" cannot be changed in "profile mode"
-Photo: When using this "profile" mode if you dont change anything concerning the user photo and you save, your picture disepar from the database, so, each time you want to update to profile, you have to download a new picture of yourself...
-The age stuff is not working, when the birth date in unix mode is stored in the sql database.
labourlingue:
About updating the country:
I also tried changing the country in profile mode, but after you save it the initial country is displayed again. I thought the country was not being saved, but after I loaded the profile again, the new country was saved indeed. So I think the bug here is the output after you click on the save button. In my case, I changed the value from "Antartica" to "United States" and after saving the profile Antartica showed up again, and the html output was:
<option selected="selected" value ="223">United States</option>
...
<option selected="selected" value ="8">Antarctica</option>
Really odd that 2 values appear as selected.
This issue is also happening to the Gender field. Any suggestions on how to solve this one?
About the Photo being erased:
Your sugesstion mentioned here:
http://modxcms.com/forums/index.php/topic,27858.msg170339.html#msg170339 was the solution. Some code was being duplicated.
In line 916, the buggy code:
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset='"'.$modx->config['modx_charset'].'"';
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset'])))."'";
}
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset=$modx->config['modx_charset'];
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset']))). "'";
}
}
should be changed to this:
{
// CREDIT: Mike Reid (aka Pixelchutes) for the string escape code.
$charset='"'.$modx->config['modx_charset'].'"';
$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(trim($_POST[$field]), ENT_QUOTES, $modx->config['modx_charset'])))."'";
}
}