Opened 12 years ago
Closed 12 years ago
#6137 closed defect (bug) (fixed)
xprofile_insert_field() & BP_XProfile_Field->save() work incorrectly
| Reported by: | slaFFik | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | high | Milestone: | 2.3 |
| Component: | Extended Profile | Version: | |
| Severity: | normal | Keywords: | needs-unit-tests |
| Cc: |
Description
When you pass is_default_option to xprofile_insert_field() function, it's not saved into the DB.
Reason: xprofile_insert_field() initializes and pass is_default_option (among others) to BP_XProfile_Field and to its save() method, but there is no use or even mention of is_default_option.
So it's impossible right now using xprofile_insert_field() to save options defaults for fields. Currently we need to use additional xprofile_field_default_before_save filter for that.
OR
We need to have a separate function like xprofile_insert_field_option() that will flatten that (rather) complicated logic in BP_XProfile_Field->save() around options saving.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
See #6134.