[buddypress-trac] [BuddyPress Trac] #5472: xprofile_insert_field -> type - 'option' not allowed?
buddypress-trac
noreply at wordpress.org
Sun Mar 30 18:19:14 UTC 2014
#5472: xprofile_insert_field -> type - 'option' not allowed?
--------------------------+--------------------
Reporter: shanebp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.1
Component: XProfile | Version: 1.9.2
Severity: normal | Resolution:
Keywords: |
--------------------------+--------------------
Changes (by boonebgorges):
* milestone: Awaiting Review => 2.1
Comment:
Thanks for the additional info, shanebp.
> option_order is not set in the db.
> Perhaps because 'type' is selectbox so option_order is ignored in
> class BP_XProfile_Field->save() ?
Correct. It's saved only for children. I wouldn't classify this as a bug -
the correct field type for your use case is not 'selectbox' but is instead
'option'.
> But if 'type' => 'option', nothing is inserted.
> Perhaps because it fails here ?
Yup, this diagnosis is correct. Either we should add 'option' to the
permitted field types, or we should make a special exception in
xprofile_insert_field() for 'option'. Moving to 2.1 to solve it one way or
another. I'm also attaching a unit test that demonstrates the failure.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5472#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list