[Resolved] Possible bug with bp_member_profile_data and Date Selector?
-
WP 3.5.1, BP 1.7-b1.
I elaborate on the problem a bit more here, but the gist of it is that I tried to call a datebox with bp_member_profile_data() and it didn’t work. I’m not a programmer, but I was able to go through the source and isolate the problem; it happens in xprofile_format_profile_field() in bp-xprofile/bp-xprofile-functions.php when the following is passed:
`$field_value = bp_format_time( $field_value, true );`
bp_format_time is definitely causing the problem. I was able to get it to show by doing the following things:
- Comment out the line that’s causing the problem.
- Wrap $field_value in strtotime() when calling bp_format_time. The resulting dates were off by a day, but it otherwise displayed as expected.
- Go into the bp_format_time function and, with
`if ( !isset( $time ) || !is_numeric( $time ) )
return false;` change false to $time.
Remember, I don’t really know what I’m doing. I don’t know exactly what the problem is and what the proper fix would be, or how that fix would affect other parts of the site. Just wanted to share what I found, and if someone has a solution, that’d be really helpful! I have a workaround but I’d like to use bp_member_profile_data as intended.
- The topic ‘[Resolved] Possible bug with bp_member_profile_data and Date Selector?’ is closed to new replies.