in the profile, i add a date field. When i cant to fill my profile, i put a birth date then i click on apply and the date field is always empty, so it doesn’t appear in the public profile..
I use WPMU & BP trunk…
Is there someone who have seen this before ?
(sorry for my english !)
Not sure what the problem is Dace. You added a date field in the profile. When you go to your profile the date field will be blank, yes. You should be able to change the field to something and then use the Save Changes > button to save everything on that screen.
This doesn’t work? What version of wpmu are you using? Any error messages in your apache error log?
indeed it doesn’t work when i click on save changes… always a blank date…
WPMU & BP trunk from last monday
no idea about apache error log
Thx for your answer !
Same in my site – Hosted/Linux.
But in my test instalation (Xampp/Windows) the dates are saved!
Ok people. Exactly what date format are you using? mm/dd/yyyy or what in that field?
Never mind the question about date format. We don\’t get a choice. I need to know if the data is getting saved and not being displayed or just not getting saved. Can you take a look at the bp_xprofile_data table and see if there is anything in there for that date field?
The bp_xprofile_data table looks like this: id, field_id, user_id, value, last_updated. The field_id is basically the sequence you entered the fields in the backend. Starting at 1, you can prob count down the list and guess at the field_id. If you’ve done alot of arranging things with deletes and adds it might not be that simple.
field_id comes from another bp table called bp_xprofile_fields. If you browse that table with phpmyadmin you’ll see your date field. Whatever you called it will be in the ‘name’ column. The field_id you are looking for is the ‘id’ column in that table. Match that up with the field_id in the bp_xprofile_data table and tell me what that row says for that field_id.
You should have a number like: 1210392000 in the ‘value’ column. That’s a linux time number. What’s in that spot for your date field? Matter of fact, try changing and saving the profile data and then go look at the tables. What does phpmyadmin say for that row in the table?
Same problem here: When entering a date and hitting ‘save’ it doesn’t get saved. There’s no entry in the DB table.
When I manually add an entry to the DB table, the profile shows the correct date (June 19, 2009). When editing the profile the date field only shows the day and year, the month is missing.
I’m running BP 1.0.1 and WPMU 2.7.1.
Has anyone a solution for that problem?
Ok, I fired up the debugger to see what could be the problem. Here’s what I found: The problem occurs only if you’re using a translated BP and is caused by the last line of code (bp-xprofile.php):
// Concatenate the values.
$date_value = $_POST['field_' . $group->fields[$j]->id . '_day'] . $_POST['field_' . $group->fields[$j]->id . '_month'] . $_POST['field_' . $group->fields[$j]->id . '_year'];
// Turn the concatenated value into a timestamp
$profile_data->value = strtotime($date_value);
strtotime() expects a date in english language (e.g. 2February2008), but in the translated BP version the month is also translated (e.g. 2Februar2008).
So what can we do about that? Other than not translating the months?
I have just noticed another bug in regards to the date box.
It seems that BuddyPress will not grant any dates before December 14th 1901 (as of today – i am not aware of whether that date shifts as days pass).
Granted, not many people – if any – will be needing this date as long as it is used for birthdays. But there might be some other purposes where this is a real bugger.
Any fix on this (and the before mentioned)?
http://uk3.php.net/manual/en/function.date.php, specifically “The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).”?
You must be logged in to reply to this topic.